/*
 * Copyright (C) 2000-2002 ASANO Masahiro
 */

#ifndef MPERCPU_H
#define	MPERCPU_H

#ifdef CONFIG_SMP

extern addr_t __per_cpu_offset_addr;	/*long*/
#define	PER_CPU_NAME(var)	var##__per_cpu
#define	IMPORT_PER_CPU(var)	addr_t var##__per_cpu_addr
#define	PER_CPU_ADDR(type, var, n)	(var##__per_cpu_addr + sizeof(type) * (n))

#else /*CONFIG_SMP*/

#define	PER_CPU_NAME(var)	var##__per_cpu
#define	IMPORT_PER_CPU(var)	addr_t var##__per_cpu_addr
#define	PER_CPU_ADDR(type, var, n)	var##__per_cpu_addr

#endif /*CONFIG_SMP*/

#endif /*MPERCPU_H*/
