From: "Radim Krčmář" <rkrcmar@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Frederic Weisbecker" <fweisbec@gmail.com>,
"Al Viro" <viro@zeniv.linux.org.uk>
Subject: [PATCH 7/7] init: execute jump_label_init() earlier
Date: Thu, 17 Oct 2013 12:10:30 +0200 [thread overview]
Message-ID: <1382004631-25895-8-git-send-email-rkrcmar@redhat.com> (raw)
In-Reply-To: <1382004631-25895-1-git-send-email-rkrcmar@redhat.com>
Patching of jump labels does not have to depend on any other init code,
so we should do it as soon as possible because static_keys cannot be
used before that.
If we find it does depend on something, the init case of patching should
be modified.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
There should be no reason to use static_key_enabled() now, I'll remove
it from api in following series if there are no objections.
I would also feel a bit safer with disabled interrupts, but it might not
be required.
init/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/init/main.c b/init/main.c
index 63d3e8f..c84fbb9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -489,6 +489,11 @@ asmlinkage void __init start_kernel(void)
*/
boot_init_stack_canary();
+ /*
+ * Jump labels have undefined semantics before initialization
+ */
+ jump_label_init();
+
cgroup_init_early();
local_irq_disable();
@@ -518,7 +523,6 @@ asmlinkage void __init start_kernel(void)
__stop___param - __start___param,
-1, -1, &unknown_bootoption);
- jump_label_init();
/*
* These use large bootmem allocations and must precede
--
1.8.3.1
next prev parent reply other threads:[~2013-10-17 10:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 10:10 [PATCH 0/7] static_key: fix timer bugs & change api (a bit) Radim Krčmář
2013-10-17 10:10 ` [PATCH 1/7] static_key: flush rate limit timer on rmmod Radim Krčmář
2013-10-17 10:35 ` Paolo Bonzini
2013-10-18 7:24 ` Radim Krčmář
2013-10-17 10:10 ` [PATCH 2/7] static_key: add static_key_slow_inc_deferred() Radim Krčmář
2013-10-17 10:10 ` [PATCH 3/7] static_key: keep deferred enabled counter debt Radim Krčmář
2013-10-17 10:10 ` [PATCH 4/7] static_key: use static_key_slow_inc_deferred() Radim Krčmář
2013-10-17 10:39 ` Paolo Bonzini
2013-10-18 7:29 ` Radim Krčmář
2013-10-17 10:10 ` [PATCH 5/7] jump_label: relax branch hinting restrictions Radim Krčmář
2013-10-17 17:35 ` Steven Rostedt
2013-10-18 7:30 ` Radim Krčmář
2013-10-17 10:10 ` Radim Krčmář [this message]
2013-10-17 10:43 ` [PATCH 0/7] static_key: fix timer bugs & change api (a bit) Paolo Bonzini
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=1382004631-25895-8-git-send-email-rkrcmar@redhat.com \
--to=rkrcmar@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®