From 1104b3a6fc39dde72585d69e1460b016c00b3252 Mon Sep 17 00:00:00 2001 From: "Siddha, Suresh B" Date: Wed, 17 Oct 2007 18:04:33 +0200 Subject: [PATCH] --- yaml --- r: 70947 b: refs/heads/master c: 58d5fa7a6a6fc4754d295d0999b284edd67c8620 h: refs/heads/master i: 70945: 5f3e2be55d40c9305001e73ae7b12efd71308872 70943: dda4f1c6fa87ea6bd6475ba52d0dd24e67656b71 v: v3 --- [refs] | 2 +- trunk/include/asm-x86/mach-default/mach_apicdef.h | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 92abe2e84d50..0d7e5e4e4b86 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 801916c1b369b637ce799e6c71a94963ff63df79 +refs/heads/master: 58d5fa7a6a6fc4754d295d0999b284edd67c8620 diff --git a/trunk/include/asm-x86/mach-default/mach_apicdef.h b/trunk/include/asm-x86/mach-default/mach_apicdef.h index 7bcb350c3ee8..ae9841319094 100644 --- a/trunk/include/asm-x86/mach-default/mach_apicdef.h +++ b/trunk/include/asm-x86/mach-default/mach_apicdef.h @@ -1,11 +1,17 @@ #ifndef __ASM_MACH_APICDEF_H #define __ASM_MACH_APICDEF_H +#include + #define APIC_ID_MASK (0xF<<24) static inline unsigned get_apic_id(unsigned long x) { - return (((x)>>24)&0xF); + unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); + if (APIC_XAPIC(ver)) + return (((x)>>24)&0xFF); + else + return (((x)>>24)&0xF); } #define GET_APIC_ID(x) get_apic_id(x)