Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112715
b: refs/heads/master
c: 638c041
h: refs/heads/master
i:
  112713: 2f0e0de
  112711: c4ae49e
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Aug 16, 2008
1 parent df11599 commit f3dffbb
Show file tree
Hide file tree
Showing 3 changed files with 15 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: 6f6da97faf29f87b3980a6992fb8cab44b4c444d
refs/heads/master: 638c0411922540deaf8797cacf73513b17618405
4 changes: 3 additions & 1 deletion trunk/arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ void __init sync_Arb_IDs(void)
*/
void __init init_bsp_APIC(void)
{
unsigned long value;
unsigned int value;

/*
* Don't do the setup now if we have a SMP BIOS as the
Expand All @@ -946,11 +946,13 @@ void __init init_bsp_APIC(void)
value &= ~APIC_VECTOR_MASK;
value |= APIC_SPIV_APIC_ENABLED;

#ifdef CONFIG_X86_32
/* This bit is reserved on P4/Xeon and should be cleared */
if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
(boot_cpu_data.x86 == 15))
value &= ~APIC_SPIV_FOCUS_DISABLED;
else
#endif
value |= APIC_SPIV_FOCUS_DISABLED;
value |= SPURIOUS_APIC_VECTOR;
apic_write(APIC_SPIV, value);
Expand Down
14 changes: 11 additions & 3 deletions trunk/arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,6 @@ void __init init_bsp_APIC(void)
if (smp_found_config || !cpu_has_apic)
return;

value = apic_read(APIC_LVR);

/*
* Do not trust the local APIC being empty at bootup.
*/
Expand All @@ -786,7 +784,15 @@ void __init init_bsp_APIC(void)
value = apic_read(APIC_SPIV);
value &= ~APIC_VECTOR_MASK;
value |= APIC_SPIV_APIC_ENABLED;
value |= APIC_SPIV_FOCUS_DISABLED;

#ifdef CONFIG_X86_32
/* This bit is reserved on P4/Xeon and should be cleared */
if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
(boot_cpu_data.x86 == 15))
value &= ~APIC_SPIV_FOCUS_DISABLED;
else
#endif
value |= APIC_SPIV_FOCUS_DISABLED;
value |= SPURIOUS_APIC_VECTOR;
apic_write(APIC_SPIV, value);

Expand All @@ -795,6 +801,8 @@ void __init init_bsp_APIC(void)
*/
apic_write(APIC_LVT0, APIC_DM_EXTINT);
value = APIC_DM_NMI;
if (!lapic_is_integrated()) /* 82489DX */
value |= APIC_LVT_LEVEL_TRIGGER;
apic_write(APIC_LVT1, value);
}

Expand Down

0 comments on commit f3dffbb

Please sign in to comment.