mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 12:52:30 +00:00
f6bc402909
After the inclusion, a lot of files needs fixing for conflicts, some of them in the headers themselves, to accomodate for both i386 and x86_64 versions. [ mingo@elte.hu: build fix ] Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
25 lines
467 B
C
25 lines
467 B
C
#ifndef __ASM_MACH_APICDEF_H
|
|
#define __ASM_MACH_APICDEF_H
|
|
|
|
#include <asm/apic.h>
|
|
|
|
#ifdef CONFIG_X86_64
|
|
#define APIC_ID_MASK (0xFFu<<24)
|
|
#define SET_APIC_ID(x) (((x)<<24))
|
|
#else
|
|
#define APIC_ID_MASK (0xF<<24)
|
|
#endif
|
|
|
|
static inline unsigned get_apic_id(unsigned long x)
|
|
{
|
|
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)
|
|
|
|
#endif
|