mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
sparc: mv sparc sysctls into their own file under arch/sparc/kernel
Move sparc sysctls (reboot-cmd, stop-a, scons-poweroff and tsb-ratio) into a new file (arch/sparc/kernel/setup.c). This file will be included for both 32 and 64 bit sparc. Leave "tsb-ratio" under SPARC64 ifdef as it was in kernel/sysctl.c. The sysctl table register is called with arch_initcall placing it after its original place in proc_root_init. This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados <joel.granados@kernel.org>
This commit is contained in:
@@ -35,6 +35,7 @@ obj-y += process.o
|
|||||||
obj-y += signal_$(BITS).o
|
obj-y += signal_$(BITS).o
|
||||||
obj-y += sigutil_$(BITS).o
|
obj-y += sigutil_$(BITS).o
|
||||||
obj-$(CONFIG_SPARC32) += ioport.o
|
obj-$(CONFIG_SPARC32) += ioport.o
|
||||||
|
obj-y += setup.o
|
||||||
obj-y += setup_$(BITS).o
|
obj-y += setup_$(BITS).o
|
||||||
obj-y += idprom.o
|
obj-y += idprom.o
|
||||||
obj-y += sys_sparc_$(BITS).o
|
obj-y += sys_sparc_$(BITS).o
|
||||||
|
|||||||
46
arch/sparc/kernel/setup.c
Normal file
46
arch/sparc/kernel/setup.c
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
#include <asm/setup.h>
|
||||||
|
#include <linux/sysctl.h>
|
||||||
|
|
||||||
|
static const struct ctl_table sparc_sysctl_table[] = {
|
||||||
|
{
|
||||||
|
.procname = "reboot-cmd",
|
||||||
|
.data = reboot_command,
|
||||||
|
.maxlen = 256,
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dostring,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.procname = "stop-a",
|
||||||
|
.data = &stop_a_enabled,
|
||||||
|
.maxlen = sizeof(int),
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dointvec,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.procname = "scons-poweroff",
|
||||||
|
.data = &scons_pwroff,
|
||||||
|
.maxlen = sizeof(int),
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dointvec,
|
||||||
|
},
|
||||||
|
#ifdef CONFIG_SPARC64
|
||||||
|
{
|
||||||
|
.procname = "tsb-ratio",
|
||||||
|
.data = &sysctl_tsb_ratio,
|
||||||
|
.maxlen = sizeof(int),
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dointvec,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static int __init init_sparc_sysctls(void)
|
||||||
|
{
|
||||||
|
register_sysctl_init("kernel", sparc_sysctl_table);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
arch_initcall(init_sparc_sysctls);
|
||||||
@@ -60,9 +60,6 @@
|
|||||||
#include <asm/nmi.h>
|
#include <asm/nmi.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SPARC
|
|
||||||
#include <asm/setup.h>
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RT_MUTEXES
|
#ifdef CONFIG_RT_MUTEXES
|
||||||
#include <linux/rtmutex.h>
|
#include <linux/rtmutex.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -1601,38 +1598,6 @@ static const struct ctl_table kern_table[] = {
|
|||||||
.extra2 = SYSCTL_ONE,
|
.extra2 = SYSCTL_ONE,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SPARC
|
|
||||||
{
|
|
||||||
.procname = "reboot-cmd",
|
|
||||||
.data = reboot_command,
|
|
||||||
.maxlen = 256,
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dostring,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.procname = "stop-a",
|
|
||||||
.data = &stop_a_enabled,
|
|
||||||
.maxlen = sizeof (int),
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dointvec,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.procname = "scons-poweroff",
|
|
||||||
.data = &scons_pwroff,
|
|
||||||
.maxlen = sizeof (int),
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dointvec,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SPARC64
|
|
||||||
{
|
|
||||||
.procname = "tsb-ratio",
|
|
||||||
.data = &sysctl_tsb_ratio,
|
|
||||||
.maxlen = sizeof (int),
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dointvec,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_PARISC
|
#ifdef CONFIG_PARISC
|
||||||
{
|
{
|
||||||
.procname = "soft-power",
|
.procname = "soft-power",
|
||||||
|
|||||||
Reference in New Issue
Block a user