summaryrefslogtreecommitdiff
path: root/include/asm-ia64/processor.h
diff options
context:
space:
mode:
authorDavid Mosberger <davidm@tiger.hpl.hp.com>2003-07-15 00:39:40 -0700
committerDavid Mosberger <davidm@tiger.hpl.hp.com>2003-07-15 00:39:40 -0700
commit1eaad053df9105aaeaaa09a3a536fdd4669f0d25 (patch)
tree27d24a63fa4ee14c11d3054519f0d9064b99c731 /include/asm-ia64/processor.h
parentec26ea398bbad198c27cfa4fbff5bd728a6c2b2b (diff)
ia64: Change per-CPU implementation so that __get_cpu_var() returns the
canonical address (l-value). To get the virtually mapped alias (which is more efficient), use __ia64_per_cpu_var(). The latter is safe only if the address of the l-value is never passed to another CPU (i.e., not stored in any global place). For extremely efficient, portable per-CPU variables, there is now a new API local.h which was introduced by Rusty Russell. To use this, declare a variable of type local_t as a per-CPU variable and then use {__,}cpu_local_FOO() to manipulate such variables. This patch also updated the atomic interface with a 64-bit counter.
Diffstat (limited to 'include/asm-ia64/processor.h')
-rw-r--r--include/asm-ia64/processor.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 56e55b0a5061..669e44bf8012 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -191,10 +191,12 @@ struct cpuinfo_ia64 {
DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info);
/*
- * The "local" data pointer. It points to the per-CPU data of the currently executing
+ * The "local" data variable. It refers to the per-CPU data of the currently executing
* CPU, much like "current" points to the per-task data of the currently executing task.
+ * Do not use the address of local_cpu_data, since it will be different from
+ * cpu_data(smp_processor_id())!
*/
-#define local_cpu_data (&__get_cpu_var(cpu_info))
+#define local_cpu_data (&__ia64_per_cpu_var(cpu_info))
#define cpu_data(cpu) (&per_cpu(cpu_info, cpu))
extern void identify_cpu (struct cpuinfo_ia64 *);