diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-10 09:12:05 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-10 12:55:37 -0400 |
commit | b70d9c2473ffbe327f5d7364bfbf67e94c440af8 (patch) | |
tree | b6ac3c5c266dca863402f01d70faf4484d252a1f /include | |
parent | 6649ababd52014afaca62a12aed37d797f9f865c (diff) |
x86, VisWS: turn into generic arch, update asm-x86/mach-visws/mach_apicdef.h
update asm-x86/mach-visws/mach_apicdef.h to the generic version.
This should work fine as VISWS has a standard local APIC and thus
its mach_apicdef.h copy is just an ancient version of the generic code.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/mach-visws/mach_apicdef.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/asm-x86/mach-visws/mach_apicdef.h b/include/asm-x86/mach-visws/mach_apicdef.h index 826cfa97d778..e4b29ba37de6 100644 --- a/include/asm-x86/mach-visws/mach_apicdef.h +++ b/include/asm-x86/mach-visws/mach_apicdef.h | |||
@@ -1,12 +1,24 @@ | |||
1 | #ifndef __ASM_MACH_APICDEF_H | 1 | #ifndef __ASM_MACH_APICDEF_H |
2 | #define __ASM_MACH_APICDEF_H | 2 | #define __ASM_MACH_APICDEF_H |
3 | 3 | ||
4 | #define APIC_ID_MASK (0xF<<24) | 4 | #include <asm/apic.h> |
5 | 5 | ||
6 | static inline unsigned get_apic_id(unsigned long x) | 6 | #ifdef CONFIG_X86_64 |
7 | #define APIC_ID_MASK (0xFFu<<24) | ||
8 | #define GET_APIC_ID(x) (((x)>>24)&0xFFu) | ||
9 | #define SET_APIC_ID(x) (((x)<<24)) | ||
10 | #else | ||
11 | #define APIC_ID_MASK (0xF<<24) | ||
12 | static inline unsigned get_apic_id(unsigned long x) | ||
7 | { | 13 | { |
8 | return (((x)>>24)&0xF); | 14 | unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); |
9 | } | 15 | if (APIC_XAPIC(ver)) |
10 | #define GET_APIC_ID(x) get_apic_id(x) | 16 | return (((x)>>24)&0xFF); |
17 | else | ||
18 | return (((x)>>24)&0xF); | ||
19 | } | ||
20 | |||
21 | #define GET_APIC_ID(x) get_apic_id(x) | ||
22 | #endif | ||
11 | 23 | ||
12 | #endif | 24 | #endif |