Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58d5fa7a6a6fc4754d295d0999b284edd67c8620 Commit: 58d5fa7a6a6fc4754d295d0999b284edd67c8620 Parent: 801916c1b369b637ce799e6c71a94963ff63df79 Author: Siddha, Suresh B <[EMAIL PROTECTED]> AuthorDate: Wed Oct 17 18:04:33 2007 +0200 Committer: Thomas Gleixner <[EMAIL PROTECTED]> CommitDate: Wed Oct 17 20:15:24 2007 +0200
i386: fix 4 bit apicid assumption of mach-default Fix get_apic_id() in mach-default, so that it uses 8 bits incase of xAPIC case and 4 bits for legacy APIC case. This fixes the i386 kernel assumption that apic id is less than 16 for xAPIC platforms with 8 cpus or less and makes the kernel boot on such platforms. [ tglx: arch/x86 adaptation ] Signed-off-by: Suresh Siddha <[EMAIL PROTECTED]> Signed-off-by: Andi Kleen <[EMAIL PROTECTED]> Cc: Andi Kleen <[EMAIL PROTECTED]> Cc: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> --- include/asm-x86/mach-default/mach_apicdef.h | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h index 7bcb350..ae98413 100644 --- a/include/asm-x86/mach-default/mach_apicdef.h +++ b/include/asm-x86/mach-default/mach_apicdef.h @@ -1,11 +1,17 @@ #ifndef __ASM_MACH_APICDEF_H #define __ASM_MACH_APICDEF_H +#include <asm/apic.h> + #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) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html