Message ID | 1487498660-16600-5-git-send-email-hoeun.ryu@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 2017-02-19 19:04:08 [+0900], Hoeun Ryu wrote: > It would be good that `__ro_mostly_after_init` is marked to cpuhp state > objects. why? Sebastian
> On 20 Feb 2017, at 5:20 PM, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > > On 2017-02-19 19:04:08 [+0900], Hoeun Ryu wrote: >> It would be good that `__ro_mostly_after_init` is marked to cpuhp state >> objects. > why? > I’m requesting for comments of a new feature called __ro_mostly_after_init section marker. It’s similar to __ro_after_init, but the section can be writable for some point of time. Please see the cover letter [1] and the first patch [2]. [1] : https://lkml.org/lkml/2017/2/19/29 [2] : https://lkml.org/lkml/2017/2/19/32 > Sebastian
diff --git a/kernel/cpu.c b/kernel/cpu.c index 0a5f630..12ad4c2 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1126,7 +1126,7 @@ core_initcall(cpu_hotplug_pm_sync_init); #endif /* CONFIG_SMP */ /* Boot processor state steps */ -static struct cpuhp_step cpuhp_bp_states[] = { +static struct cpuhp_step cpuhp_bp_states[] __ro_mostly_after_init = { [CPUHP_OFFLINE] = { .name = "offline", .startup.single = NULL, @@ -1212,7 +1212,7 @@ static struct cpuhp_step cpuhp_bp_states[] = { }; /* Application processor state steps */ -static struct cpuhp_step cpuhp_ap_states[] = { +static struct cpuhp_step cpuhp_ap_states[] __ro_mostly_after_init = { #ifdef CONFIG_SMP /* Final state before CPU kills itself */ [CPUHP_AP_IDLE_DEAD] = {
It would be good that `__ro_mostly_after_init` is marked to cpuhp state objects. They can not be simply marked as `__ro_after_init` because they should be writable during module_init/exit. Now that they can be read-only except during module_init/exit Signed-off-by: Hoeun Ryu <hoeun.ryu@gmail.com> --- kernel/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)