提交 e86a6ed6 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

[S390] Get rid of cpuid.h header file.

Merge cpuid.h header file into cpu.h.
While at it convert from typedef to struct declaration and also
convert cio code to use proper lowcore structure instead of casts.
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 4bb5e07b
/*
* Copyright IBM Corp. 2000,2009
* Author(s): Hartmut Penner <hp@de.ibm.com>,
* Martin Schwidefsky <schwidefsky@de.ibm.com>,
* Christian Ehrhardt <ehrhardt@de.ibm.com>,
*/
#ifndef _ASM_S390_CPU_H #ifndef _ASM_S390_CPU_H
#define _ASM_S390_CPU_H #define _ASM_S390_CPU_H
#define MAX_CPU_ADDRESS 255 #define MAX_CPU_ADDRESS 255
#ifndef __ASSEMBLY__
#include <linux/types.h>
struct cpuid
{
unsigned int version : 8;
unsigned int ident : 24;
unsigned int machine : 16;
unsigned int unused : 16;
} __packed;
#endif /* __ASSEMBLY__ */
#endif /* _ASM_S390_CPU_H */ #endif /* _ASM_S390_CPU_H */
/*
* Copyright IBM Corp. 2000,2009
* Author(s): Hartmut Penner <hp@de.ibm.com>,
* Martin Schwidefsky <schwidefsky@de.ibm.com>
* Christian Ehrhardt <ehrhardt@de.ibm.com>
*/
#ifndef _ASM_S390_CPUID_H_
#define _ASM_S390_CPUID_H_
/*
* CPU type and hardware bug flags. Kept separately for each CPU.
* Members of this structure are referenced in head.S, so think twice
* before touching them. [mj]
*/
typedef struct
{
unsigned int version : 8;
unsigned int ident : 24;
unsigned int machine : 16;
unsigned int unused : 16;
} __attribute__ ((packed)) cpuid_t;
#endif /* _ASM_S390_CPUID_H_ */
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <asm/debug.h> #include <asm/debug.h>
#include <asm/cpuid.h> #include <asm/cpu.h>
#define KVM_MAX_VCPUS 64 #define KVM_MAX_VCPUS 64
#define KVM_MEMORY_SLOTS 32 #define KVM_MEMORY_SLOTS 32
...@@ -217,8 +217,8 @@ struct kvm_vcpu_arch { ...@@ -217,8 +217,8 @@ struct kvm_vcpu_arch {
struct hrtimer ckc_timer; struct hrtimer ckc_timer;
struct tasklet_struct tasklet; struct tasklet_struct tasklet;
union { union {
cpuid_t cpu_id; struct cpuid cpu_id;
u64 stidp_data; u64 stidp_data;
}; };
}; };
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <asm/cpuid.h> #include <asm/cpu.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -275,7 +275,7 @@ struct _lowcore ...@@ -275,7 +275,7 @@ struct _lowcore
__u32 user_exec_asce; /* 0x02ac */ __u32 user_exec_asce; /* 0x02ac */
/* SMP info area */ /* SMP info area */
cpuid_t cpu_id; /* 0x02b0 */ struct cpuid cpu_id; /* 0x02b0 */
__u32 cpu_nr; /* 0x02b8 */ __u32 cpu_nr; /* 0x02b8 */
__u32 softirq_pending; /* 0x02bc */ __u32 softirq_pending; /* 0x02bc */
__u32 percpu_offset; /* 0x02c0 */ __u32 percpu_offset; /* 0x02c0 */
...@@ -380,7 +380,7 @@ struct _lowcore ...@@ -380,7 +380,7 @@ struct _lowcore
__u64 user_exec_asce; /* 0x0318 */ __u64 user_exec_asce; /* 0x0318 */
/* SMP info area */ /* SMP info area */
cpuid_t cpu_id; /* 0x0320 */ struct cpuid cpu_id; /* 0x0320 */
__u32 cpu_nr; /* 0x0328 */ __u32 cpu_nr; /* 0x0328 */
__u32 softirq_pending; /* 0x032c */ __u32 softirq_pending; /* 0x032c */
__u64 percpu_offset; /* 0x0330 */ __u64 percpu_offset; /* 0x0330 */
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define __ASM_S390_PROCESSOR_H #define __ASM_S390_PROCESSOR_H
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/cpuid.h> #include <asm/cpu.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
*/ */
#define current_text_addr() ({ void *pc; asm("basr %0,0" : "=a" (pc)); pc; }) #define current_text_addr() ({ void *pc; asm("basr %0,0" : "=a" (pc)); pc; })
static inline void get_cpu_id(cpuid_t *ptr) static inline void get_cpu_id(struct cpuid *ptr)
{ {
asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr)); asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr));
} }
......
...@@ -275,7 +275,7 @@ struct zcore_header { ...@@ -275,7 +275,7 @@ struct zcore_header {
u32 num_pages; u32 num_pages;
u32 pad1; u32 pad1;
u64 tod; u64 tod;
cpuid_t cpu_id; struct cpuid cpu_id;
u32 arch_id; u32 arch_id;
u32 volnr; u32 volnr;
u32 build_arch; u32 build_arch;
......
...@@ -657,8 +657,8 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high) ...@@ -657,8 +657,8 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
css->global_pgid.pgid_high.cpu_addr = 0; css->global_pgid.pgid_high.cpu_addr = 0;
#endif #endif
} }
css->global_pgid.cpu_id = ((cpuid_t *) __LC_CPUID)->ident; css->global_pgid.cpu_id = S390_lowcore.cpu_id.ident;
css->global_pgid.cpu_model = ((cpuid_t *) __LC_CPUID)->machine; css->global_pgid.cpu_model = S390_lowcore.cpu_id.machine;
css->global_pgid.tod_high = tod_high; css->global_pgid.tod_high = tod_high;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册