Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136890
b: refs/heads/master
c: ef1f87a
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed Feb 22, 2009
1 parent 618e492 commit 787266f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 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: 9be1b56a3e718aa998772019c57c398dbb19e258
refs/heads/master: ef1f87aa7ba6224bef1b750b3272ba281d8f43ed
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 @@ -146,7 +146,7 @@ static inline u64 native_x2apic_icr_read(void)
return val;
}

extern int x2apic;
extern int x2apic, x2apic_phys;
extern void check_x2apic(void);
extern void enable_x2apic(void);
extern void enable_IR_x2apic(void);
Expand Down
9 changes: 1 addition & 8 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,14 +1265,7 @@ void __cpuinit end_local_APIC_setup(void)
#ifdef CONFIG_X86_X2APIC
void check_x2apic(void)
{
int msr, msr2;

if (!cpu_has_x2apic)
return;

rdmsr(MSR_IA32_APICBASE, msr, msr2);

if (msr & X2APIC_ENABLE) {
if (x2apic_enabled()) {
pr_info("x2apic enabled by BIOS, switching to x2apic ops\n");
x2apic_preenabled = x2apic = 1;
}
Expand Down
13 changes: 10 additions & 3 deletions trunk/arch/x86/kernel/apic/probe_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,16 @@ static struct apic *apic_probe[] __initdata = {
void __init default_setup_apic_routing(void)
{
#ifdef CONFIG_X86_X2APIC
if (apic == &apic_x2apic_phys || apic == &apic_x2apic_cluster) {
if (!intr_remapping_enabled)
apic = &apic_flat;
if (x2apic && (apic != &apic_x2apic_phys &&
#ifdef CONFIG_X86_UV
apic != &apic_x2apic_uv_x &&
#endif
apic != &apic_x2apic_cluster)) {
if (x2apic_phys)
apic = &apic_x2apic_phys;
else
apic = &apic_x2apic_cluster;
printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
}
#endif

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/x86/kernel/apic/x2apic_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);

static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
if (cpu_has_x2apic)
return 1;

return 0;
return x2apic_enabled();
}

/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/x86/kernel/apic/x2apic_phys.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <asm/apic.h>
#include <asm/ipi.h>

static int x2apic_phys;
int x2apic_phys;

static int set_x2apic_phys_mode(char *arg)
{
Expand All @@ -21,10 +21,10 @@ early_param("x2apic_phys", set_x2apic_phys_mode);

static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
if (cpu_has_x2apic && x2apic_phys)
return 1;

return 0;
if (x2apic_phys)
return x2apic_enabled();
else
return 0;
}

/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */
Expand Down

0 comments on commit 787266f

Please sign in to comment.