[SCSI] qla2xxx: Properly handle Vport state-change-notifications.
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-x86 / mach-default / mach_apicdef.h
blobae9841319094223e4ba81d09f929841cd5035b5e
1 #ifndef __ASM_MACH_APICDEF_H
2 #define __ASM_MACH_APICDEF_H
4 #include <asm/apic.h>
6 #define APIC_ID_MASK (0xF<<24)
8 static inline unsigned get_apic_id(unsigned long x)
9 {
10 unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
11 if (APIC_XAPIC(ver))
12 return (((x)>>24)&0xFF);
13 else
14 return (((x)>>24)&0xF);
17 #define GET_APIC_ID(x) get_apic_id(x)
19 #endif