diff options
author | Tony Luck <tony.luck@intel.com> | 2008-08-01 19:13:32 +0200 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-08-01 19:21:21 +0200 |
commit | 7f30491ccd28627742e37899453ae20e3da8e18f (patch) | |
tree | 7291c0a26ed3a31acf9542857af3981d278f5de8 /arch/ia64/include/asm/percpu.h | |
parent | Fix off-by-one error in iov_iter_advance() (diff) | |
download | linux-7f30491ccd28627742e37899453ae20e3da8e18f.tar.xz linux-7f30491ccd28627742e37899453ae20e3da8e18f.zip |
[IA64] Move include/asm-ia64 to arch/ia64/include/asm
After moving the the include files there were a few clean-ups:
1) Some files used #include <asm-ia64/xyz.h>, changed to <asm/xyz.h>
2) Some comments alerted maintainers to look at various header files to
make matching updates if certain code were to be changed. Updated these
comments to use the new include paths.
3) Some header files mentioned their own names in initial comments. Just
deleted these self references.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/include/asm/percpu.h')
-rw-r--r-- | arch/ia64/include/asm/percpu.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/percpu.h b/arch/ia64/include/asm/percpu.h new file mode 100644 index 000000000000..77f30b664b4e --- /dev/null +++ b/arch/ia64/include/asm/percpu.h @@ -0,0 +1,51 @@ +#ifndef _ASM_IA64_PERCPU_H +#define _ASM_IA64_PERCPU_H + +/* + * Copyright (C) 2002-2003 Hewlett-Packard Co + * David Mosberger-Tang <davidm@hpl.hp.com> + */ + +#define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE + +#ifdef __ASSEMBLY__ +# define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ +#else /* !__ASSEMBLY__ */ + + +#include <linux/threads.h> + +#ifdef CONFIG_SMP + +#ifdef HAVE_MODEL_SMALL_ATTRIBUTE +# define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__))) +#endif + +#define __my_cpu_offset __ia64_per_cpu_var(local_per_cpu_offset) + +extern void *per_cpu_init(void); + +#else /* ! SMP */ + +#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu"))) + +#define per_cpu_init() (__phys_per_cpu_start) + +#endif /* SMP */ + +/* + * Be extremely careful when taking the address of this variable! Due to virtual + * remapping, it is different from the canonical address returned by __get_cpu_var(var)! + * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly + * more efficient. + */ +#define __ia64_per_cpu_var(var) per_cpu__##var + +#include <asm-generic/percpu.h> + +/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ +DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); + +#endif /* !__ASSEMBLY__ */ + +#endif /* _ASM_IA64_PERCPU_H */ |