summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Holzheu2007-02-21 10:55:18 +0100
committerMartin Schwidefsky2007-02-21 10:55:18 +0100
commit72960a02c270950253126ee8b339afd400f55273 (patch)
tree3dec1f231bac88c2457af8a33b146b7df25df603 /include
parent[S390] etr: Add barrier() to etr_sync_cpu_start(). (diff)
downloadkernel-qcow2-linux-72960a02c270950253126ee8b339afd400f55273.tar.gz
kernel-qcow2-linux-72960a02c270950253126ee8b339afd400f55273.tar.xz
kernel-qcow2-linux-72960a02c270950253126ee8b339afd400f55273.zip
[S390] New get_cpu_id() inline assembly
Replace two stidp inline assemblies with one global implementation. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-s390/processor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h
index 4c1b73940351..33b80ced4bc1 100644
--- a/include/asm-s390/processor.h
+++ b/include/asm-s390/processor.h
@@ -36,6 +36,11 @@ typedef struct
unsigned int unused : 16;
} __attribute__ ((packed)) cpuid_t;
+static inline void get_cpu_id(cpuid_t *ptr)
+{
+ asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr));
+}
+
struct cpuinfo_S390
{
cpuid_t cpu_id;