[S390] New get_cpu_id() inline assembly

Replace two stidp inline assemblies with one global implementation.

Signed-off-by: Michael Holzheu <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
Michael Holzheu 2007-02-21 10:55:18 +01:00 • committed by Martin Schwidefsky
commit 72960a02c2
3 changed files with 7 additions and 2 deletions

View file

@ -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;