LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Nicholas Miehlbradt <nicholas@linux.ibm.com>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] Add static_key_feature_checks_initialized flag
Date: Wed, 27 Mar 2024 15:20:14 +0000	[thread overview]
Message-ID: <65caab3e-8618-4045-8bb9-75a2548d7cd7@csgroup.eu> (raw)
In-Reply-To: <20240327045911.64543-1-nicholas@linux.ibm.com>



Le 27/03/2024 à 05:59, Nicholas Miehlbradt a écrit :
> JUMP_LABEL_FEATURE_CHECK_DEBUG used static_key_initialized to determine
> whether {cpu,mmu}_has_feature() was used before static keys were
> initialized. However, {cpu,mmu}_has_feature() should not be used before
> setup_feature_keys() is called. As static_key_initalized is set much
> earlier during boot there is a window in which JUMP_LABEL_FEATURE_CHECK_DEBUG
> will not report errors. Add a flag specifically to indicate when
> {cpu,mmu}_has_feature() is safe to use.

What do you mean by "much earlier" ?

As far as I can see, static_key_initialized is set by jump_label_init() 
as cpu_feature_keys_init() and mmu_feature_keys_init() are call 
immediately after. I don't think it is possible to do anything inbetween.

Or maybe you mean the problem is the call to jump_label_init() in 
early_init_devtree() ? You should make it explicit in the message, and 
see if it wouldn't be better to call cpu_feature_keys_init() and 
mmu_feature_keys_init() as well in early_init_devtree() in that case ?

Christophe

  reply	other threads:[~2024-03-27 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  4:59 [PATCH] Add static_key_feature_checks_initialized flag Nicholas Miehlbradt
2024-03-27 15:20 ` Christophe Leroy [this message]
2024-04-02  1:53   ` Nicholas Miehlbradt
2024-04-02  1:57   ` Nicholas Miehlbradt

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=65caab3e-8618-4045-8bb9-75a2548d7cd7@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nicholas@linux.ibm.com \
    /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