ia64/xen-unstable
changeset 13468:8bfc6e85eeba
[IA64] Move asm/percpu.h to linux-xen
Modified by upcoming lazy FP save/restore code
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Modified by upcoming lazy FP save/restore code
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author | awilliam@xenbuild2.aw |
---|---|
date | Tue Jan 23 09:45:26 2007 -0700 (2007-01-23) |
parents | 9576f09c9eff |
children | d12ea0bfecce |
files | xen/include/asm-ia64/linux-xen/asm/README.origin xen/include/asm-ia64/linux-xen/asm/percpu.h xen/include/asm-ia64/linux/asm/README.origin xen/include/asm-ia64/linux/asm/percpu.h |
line diff
1.1 --- a/xen/include/asm-ia64/linux-xen/asm/README.origin Tue Jan 23 09:08:03 2007 -0700 1.2 +++ b/xen/include/asm-ia64/linux-xen/asm/README.origin Tue Jan 23 09:45:26 2007 -0700 1.3 @@ -18,6 +18,7 @@ meminit.h -> linux/include/asm-ia64/mem 1.4 numa.h -> linux/include/asm-ia64/numa.h 1.5 page.h -> linux/include/asm-ia64/page.h 1.6 pal.h -> linux/include/asm-ia64/pal.h 1.7 +percpu.h -> linux/include/asm-ia64/percpu.h 1.8 pgalloc.h -> linux/include/asm-ia64/pgalloc.h 1.9 pgtable.h -> linux/include/asm-ia64/pgtable.h 1.10 processor.h -> linux/include/asm-ia64/processor.h
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/xen/include/asm-ia64/linux-xen/asm/percpu.h Tue Jan 23 09:45:26 2007 -0700 2.3 @@ -0,0 +1,72 @@ 2.4 +#ifndef _ASM_IA64_PERCPU_H 2.5 +#define _ASM_IA64_PERCPU_H 2.6 + 2.7 +/* 2.8 + * Copyright (C) 2002-2003 Hewlett-Packard Co 2.9 + * David Mosberger-Tang <davidm@hpl.hp.com> 2.10 + */ 2.11 + 2.12 +#define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE 2.13 + 2.14 +#ifdef __ASSEMBLY__ 2.15 +# define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ 2.16 +#else /* !__ASSEMBLY__ */ 2.17 + 2.18 +#include <linux/config.h> 2.19 + 2.20 +#include <linux/threads.h> 2.21 + 2.22 +#ifdef HAVE_MODEL_SMALL_ATTRIBUTE 2.23 +# define __SMALL_ADDR_AREA __attribute__((__model__ (__small__))) 2.24 +#else 2.25 +# define __SMALL_ADDR_AREA 2.26 +#endif 2.27 + 2.28 +#define DECLARE_PER_CPU(type, name) \ 2.29 + extern __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name 2.30 + 2.31 +/* Separate out the type, so (int[3], foo) works. */ 2.32 +#define DEFINE_PER_CPU(type, name) \ 2.33 + __attribute__((__section__(".data.percpu"))) \ 2.34 + __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name 2.35 + 2.36 +/* 2.37 + * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an 2.38 + * external routine, to avoid include-hell. 2.39 + */ 2.40 +#ifdef CONFIG_SMP 2.41 + 2.42 +extern unsigned long __per_cpu_offset[NR_CPUS]; 2.43 + 2.44 +/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ 2.45 +DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); 2.46 + 2.47 +#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) 2.48 +#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) 2.49 + 2.50 +extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size); 2.51 +extern void setup_per_cpu_areas (void); 2.52 +extern void *per_cpu_init(void); 2.53 + 2.54 +#else /* ! SMP */ 2.55 + 2.56 +#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) 2.57 +#define __get_cpu_var(var) per_cpu__##var 2.58 +#define per_cpu_init() (__phys_per_cpu_start) 2.59 + 2.60 +#endif /* SMP */ 2.61 + 2.62 +#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) 2.63 +#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) 2.64 + 2.65 +/* 2.66 + * Be extremely careful when taking the address of this variable! Due to virtual 2.67 + * remapping, it is different from the canonical address returned by __get_cpu_var(var)! 2.68 + * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly 2.69 + * more efficient. 2.70 + */ 2.71 +#define __ia64_per_cpu_var(var) (per_cpu__##var) 2.72 + 2.73 +#endif /* !__ASSEMBLY__ */ 2.74 + 2.75 +#endif /* _ASM_IA64_PERCPU_H */
3.1 --- a/xen/include/asm-ia64/linux/asm/README.origin Tue Jan 23 09:08:03 2007 -0700 3.2 +++ b/xen/include/asm-ia64/linux/asm/README.origin Tue Jan 23 09:45:26 2007 -0700 3.3 @@ -28,7 +28,6 @@ numnodes.h -> linux/include/asm-ia64/nu 3.4 param.h -> linux/include/asm-ia64/param.h 3.5 patch.h -> linux/include/asm-ia64/patch.h 3.6 pci.h -> linux/include/asm-ia64/pci.h 3.7 -percpu.h -> linux/include/asm-ia64/percpu.h 3.8 rse.h -> linux/include/asm-ia64/rse.h 3.9 sal.h -> linux/include/asm-ia64/sal.h 3.10 sections.h -> linux/include/asm-ia64/sections.h
4.1 --- a/xen/include/asm-ia64/linux/asm/percpu.h Tue Jan 23 09:08:03 2007 -0700 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,72 +0,0 @@ 4.4 -#ifndef _ASM_IA64_PERCPU_H 4.5 -#define _ASM_IA64_PERCPU_H 4.6 - 4.7 -/* 4.8 - * Copyright (C) 2002-2003 Hewlett-Packard Co 4.9 - * David Mosberger-Tang <davidm@hpl.hp.com> 4.10 - */ 4.11 - 4.12 -#define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE 4.13 - 4.14 -#ifdef __ASSEMBLY__ 4.15 -# define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ 4.16 -#else /* !__ASSEMBLY__ */ 4.17 - 4.18 -#include <linux/config.h> 4.19 - 4.20 -#include <linux/threads.h> 4.21 - 4.22 -#ifdef HAVE_MODEL_SMALL_ATTRIBUTE 4.23 -# define __SMALL_ADDR_AREA __attribute__((__model__ (__small__))) 4.24 -#else 4.25 -# define __SMALL_ADDR_AREA 4.26 -#endif 4.27 - 4.28 -#define DECLARE_PER_CPU(type, name) \ 4.29 - extern __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name 4.30 - 4.31 -/* Separate out the type, so (int[3], foo) works. */ 4.32 -#define DEFINE_PER_CPU(type, name) \ 4.33 - __attribute__((__section__(".data.percpu"))) \ 4.34 - __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name 4.35 - 4.36 -/* 4.37 - * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an 4.38 - * external routine, to avoid include-hell. 4.39 - */ 4.40 -#ifdef CONFIG_SMP 4.41 - 4.42 -extern unsigned long __per_cpu_offset[NR_CPUS]; 4.43 - 4.44 -/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ 4.45 -DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); 4.46 - 4.47 -#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) 4.48 -#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) 4.49 - 4.50 -extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size); 4.51 -extern void setup_per_cpu_areas (void); 4.52 -extern void *per_cpu_init(void); 4.53 - 4.54 -#else /* ! SMP */ 4.55 - 4.56 -#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) 4.57 -#define __get_cpu_var(var) per_cpu__##var 4.58 -#define per_cpu_init() (__phys_per_cpu_start) 4.59 - 4.60 -#endif /* SMP */ 4.61 - 4.62 -#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) 4.63 -#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) 4.64 - 4.65 -/* 4.66 - * Be extremely careful when taking the address of this variable! Due to virtual 4.67 - * remapping, it is different from the canonical address returned by __get_cpu_var(var)! 4.68 - * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly 4.69 - * more efficient. 4.70 - */ 4.71 -#define __ia64_per_cpu_var(var) (per_cpu__##var) 4.72 - 4.73 -#endif /* !__ASSEMBLY__ */ 4.74 - 4.75 -#endif /* _ASM_IA64_PERCPU_H */