Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
6142be7e 1184674d

+58 -37
+52
arch/powerpc/include/asm/systemcfg.h
··· 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 */
-37
arch/powerpc/include/asm/vdso_datapage.h
··· 9 9 * IBM Corp. 10 10 */ 11 11 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 12 #ifndef __ASSEMBLY__ 21 13 22 14 #include <linux/unistd.h> ··· 18 26 #define SYSCALL_MAP_SIZE ((NR_syscalls + 31) / 32) 19 27 20 28 #ifdef CONFIG_PPC64 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 29 51 30 struct vdso_arch_data { 52 31 __u64 tb_ticks_per_sec; /* Timebase tics / sec */
+1
arch/powerpc/kernel/proc_powerpc.c
··· 13 13 #include <asm/machdep.h> 14 14 #include <asm/vdso_datapage.h> 15 15 #include <asm/rtas.h> 16 + #include <asm/systemcfg.h> 16 17 #include <linux/uaccess.h> 17 18 18 19 #ifdef CONFIG_PPC64_PROC_SYSTEMCFG
+1
arch/powerpc/kernel/setup-common.c
··· 67 67 #include <asm/cpu_has_feature.h> 68 68 #include <asm/kasan.h> 69 69 #include <asm/mce.h> 70 + #include <asm/systemcfg.h> 70 71 71 72 #include "setup.h" 72 73
+1
arch/powerpc/kernel/smp.c
··· 61 61 #include <asm/ftrace.h> 62 62 #include <asm/kup.h> 63 63 #include <asm/fadump.h> 64 + #include <asm/systemcfg.h> 64 65 65 66 #include <trace/events/ipi.h> 66 67
+1
arch/powerpc/kernel/time.c
··· 71 71 #include <asm/vdso_datapage.h> 72 72 #include <asm/firmware.h> 73 73 #include <asm/mce.h> 74 + #include <asm/systemcfg.h> 74 75 75 76 /* powerpc clocksource/clockevent code */ 76 77
+1
arch/powerpc/platforms/powernv/smp.c
··· 36 36 #include <asm/kexec.h> 37 37 #include <asm/reg.h> 38 38 #include <asm/powernv.h> 39 + #include <asm/systemcfg.h> 39 40 40 41 #include "powernv.h" 41 42
+1
arch/powerpc/platforms/pseries/hotplug-cpu.c
··· 33 33 #include <asm/xive.h> 34 34 #include <asm/plpar_wrappers.h> 35 35 #include <asm/topology.h> 36 + #include <asm/systemcfg.h> 36 37 37 38 #include "pseries.h" 38 39