[BACK]Return to mach_apicdef.h CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / include / asm-x86 / mach-default

File: [Development] / linux-2.6-xfs / include / asm-x86 / mach-default / mach_apicdef.h (download)

Revision 1.2, Mon Aug 4 17:03:13 2008 UTC (9 years, 2 months ago) by lachlan.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +7 -2 lines

Merge up to 2.6.26
Merge of 2.6.x-xfs-melb:linux:31804b by kenmcd.

#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 GET_APIC_ID(x)          (((x)>>24)&0xFFu)
#define	SET_APIC_ID(x)		(((x)<<24))
#else
#define		APIC_ID_MASK		(0xF<<24)
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

#endif