Commit c22c06b4 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Thomas Gleixner
Browse files

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: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241010-vdso-generic-base-v1-25-b64f0842d512@linutronix.de
parent e07359f1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1298,6 +1298,14 @@ config MODULES_SIZE

endmenu

config PPC64_PROC_SYSTEMCFG
	def_bool y
	depends on PPC64 && PROC_FS
	help
	  This option enables the presence of /proc/ppc64/systemcfg through
	  which the systemcfg page can be accessed.
	  This interface only exists for backwards-compatibility.

if PPC64
# This value must have zeroes in the bottom 60 bits otherwise lots will break
config PAGE_OFFSET
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include <asm/rtas.h>
#include <linux/uaccess.h>

#ifdef CONFIG_PPC64
#ifdef CONFIG_PPC64_PROC_SYSTEMCFG

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

#endif /* CONFIG_PPC64 */
#endif /* CONFIG_PPC64_PROC_SYSTEMCFG */

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