Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136677
b: refs/heads/master
c: 65a4e57
h: refs/heads/master
i:
  136675: 3264877
v: v3
  • Loading branch information
Ingo Molnar committed Feb 5, 2009
1 parent 4e6a50e commit 936e238
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8106d2e24d54497233ca9cd97fa9bec807de458
refs/heads/master: 65a4e574d2382d83f71b30ea92f86d2e40a6ef8d
9 changes: 0 additions & 9 deletions trunk/arch/x86/include/asm/io_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,6 @@ extern int noioapicreroute;
/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
extern int timer_through_8259;

static inline void disable_ioapic_setup(void)
{
#ifdef CONFIG_PCI
noioapicquirk = 1;
noioapicreroute = -1;
#endif
skip_ioapic_setup = 1;
}

/*
* If we use the IO-APIC for IRQ routing, disable automatic
* assignment of PCI IRQ's.
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,7 @@ void __cpuinit setup_local_APIC(void)
int i, j;

if (disable_apic) {
#ifdef CONFIG_X86_IO_APIC
disable_ioapic_setup();
#endif
arch_disable_smp_support();
return;
}

Expand Down
11 changes: 10 additions & 1 deletion trunk/arch/x86/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,19 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);

int skip_ioapic_setup;

void arch_disable_smp_support(void)
{
#ifdef CONFIG_PCI
noioapicquirk = 1;
noioapicreroute = -1;
#endif
skip_ioapic_setup = 1;
}

static int __init parse_noapic(char *str)
{
/* disable IO-APIC */
disable_ioapic_setup();
arch_disable_smp_support();
return 0;
}
early_param("noapic", parse_noapic);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
printk(KERN_ERR "... forcing use of dummy APIC emulation."
"(tell your hw vendor)\n");
smpboot_clear_io_apic();
disable_ioapic_setup();
arch_disable_smp_support();
return -1;
}

Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ extern int __cpu_up(unsigned int cpunum);
*/
extern void smp_cpus_done(unsigned int max_cpus);

/*
* Callback to arch code if there's nosmp or maxcpus=0 on the
* boot command line:
*/
extern void arch_disable_smp_support(void);

/*
* Call a function on all other processors
*/
Expand Down
12 changes: 6 additions & 6 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ unsigned int __initdata setup_max_cpus = NR_CPUS;
* greater than 0, limits the maximum number of CPUs activated in
* SMP mode to <NUM>.
*/
#ifndef CONFIG_X86_IO_APIC
static inline void disable_ioapic_setup(void) {};
#endif

void __weak arch_disable_smp_support(void) { }

static int __init nosmp(char *str)
{
setup_max_cpus = 0;
disable_ioapic_setup();
arch_disable_smp_support();

return 0;
}

Expand All @@ -153,14 +153,14 @@ static int __init maxcpus(char *str)
{
get_option(&str, &setup_max_cpus);
if (setup_max_cpus == 0)
disable_ioapic_setup();
arch_disable_smp_support();

return 0;
}

early_param("maxcpus", maxcpus);
#else
#define setup_max_cpus NR_CPUS
const unsigned int setup_max_cpus = NR_CPUS;
#endif

/*
Expand Down

0 comments on commit 936e238

Please sign in to comment.