Skip to content

Commit e86a6ed

Browse files
heicarstMartin Schwidefsky
authored andcommitted
[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: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 4bb5e07 commit e86a6ed

7 files changed

Lines changed: 31 additions & 36 deletions

File tree

‎arch/s390/include/asm/cpu.h‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
1+
/*
2+
* Copyright IBM Corp. 2000,2009
3+
* Author(s): Hartmut Penner <hp@de.ibm.com>,
4+
* Martin Schwidefsky <schwidefsky@de.ibm.com>,
5+
* Christian Ehrhardt <ehrhardt@de.ibm.com>,
6+
*/
7+
18
#ifndef _ASM_S390_CPU_H
29
#define _ASM_S390_CPU_H
310

411
#define MAX_CPU_ADDRESS 255
512

13+
#ifndef __ASSEMBLY__
14+
15+
#include <linux/types.h>
16+
17+
struct cpuid
18+
{
19+
unsigned int version : 8;
20+
unsigned int ident : 24;
21+
unsigned int machine : 16;
22+
unsigned int unused : 16;
23+
} __packed;
24+
25+
#endif /* __ASSEMBLY__ */
626
#endif /* _ASM_S390_CPU_H */

‎arch/s390/include/asm/cpuid.h‎

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎arch/s390/include/asm/kvm_host.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <linux/interrupt.h>
1818
#include <linux/kvm_host.h>
1919
#include <asm/debug.h>
20-
#include <asm/cpuid.h>
20+
#include <asm/cpu.h>
2121

2222
#define KVM_MAX_VCPUS 64
2323
#define KVM_MEMORY_SLOTS 32
@@ -217,8 +217,8 @@ struct kvm_vcpu_arch {
217217
struct hrtimer ckc_timer;
218218
struct tasklet_struct tasklet;
219219
union {
220-
cpuid_t cpu_id;
221-
u64 stidp_data;
220+
struct cpuid cpu_id;
221+
u64 stidp_data;
222222
};
223223
};
224224

‎arch/s390/include/asm/lowcore.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132

133133
#ifndef __ASSEMBLY__
134134

135-
#include <asm/cpuid.h>
135+
#include <asm/cpu.h>
136136
#include <asm/ptrace.h>
137137
#include <linux/types.h>
138138

@@ -275,7 +275,7 @@ struct _lowcore
275275
__u32 user_exec_asce; /* 0x02ac */
276276

277277
/* SMP info area */
278-
cpuid_t cpu_id; /* 0x02b0 */
278+
struct cpuid cpu_id; /* 0x02b0 */
279279
__u32 cpu_nr; /* 0x02b8 */
280280
__u32 softirq_pending; /* 0x02bc */
281281
__u32 percpu_offset; /* 0x02c0 */
@@ -380,7 +380,7 @@ struct _lowcore
380380
__u64 user_exec_asce; /* 0x0318 */
381381

382382
/* SMP info area */
383-
cpuid_t cpu_id; /* 0x0320 */
383+
struct cpuid cpu_id; /* 0x0320 */
384384
__u32 cpu_nr; /* 0x0328 */
385385
__u32 softirq_pending; /* 0x032c */
386386
__u64 percpu_offset; /* 0x0330 */

‎arch/s390/include/asm/processor.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define __ASM_S390_PROCESSOR_H
1515

1616
#include <linux/linkage.h>
17-
#include <asm/cpuid.h>
17+
#include <asm/cpu.h>
1818
#include <asm/page.h>
1919
#include <asm/ptrace.h>
2020
#include <asm/setup.h>
@@ -26,7 +26,7 @@
2626
*/
2727
#define current_text_addr() ({ void *pc; asm("basr %0,0" : "=a" (pc)); pc; })
2828

29-
static inline void get_cpu_id(cpuid_t *ptr)
29+
static inline void get_cpu_id(struct cpuid *ptr)
3030
{
3131
asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr));
3232
}

‎drivers/s390/char/zcore.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ struct zcore_header {
275275
u32 num_pages;
276276
u32 pad1;
277277
u64 tod;
278-
cpuid_t cpu_id;
278+
struct cpuid cpu_id;
279279
u32 arch_id;
280280
u32 volnr;
281281
u32 build_arch;

‎drivers/s390/cio/css.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
657657
css->global_pgid.pgid_high.cpu_addr = 0;
658658
#endif
659659
}
660-
css->global_pgid.cpu_id = ((cpuid_t *) __LC_CPUID)->ident;
661-
css->global_pgid.cpu_model = ((cpuid_t *) __LC_CPUID)->machine;
660+
css->global_pgid.cpu_id = S390_lowcore.cpu_id.ident;
661+
css->global_pgid.cpu_model = S390_lowcore.cpu_id.machine;
662662
css->global_pgid.tod_high = tod_high;
663663

664664
}

0 commit comments

Comments
 (0)