Skip to content

Commit c22c06b

Browse files
t-8chKAGA-KOKO
authored andcommitted
powerpc: Add kconfig option for the systemcfg page
The systemcfg page through procfs is only a backwards-compatible interface for very old applications. Make it possible to be disabled. This also creates a convenient config #define to guard any accesses to the systemcfg page. 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-25-b64f0842d512@linutronix.de
1 parent e07359f commit c22c06b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

arch/powerpc/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,14 @@ config MODULES_SIZE
12981298

12991299
endmenu
13001300

1301+
config PPC64_PROC_SYSTEMCFG
1302+
def_bool y
1303+
depends on PPC64 && PROC_FS
1304+
help
1305+
This option enables the presence of /proc/ppc64/systemcfg through
1306+
which the systemcfg page can be accessed.
1307+
This interface only exists for backwards-compatibility.
1308+
13011309
if PPC64
13021310
# This value must have zeroes in the bottom 60 bits otherwise lots will break
13031311
config PAGE_OFFSET

arch/powerpc/kernel/proc_powerpc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <asm/rtas.h>
1515
#include <linux/uaccess.h>
1616

17-
#ifdef CONFIG_PPC64
17+
#ifdef CONFIG_PPC64_PROC_SYSTEMCFG
1818

1919
static loff_t page_map_seek(struct file *file, loff_t off, int whence)
2020
{
@@ -59,7 +59,7 @@ static int __init proc_ppc64_init(void)
5959
}
6060
__initcall(proc_ppc64_init);
6161

62-
#endif /* CONFIG_PPC64 */
62+
#endif /* CONFIG_PPC64_PROC_SYSTEMCFG */
6363

6464
/*
6565
* Create the ppc64 and ppc64/rtas directories early. This allows us to

0 commit comments

Comments
 (0)