Skip to content

Commit 6142be7

Browse files
t-8chKAGA-KOKO
authored andcommitted
powerpc: Split systemcfg struct definitions out from vdso
The systemcfg data has nothing to do anymore with the vdso. Split it into a dedicated header file. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20241010-vdso-generic-base-v1-27-b64f0842d512@linutronix.de
1 parent 1184674 commit 6142be7

File tree

8 files changed

+58
-37
lines changed

8 files changed

+58
-37
lines changed

arch/powerpc/include/asm/systemcfg.h

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/* SPDX-License-Identifier: GPL-2.0-or-later */
2+
#ifndef _SYSTEMCFG_H
3+
#define _SYSTEMCFG_H
4+
5+
/*
6+
* Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM
7+
* Copyright (C) 2005 Benjamin Herrenschmidy <benh@kernel.crashing.org>,
8+
* IBM Corp.
9+
*/
10+
11+
#ifdef CONFIG_PPC64
12+
13+
/*
14+
* If the major version changes we are incompatible.
15+
* Minor version changes are a hint.
16+
*/
17+
#define SYSTEMCFG_MAJOR 1
18+
#define SYSTEMCFG_MINOR 1
19+
20+
#include <linux/types.h>
21+
22+
struct systemcfg {
23+
__u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */
24+
struct { /* Systemcfg version numbers */
25+
__u32 major; /* Major number 0x10 */
26+
__u32 minor; /* Minor number 0x14 */
27+
} version;
28+
29+
/* Note about the platform flags: it now only contains the lpar
30+
* bit. The actual platform number is dead and buried
31+
*/
32+
__u32 platform; /* Platform flags 0x18 */
33+
__u32 processor; /* Processor type 0x1C */
34+
__u64 processorCount; /* # of physical processors 0x20 */
35+
__u64 physicalMemorySize; /* Size of real memory(B) 0x28 */
36+
__u64 tb_orig_stamp; /* (NU) Timebase at boot 0x30 */
37+
__u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */
38+
__u64 tb_to_xs; /* (NU) Inverse of TB to 2^20 0x40 */
39+
__u64 stamp_xsec; /* (NU) 0x48 */
40+
__u64 tb_update_count; /* (NU) Timebase atomicity ctr 0x50 */
41+
__u32 tz_minuteswest; /* (NU) Min. west of Greenwich 0x58 */
42+
__u32 tz_dsttime; /* (NU) Type of dst correction 0x5C */
43+
__u32 dcache_size; /* L1 d-cache size 0x60 */
44+
__u32 dcache_line_size; /* L1 d-cache line size 0x64 */
45+
__u32 icache_size; /* L1 i-cache size 0x68 */
46+
__u32 icache_line_size; /* L1 i-cache line size 0x6C */
47+
};
48+
49+
extern struct systemcfg *systemcfg;
50+
51+
#endif /* CONFIG_PPC64 */
52+
#endif /* _SYSTEMCFG_H */

arch/powerpc/include/asm/vdso_datapage.h

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@
99
* IBM Corp.
1010
*/
1111

12-
13-
/*
14-
* If the major version changes we are incompatible.
15-
* Minor version changes are a hint.
16-
*/
17-
#define SYSTEMCFG_MAJOR 1
18-
#define SYSTEMCFG_MINOR 1
19-
2012
#ifndef __ASSEMBLY__
2113

2214
#include <linux/unistd.h>
@@ -27,35 +19,6 @@
2719

2820
#ifdef CONFIG_PPC64
2921

30-
struct systemcfg {
31-
__u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */
32-
struct { /* Systemcfg version numbers */
33-
__u32 major; /* Major number 0x10 */
34-
__u32 minor; /* Minor number 0x14 */
35-
} version;
36-
37-
/* Note about the platform flags: it now only contains the lpar
38-
* bit. The actual platform number is dead and buried
39-
*/
40-
__u32 platform; /* Platform flags 0x18 */
41-
__u32 processor; /* Processor type 0x1C */
42-
__u64 processorCount; /* # of physical processors 0x20 */
43-
__u64 physicalMemorySize; /* Size of real memory(B) 0x28 */
44-
__u64 tb_orig_stamp; /* (NU) Timebase at boot 0x30 */
45-
__u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */
46-
__u64 tb_to_xs; /* (NU) Inverse of TB to 2^20 0x40 */
47-
__u64 stamp_xsec; /* (NU) 0x48 */
48-
__u64 tb_update_count; /* (NU) Timebase atomicity ctr 0x50 */
49-
__u32 tz_minuteswest; /* (NU) Min. west of Greenwich 0x58 */
50-
__u32 tz_dsttime; /* (NU) Type of dst correction 0x5C */
51-
__u32 dcache_size; /* L1 d-cache size 0x60 */
52-
__u32 dcache_line_size; /* L1 d-cache line size 0x64 */
53-
__u32 icache_size; /* L1 i-cache size 0x68 */
54-
__u32 icache_line_size; /* L1 i-cache line size 0x6C */
55-
};
56-
57-
extern struct systemcfg *systemcfg;
58-
5922
struct vdso_arch_data {
6023
__u64 tb_ticks_per_sec; /* Timebase tics / sec */
6124
__u32 dcache_block_size; /* L1 d-cache block size */

arch/powerpc/kernel/proc_powerpc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <asm/machdep.h>
1414
#include <asm/vdso_datapage.h>
1515
#include <asm/rtas.h>
16+
#include <asm/systemcfg.h>
1617
#include <linux/uaccess.h>
1718

1819
#ifdef CONFIG_PPC64_PROC_SYSTEMCFG

arch/powerpc/kernel/setup-common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#include <asm/cpu_has_feature.h>
6868
#include <asm/kasan.h>
6969
#include <asm/mce.h>
70+
#include <asm/systemcfg.h>
7071

7172
#include "setup.h"
7273

arch/powerpc/kernel/smp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
#include <asm/ftrace.h>
6262
#include <asm/kup.h>
6363
#include <asm/fadump.h>
64+
#include <asm/systemcfg.h>
6465

6566
#include <trace/events/ipi.h>
6667

arch/powerpc/kernel/time.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
#include <asm/vdso_datapage.h>
7272
#include <asm/firmware.h>
7373
#include <asm/mce.h>
74+
#include <asm/systemcfg.h>
7475

7576
/* powerpc clocksource/clockevent code */
7677

arch/powerpc/platforms/powernv/smp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <asm/kexec.h>
3737
#include <asm/reg.h>
3838
#include <asm/powernv.h>
39+
#include <asm/systemcfg.h>
3940

4041
#include "powernv.h"
4142

arch/powerpc/platforms/pseries/hotplug-cpu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <asm/xive.h>
3434
#include <asm/plpar_wrappers.h>
3535
#include <asm/topology.h>
36+
#include <asm/systemcfg.h>
3637

3738
#include "pseries.h"
3839

0 commit comments

Comments
 (0)