From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Guo Ren <guoren@kernel.org>, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Russell King <linux@armlinux.org.uk>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>, Theodore Ts'o <tytso@mit.edu>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Naveen N Rao <naveen@kernel.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: "Christophe Leroy" <christophe.leroy@csgroup.eu>,
linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, loongarch@lists.linux.dev,
linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH 27/28] powerpc: Split systemcfg struct definitions out from vdso
Date: Thu, 10 Oct 2024 09:01:29 +0200 [thread overview]
Message-ID: <20241010-vdso-generic-base-v1-27-b64f0842d512@linutronix.de> (raw)
In-Reply-To: <20241010-vdso-generic-base-v1-0-b64f0842d512@linutronix.de>
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>
---
arch/powerpc/include/asm/systemcfg.h | 52 ++++++++++++++++++++++++++++
arch/powerpc/include/asm/vdso_datapage.h | 37 --------------------
arch/powerpc/kernel/proc_powerpc.c | 1 +
arch/powerpc/kernel/setup-common.c | 1 +
arch/powerpc/kernel/smp.c | 1 +
arch/powerpc/kernel/time.c | 1 +
arch/powerpc/platforms/powernv/smp.c | 1 +
arch/powerpc/platforms/pseries/hotplug-cpu.c | 1 +
8 files changed, 58 insertions(+), 37 deletions(-)
diff --git a/arch/powerpc/include/asm/systemcfg.h b/arch/powerpc/include/asm/systemcfg.h
new file mode 100644
index 0000000000000000000000000000000000000000..2f9b1d6a5c98d10469f8533fe6781be437712eff
--- /dev/null
+++ b/arch/powerpc/include/asm/systemcfg.h
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#ifndef _SYSTEMCFG_H
+#define _SYSTEMCFG_H
+
+/*
+ * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM
+ * Copyright (C) 2005 Benjamin Herrenschmidy <benh@kernel.crashing.org>,
+ * IBM Corp.
+ */
+
+#ifdef CONFIG_PPC64
+
+/*
+ * If the major version changes we are incompatible.
+ * Minor version changes are a hint.
+ */
+#define SYSTEMCFG_MAJOR 1
+#define SYSTEMCFG_MINOR 1
+
+#include <linux/types.h>
+
+struct systemcfg {
+ __u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */
+ struct { /* Systemcfg version numbers */
+ __u32 major; /* Major number 0x10 */
+ __u32 minor; /* Minor number 0x14 */
+ } version;
+
+ /* Note about the platform flags: it now only contains the lpar
+ * bit. The actual platform number is dead and buried
+ */
+ __u32 platform; /* Platform flags 0x18 */
+ __u32 processor; /* Processor type 0x1C */
+ __u64 processorCount; /* # of physical processors 0x20 */
+ __u64 physicalMemorySize; /* Size of real memory(B) 0x28 */
+ __u64 tb_orig_stamp; /* (NU) Timebase at boot 0x30 */
+ __u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */
+ __u64 tb_to_xs; /* (NU) Inverse of TB to 2^20 0x40 */
+ __u64 stamp_xsec; /* (NU) 0x48 */
+ __u64 tb_update_count; /* (NU) Timebase atomicity ctr 0x50 */
+ __u32 tz_minuteswest; /* (NU) Min. west of Greenwich 0x58 */
+ __u32 tz_dsttime; /* (NU) Type of dst correction 0x5C */
+ __u32 dcache_size; /* L1 d-cache size 0x60 */
+ __u32 dcache_line_size; /* L1 d-cache line size 0x64 */
+ __u32 icache_size; /* L1 i-cache size 0x68 */
+ __u32 icache_line_size; /* L1 i-cache line size 0x6C */
+};
+
+extern struct systemcfg *systemcfg;
+
+#endif /* CONFIG_PPC64 */
+#endif /* _SYSTEMCFG_H */
diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
index 8b91b1d34ff639a0efb80b9cdd7274f785643153..a9686310be2cb8c8229d67fed31f332d04919557 100644
--- a/arch/powerpc/include/asm/vdso_datapage.h
+++ b/arch/powerpc/include/asm/vdso_datapage.h
@@ -9,14 +9,6 @@
* IBM Corp.
*/
-
-/*
- * If the major version changes we are incompatible.
- * Minor version changes are a hint.
- */
-#define SYSTEMCFG_MAJOR 1
-#define SYSTEMCFG_MINOR 1
-
#ifndef __ASSEMBLY__
#include <linux/unistd.h>
@@ -27,35 +19,6 @@
#ifdef CONFIG_PPC64
-struct systemcfg {
- __u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */
- struct { /* Systemcfg version numbers */
- __u32 major; /* Major number 0x10 */
- __u32 minor; /* Minor number 0x14 */
- } version;
-
- /* Note about the platform flags: it now only contains the lpar
- * bit. The actual platform number is dead and buried
- */
- __u32 platform; /* Platform flags 0x18 */
- __u32 processor; /* Processor type 0x1C */
- __u64 processorCount; /* # of physical processors 0x20 */
- __u64 physicalMemorySize; /* Size of real memory(B) 0x28 */
- __u64 tb_orig_stamp; /* (NU) Timebase at boot 0x30 */
- __u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */
- __u64 tb_to_xs; /* (NU) Inverse of TB to 2^20 0x40 */
- __u64 stamp_xsec; /* (NU) 0x48 */
- __u64 tb_update_count; /* (NU) Timebase atomicity ctr 0x50 */
- __u32 tz_minuteswest; /* (NU) Min. west of Greenwich 0x58 */
- __u32 tz_dsttime; /* (NU) Type of dst correction 0x5C */
- __u32 dcache_size; /* L1 d-cache size 0x60 */
- __u32 dcache_line_size; /* L1 d-cache line size 0x64 */
- __u32 icache_size; /* L1 i-cache size 0x68 */
- __u32 icache_line_size; /* L1 i-cache line size 0x6C */
-};
-
-extern struct systemcfg *systemcfg;
-
struct vdso_arch_data {
__u64 tb_ticks_per_sec; /* Timebase tics / sec */
__u32 dcache_block_size; /* L1 d-cache block size */
diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch/powerpc/kernel/proc_powerpc.c
index e8083e05a1d03f74d9f24bac99e3ab526368c8e2..3816a2bf2b844ff49f6fd22cc42e733d5ef72b36 100644
--- a/arch/powerpc/kernel/proc_powerpc.c
+++ b/arch/powerpc/kernel/proc_powerpc.c
@@ -13,6 +13,7 @@
#include <asm/machdep.h>
#include <asm/vdso_datapage.h>
#include <asm/rtas.h>
+#include <asm/systemcfg.h>
#include <linux/uaccess.h>
#ifdef CONFIG_PPC64_PROC_SYSTEMCFG
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index d0b32ff2bc8dedc5aa7afce17f07a5c7c255387c..0b732d3b283b199b19e078d45ffe4cb0325b7e63 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -67,6 +67,7 @@
#include <asm/cpu_has_feature.h>
#include <asm/kasan.h>
#include <asm/mce.h>
+#include <asm/systemcfg.h>
#include "setup.h"
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 87ae45bf1045d8974e3eed09e284bc582310f3e2..5ac7084eebc0b8c5ab16d96c89cadde953003431 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -61,6 +61,7 @@
#include <asm/ftrace.h>
#include <asm/kup.h>
#include <asm/fadump.h>
+#include <asm/systemcfg.h>
#include <trace/events/ipi.h>
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 6c53a0153c0d1c7cd74017a4dadb09ba149e456f..f959f4bdde2f5cd886bf7db1f9f65366775f94c7 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -71,6 +71,7 @@
#include <asm/vdso_datapage.h>
#include <asm/firmware.h>
#include <asm/mce.h>
+#include <asm/systemcfg.h>
/* powerpc clocksource/clockevent code */
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 672209428b98459ef0a5595c0ec7128a5c5f17a2..2e9da58195f51ccfc13b5e0b95d2626937186a3e 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -36,6 +36,7 @@
#include <asm/kexec.h>
#include <asm/reg.h>
#include <asm/powernv.h>
+#include <asm/systemcfg.h>
#include "powernv.h"
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 7b80d35d045dc9d947c0b512a58a82ef7398150d..bc6926dbf14890881eacf4eb8df010d2f465c79f 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -33,6 +33,7 @@
#include <asm/xive.h>
#include <asm/plpar_wrappers.h>
#include <asm/topology.h>
+#include <asm/systemcfg.h>
#include "pseries.h"
--
2.47.0
next prev parent reply other threads:[~2024-10-10 7:02 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 7:01 [PATCH 00/28] vdso: Preparations for generic data storage Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 01/28] csky/vdso: Remove gettimeofday() and friends from VDSO Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 02/28] csky/vdso: Remove arch_vma_name() Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 03/28] s390/vdso: Drop LBASE_VDSO Thomas Weißschuh
2024-10-10 7:54 ` Heiko Carstens
2024-10-10 7:01 ` [PATCH 04/28] arm64: vdso: " Thomas Weißschuh
2024-10-28 18:01 ` Will Deacon
2024-10-10 7:01 ` [PATCH 05/28] arm64: vdso: Use only one single vvar mapping Thomas Weißschuh
2024-10-28 18:39 ` Will Deacon
2024-10-10 7:01 ` [PATCH 06/28] riscv: " Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 07/28] arm: vdso: Remove assembly for datapage access Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 08/28] LoongArch: vDSO: Use vdso/datapage.h to access vDSO data Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 09/28] MIPS: vdso: Avoid name conflict around "vdso_data" Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 10/28] x86/mm/mmap: Remove arch_vma_name() Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 11/28] x86: vdso: Use __arch_get_vdso_data() to access vdso data Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 12/28] x86: vdso: Place vdso_data at beginning of vvar page Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 13/28] x86: vdso: Access rng data from kernel without vvar Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 14/28] x86: vdso: Allocate vvar page from C code Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 15/28] x86: vdso: Access timens vdso data without vvar.h Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 16/28] x86: vdso: Access rng " Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 17/28] x86: vdso: Move the rng offset to vsyscall.h Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 18/28] x86: vdso: Access vdso data without vvar.h Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 19/28] x86: vdso: Delete vvar.h Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 20/28] x86: vdso: Split virtual clock pages into dedicated mapping Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 21/28] powerpc: vdso: Remove offset comment from 32bit vdso_arch_data Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 22/28] powerpc: procfs: Propagate error of remap_pfn_range() Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 23/28] powerpc/pseries/lparcfg: Fix printing of system_active_processors Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 24/28] powerpc/pseries/lparcfg: Use num_possible_cpus() for potential processors Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 25/28] powerpc: Add kconfig option for the systemcfg page Thomas Weißschuh
2024-10-10 7:01 ` [PATCH 26/28] powerpc: Split systemcfg data out of vdso data page Thomas Weißschuh
2024-10-10 7:01 ` Thomas Weißschuh [this message]
2024-10-10 7:01 ` [PATCH 28/28] vdso: Rename struct arch_vdso_data to arch_vdso_time_data Thomas Weißschuh
2024-10-10 7:55 ` Heiko Carstens
2024-10-30 11:39 ` [PATCH 00/28] vdso: Preparations for generic data storage Thomas Gleixner
2024-11-05 14:04 ` Christophe Leroy
2024-11-06 7:06 ` Michael Ellerman
2024-12-11 22:33 ` patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241010-vdso-generic-base-v1-27-b64f0842d512@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=Jason@zx2c4.com \
--cc=agordeev@linux.ibm.com \
--cc=aou@eecs.berkeley.edu \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=gor@linux.ibm.com \
--cc=guoren@kernel.org \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=kernel@xen0n.name \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=luto@kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=tytso@mit.edu \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).