@@ -219,13 +219,11 @@ static inline unsigned short stap(void)
return cpu_address;
}
-static inline uint16_t get_machine_id(void)
+static inline uint64_t stidp(void)
{
uint64_t cpuid;
asm volatile("stidp %0" : "=Q" (cpuid));
- cpuid = cpuid >> 16;
- cpuid &= 0xffff;
return cpuid;
}
@@ -25,6 +25,11 @@ enum s390_host {
enum s390_host detect_host(void);
+static inline uint16_t get_machine_id(void)
+{
+ return stidp() >> 16;
+}
+
static inline bool host_is_tcg(void)
{
return detect_host() == HOST_IS_TCG;