Skip to content

Commit

Permalink
x86: apic unification - merge down enable_NMI_through_LVT0
Browse files Browse the repository at this point in the history
No code change on binary level.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: macro@linux-mips.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Jul 24, 2008
1 parent 36a028d commit d4c63ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,15 @@ u32 safe_apic_wait_icr_idle(void)
*/
void __cpuinit enable_NMI_through_LVT0(void)
{
unsigned int v = APIC_DM_NMI;
unsigned int v;

/* unmask and set to NMI */
v = APIC_DM_NMI;

/* Level triggered for 82489DX */
/* Level triggered for 82489DX (32bit mode) */
if (!lapic_is_integrated())
v |= APIC_LVT_LEVEL_TRIGGER;

apic_write(APIC_LVT0, v);
}

Expand Down
5 changes: 5 additions & 0 deletions arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ void __cpuinit enable_NMI_through_LVT0(void)

/* unmask and set to NMI */
v = APIC_DM_NMI;

/* Level triggered for 82489DX (32bit mode) */
if (!lapic_is_integrated())
v |= APIC_LVT_LEVEL_TRIGGER;

apic_write(APIC_LVT0, v);
}

Expand Down

0 comments on commit d4c63ec

Please sign in to comment.