Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249891
b: refs/heads/master
c: 9ebd680
h: refs/heads/master
i:
  249889: ebc3b8b
  249887: 8430d50
v: v3
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed May 20, 2011
1 parent 0168f93 commit 9d43202
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 20 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: 8f18c9711ed31c257d4f00a094b2fdbe72a741da
refs/heads/master: 9ebd680bd029a9fc47399ca61c950f8b6730ac40
10 changes: 9 additions & 1 deletion trunk/arch/x86/kernel/apic/apic_flat_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,18 @@ physflat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
return per_cpu(x86_cpu_to_apicid, cpu);
}

static int physflat_probe(void)
{
if (apic == &apic_physflat || num_possible_cpus() > 8)
return 1;

return 0;
}

struct apic apic_physflat = {

.name = "physical flat",
.probe = NULL,
.probe = physflat_probe,
.acpi_madt_oem_check = physflat_acpi_madt_oem_check,
.apic_id_registered = flat_apic_id_registered,

Expand Down
22 changes: 7 additions & 15 deletions trunk/arch/x86/kernel/apic/probe_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,18 @@ static int apicid_phys_pkg_id(int initial_apic_id, int index_msb)
*/
void __init default_setup_apic_routing(void)
{
int i;

enable_IR_x2apic();

#ifdef CONFIG_X86_X2APIC
if (x2apic_mode
#ifdef CONFIG_X86_UV
&& apic != &apic_x2apic_uv_x
#endif
) {
if (x2apic_phys)
apic = &apic_x2apic_phys;
else
apic = &apic_x2apic_cluster;
for (i = 0; apic_probe[i]; ++i) {
if (apic_probe[i]->probe()) {
apic = apic_probe[i];
break;
}
}
#endif

if (apic == &apic_flat && num_possible_cpus() > 8)
apic = &apic_physflat;

printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
printk(KERN_INFO "APIC routing finalized to %s.\n", apic->name);

if (is_vsmp_box()) {
/* need to update phys_pkg_id */
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/x86/kernel/apic/x2apic_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,15 @@ static void init_x2apic_ldr(void)
per_cpu(x86_cpu_to_logical_apicid, cpu) = apic_read(APIC_LDR);
}

static int x2apic_cluster_probe(void)
{
return x2apic_mode;
}

struct apic apic_x2apic_cluster = {

.name = "cluster x2apic",
.probe = NULL,
.probe = x2apic_cluster_probe,
.acpi_madt_oem_check = x2apic_acpi_madt_oem_check,
.apic_id_registered = x2apic_apic_id_registered,

Expand Down
10 changes: 9 additions & 1 deletion trunk/arch/x86/kernel/apic/x2apic_phys.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,18 @@ static void init_x2apic_ldr(void)
{
}

static int x2apic_phys_probe(void)
{
if (x2apic_mode && x2apic_phys)
return 1;

return apic == &apic_x2apic_phys;
}

struct apic apic_x2apic_phys = {

.name = "physical x2apic",
.probe = NULL,
.probe = x2apic_phys_probe,
.acpi_madt_oem_check = x2apic_acpi_madt_oem_check,
.apic_id_registered = x2apic_apic_id_registered,

Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/x86/kernel/apic/x2apic_uv_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,15 @@ static void uv_send_IPI_self(int vector)
apic_write(APIC_SELF_IPI, vector);
}

static int uv_probe(void)
{
return apic == &apic_x2apic_uv_x;
}

struct apic __refdata apic_x2apic_uv_x = {

.name = "UV large system",
.probe = NULL,
.probe = uv_probe,
.acpi_madt_oem_check = uv_acpi_madt_oem_check,
.apic_id_registered = uv_apic_id_registered,

Expand Down

0 comments on commit 9d43202

Please sign in to comment.