2005-04-17 00:20:36 +02:00
|
|
|
#ifndef __ASM_MACH_APICDEF_H
|
|
|
|
#define __ASM_MACH_APICDEF_H
|
|
|
|
|
2007-10-17 18:04:33 +02:00
|
|
|
#include <asm/apic.h>
|
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
#define APIC_ID_MASK (0xF<<24)
|
|
|
|
|
|
|
|
static inline unsigned get_apic_id(unsigned long x)
|
|
|
|
{
|
2007-10-17 18:04:33 +02:00
|
|
|
unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
|
|
|
|
if (APIC_XAPIC(ver))
|
|
|
|
return (((x)>>24)&0xFF);
|
|
|
|
else
|
|
|
|
return (((x)>>24)&0xF);
|
2005-04-17 00:20:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#define GET_APIC_ID(x) get_apic_id(x)
|
|
|
|
|
|
|
|
#endif
|