diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-30 07:38:45 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-04-30 07:38:47 -0400 |
commit | 2e5061e40af88070984e3769eafb5a06022375fd (patch) | |
tree | 2964cc88a68f826fc8e025d145f692e1e78740e0 /include/asm-s390/smp.h | |
parent | 8fc63658681f32e6e29f6d1138de933d7272e0ec (diff) |
[S390] Convert machine feature detection code to C.
From: Heiko Carstens <heiko.carstens@de.ibm.com>
From: Carsten Otte <cotte@de.ibm.com>
This lets us use defines for the magic bits in machine flags instead
of using plain numbers all over the place.
In addition on newer machines features/facilities are indicated by the
result of the stfl instruction. So we use these bits instead of trying
to execute new instructions and check wether we get an exception or
not.
Also the mvpg instruction is always available when in zArch mode,
whereas the idte instruction is only available in zArch mode. This
results in some minor optimizations.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390/smp.h')
-rw-r--r-- | include/asm-s390/smp.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index 8376b195a1b6..ae89cf2478fc 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/lowcore.h> | 19 | #include <asm/lowcore.h> |
20 | #include <asm/sigp.h> | 20 | #include <asm/sigp.h> |
21 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
22 | #include <asm/system.h> | ||
22 | 23 | ||
23 | /* | 24 | /* |
24 | s390 specific smp.c headers | 25 | s390 specific smp.c headers |
@@ -53,10 +54,7 @@ extern void machine_power_off_smp(void); | |||
53 | 54 | ||
54 | static inline __u16 hard_smp_processor_id(void) | 55 | static inline __u16 hard_smp_processor_id(void) |
55 | { | 56 | { |
56 | __u16 cpu_address; | 57 | return stap(); |
57 | |||
58 | asm volatile("stap %0" : "=m" (cpu_address)); | ||
59 | return cpu_address; | ||
60 | } | 58 | } |
61 | 59 | ||
62 | /* | 60 | /* |