Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249898
b: refs/heads/master
c: 69c252f
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed May 22, 2011
1 parent 2a4f4d3 commit 1a407a9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 31 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: 8b37e88061e229e78959fe3257649fd5ce05f8af
refs/heads/master: 69c252ffce77f4e38347d536ee4eab4aa162dc67
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static inline void default_wait_for_init_deassert(atomic_t *deassert)
return;
}

extern void generic_bigsmp_probe(void);
extern struct apic *generic_bigsmp_probe(void);


#ifdef CONFIG_X86_LOCAL_APIC
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/x86/kernel/apic/bigsmp_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,12 @@ struct apic apic_bigsmp = {
.x86_32_early_logical_apicid = bigsmp_early_logical_apicid,
};

struct apic * __init generic_bigsmp_probe(void)
{
if (probe_bigsmp())
return &apic_bigsmp;

return NULL;
}

apic_driver(apic_bigsmp);
52 changes: 23 additions & 29 deletions trunk/arch/x86/kernel/apic/probe_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,6 @@ static int __init print_ipi_mode(void)
}
late_initcall(print_ipi_mode);

void __init default_setup_apic_routing(void)
{
int version = apic_version[boot_cpu_physical_apicid];

if (num_possible_cpus() > 8) {
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_INTEL:
if (!APIC_XAPIC(version)) {
def_to_bigsmp = 0;
break;
}
/* If P4 and above fall through */
case X86_VENDOR_AMD:
def_to_bigsmp = 1;
}
}

#ifdef CONFIG_X86_BIGSMP
generic_bigsmp_probe();
#endif

if (apic->setup_apic_routing)
apic->setup_apic_routing();
}

static int default_x86_32_early_logical_apicid(int cpu)
{
return 1 << cpu;
Expand Down Expand Up @@ -224,24 +199,43 @@ static int __init parse_apic(char *arg)
}
early_param("apic", parse_apic);

void __init generic_bigsmp_probe(void)
void __init default_setup_apic_routing(void)
{
int version = apic_version[boot_cpu_physical_apicid];

if (num_possible_cpus() > 8) {
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_INTEL:
if (!APIC_XAPIC(version)) {
def_to_bigsmp = 0;
break;
}
/* If P4 and above fall through */
case X86_VENDOR_AMD:
def_to_bigsmp = 1;
}
}

#ifdef CONFIG_X86_BIGSMP
/*
* This routine is used to switch to bigsmp mode when
* This is used to switch to bigsmp mode when
* - There is no apic= option specified by the user
* - generic_apic_probe() has chosen apic_default as the sub_arch
* - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support
*/

if (!cmdline_apic && apic == &apic_default) {
if (apic_bigsmp.probe()) {
apic = &apic_bigsmp;
struct apic *bigsmp = generic_bigsmp_probe();
if (bigsmp) {
apic = bigsmp;
printk(KERN_INFO "Overriding APIC driver with %s\n",
apic->name);
}
}
#endif

if (apic->setup_apic_routing)
apic->setup_apic_routing();
}

void __init generic_apic_probe(void)
Expand Down

0 comments on commit 1a407a9

Please sign in to comment.