Skip to content

Commit 0315017

Browse files
Sebastian Andrzej SiewiorKAGA-KOKO
authored andcommitted
x86: ce4100: Set pci ops via callback instead of module init
Setting the pci ops on subsys initcall unconditionally will break multi platform kernels on anything except ce4100. Use x86_init.pci.init ops to call this only on real ce4100 platforms. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Cc: [email protected] LKML-Reference: <20110314093340.GA21026@www.tglx.de> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent a79e53d commit 0315017

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

arch/x86/include/asm/ce4100.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef _ASM_CE4100_H_
2+
#define _ASM_CE4100_H_
3+
4+
int ce4100_pci_init(void);
5+
6+
#endif

arch/x86/pci/ce4100.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/pci.h>
3535
#include <linux/init.h>
3636

37+
#include <asm/ce4100.h>
3738
#include <asm/pci_x86.h>
3839

3940
struct sim_reg {
@@ -306,10 +307,10 @@ struct pci_raw_ops ce4100_pci_conf = {
306307
.write = ce4100_conf_write,
307308
};
308309

309-
static int __init ce4100_pci_init(void)
310+
int __init ce4100_pci_init(void)
310311
{
311312
init_sim_regs();
312313
raw_pci_ops = &ce4100_pci_conf;
313-
return 0;
314+
/* Indicate caller that it should invoke pci_legacy_init() */
315+
return 1;
314316
}
315-
subsys_initcall(ce4100_pci_init);

arch/x86/platform/ce4100/ce4100.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/serial_reg.h>
1616
#include <linux/serial_8250.h>
1717

18+
#include <asm/ce4100.h>
1819
#include <asm/setup.h>
1920
#include <asm/io.h>
2021

@@ -129,4 +130,5 @@ void __init x86_ce4100_early_setup(void)
129130
x86_init.resources.probe_roms = x86_init_noop;
130131
x86_init.mpparse.get_smp_config = x86_init_uint_noop;
131132
x86_init.mpparse.find_smp_config = sdv_find_smp_config;
133+
x86_init.pci.init = ce4100_pci_init;
132134
}

0 commit comments

Comments
 (0)