Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234668
b: refs/heads/master
c: 7167d08
h: refs/heads/master
v: v3
  • Loading branch information
Henrik Kretzschmar authored and Ingo Molnar committed Feb 23, 2011
1 parent b2a3dbd commit 9ffbf87
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 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: b6a1432da81fa387d76215108dc9f6ea6d343aed
refs/heads/master: 7167d08e780a722fa79ea414fc4e72bc00751392
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/io_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ extern void __init pre_init_apic_IRQ0(void);

extern void mp_save_irq(struct mpc_intsrc *m);

extern void disable_ioapic_support(void);

#else /* !CONFIG_X86_IO_APIC */

#define io_apic_assign_pci_irqs 0
Expand All @@ -189,6 +191,7 @@ struct io_apic_irq_attr;
static inline int io_apic_set_pci_routing(struct device *dev, int irq,
struct io_apic_irq_attr *irq_attr) { return 0; }
static inline void mp_save_irq(struct mpc_intsrc *m) { };
static inline void disable_ioapic_support(void) { }
#endif

#endif /* _ASM_X86_IO_APIC_H */
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <asm/i8259.h>
#include <asm/proto.h>
#include <asm/apic.h>
#include <asm/io_apic.h>
#include <asm/desc.h>
#include <asm/hpet.h>
#include <asm/idle.h>
Expand Down Expand Up @@ -1209,7 +1210,7 @@ void __cpuinit setup_local_APIC(void)
rdtscll(tsc);

if (disable_apic) {
arch_disable_smp_support();
disable_ioapic_support();
return;
}

Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);

int skip_ioapic_setup;

void arch_disable_smp_support(void)
/**
* disable_ioapic_support() - disables ioapic support at runtime
*/
void disable_ioapic_support(void)
{
#ifdef CONFIG_PCI
noioapicquirk = 1;
Expand All @@ -120,7 +123,7 @@ void arch_disable_smp_support(void)
static int __init parse_noapic(char *str)
{
/* disable IO-APIC */
arch_disable_smp_support();
disable_ioapic_support();
return 0;
}
early_param("noapic", parse_noapic);
Expand Down
11 changes: 10 additions & 1 deletion trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include <asm/mtrr.h>
#include <asm/mwait.h>
#include <asm/apic.h>
#include <asm/io_apic.h>
#include <asm/setup.h>
#include <asm/uv/uv.h>
#include <linux/mc146818rtc.h>
Expand Down Expand Up @@ -945,6 +946,14 @@ int __cpuinit native_cpu_up(unsigned int cpu)
return 0;
}

/**
* arch_disable_smp_support() - disables SMP support for x86 at runtime
*/
void arch_disable_smp_support(void)
{
disable_ioapic_support();
}

/*
* Fall back to non SMP mode after errors.
*
Expand Down Expand Up @@ -1045,7 +1054,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
"(tell your hw vendor)\n");
}
smpboot_clear_io_apic();
arch_disable_smp_support();
disable_ioapic_support();
return -1;
}

Expand Down

0 comments on commit 9ffbf87

Please sign in to comment.