Displaying 2 results from an estimated 2 matches for "percpu_shift".
2012 Aug 10
0
[PATCH v2 3/6] x86/xen: Read variables from dynamically allocated per_cpu data
...g/xen_hyper_defs.h 2012-06-29 16:59:18.000000000 +0200
+++ crash-6.0.8/xen_hyper_defs.h 2012-07-05 15:50:19.000000000 +0200
@@ -136,7 +136,13 @@ typedef uint32_t Elf_Word;
#if defined(X86) || defined(X86_64)
#define xen_hyper_per_cpu(var, cpu) \
- ((ulong)(var) + (((ulong)(cpu))<<xht->percpu_shift))
+ ({ ulong __var_addr; \
+ if (xht->__per_cpu_offset) \
+ __var_addr = (xht->flags & XEN_HYPER_SMP) ? \
+ ((ulong)(var) + xht->__per_cpu_offset[cpu]) : (ulong)(var); \
+ else \
+ __var_addr = (ulong)(var) + ((ulong)(cpu) << xht->percpu_shift); \
+ __var_addr; })...
2007 Mar 27
0
[PATCH] make all performance counter per-cpu
...S
-#define PERFC_INCR(_name,_idx) \
- lock incl perfcounters+_name(,_idx,4)
+#define PERFC_INCR(_name,_idx,_cur) \
+ pushl _cur; \
+ movl VCPU_processor(_cur),_cur; \
+ shll $PERCPU_SHIFT,_cur; \
+ incl per_cpu__perfcounters+_name*4(_cur,_idx,4);\
+ popl _cur
#else
-#define PERFC_INCR(_name,_idx)
+#define PERFC_INCR(_name,_idx,_cur)
#endif
#ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
Index: 2007-03-19/xen/include/asm-x86/x86_64/asm_defns.h
=====...