From: Benjamin Gray <bgray@linux.ibm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] powerpc/tlb: Implement book3s/32/tlbflush.h local_flush_tlb_page_psize
Date: Wed, 01 Feb 2023 08:58:43 +1100 [thread overview]
Message-ID: <1271da6e844106255546eb909f215ef816ad5c97.camel@linux.ibm.com> (raw)
In-Reply-To: <2de01197-54b6-0e96-5615-3cd212cfec83@csgroup.eu>
On Tue, 2023-01-31 at 06:33 +0000, Christophe Leroy wrote:
> I still think it is not the correct fix. You are putting the problem
> under the carpet instead of fixing it. There are many other places
> where
> radix_enabled() or other mmu_has_feature() are used with the
> expectation
> that one leg will be eliminated at build time.
And none of them are actively causing build failures AFAIK. I agree
that there may be a pre-existing optimisation problem, but I'm not
trying to address it in this patch. I'm just trying to fix the build I
broke. As such I haven't opened an issue with Clang yet either.
> As written in previous thread, have you considered reworking
> mmu_has_feature() to move the CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG
> after the below block:
>
> if (MMU_FTRS_ALWAYS & feature)
> return true;
>
> if (!(MMU_FTRS_POSSIBLE & feature))
> return false;
>
Yes, I did. I also discussed with Michael Ellerman what he would
prefer, and he indicated he still would still like to just implement
the function.
> Looking into it in more details, I'm even more puzzled. As far as I
> can
> see, local_flush_tlb_page_psize() is used only at one place, that is
> function __do_patch_instruction_mm(). So if Clang fails to identify
> it
> as a dead leg, it is the full __do_patch_instruction_mm() which is
> kept
> for no reason.
Right, because that is the function that's guarded behind
radix_enabled().
> By the way, I also see that local_flush_tlb_page_psize() for
> book3s/64
> does just nothing at all for non Radix. Is that correct ?
That is how the other local page flushes are implemented. If there's
some undocumented exception here I'd be relying on review on the list
from people who have experience with details of how Hash mmu is handled
on this platform.
next prev parent reply other threads:[~2023-01-31 22:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 2:58 [PATCH] powerpc/tlb: Implement book3s/32/tlbflush.h local_flush_tlb_page_psize Benjamin Gray
2023-01-31 6:33 ` Christophe Leroy
2023-01-31 21:58 ` Benjamin Gray [this message]
2023-02-01 10:16 ` Christophe Leroy
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=1271da6e844106255546eb909f215ef816ad5c97.camel@linux.ibm.com \
--to=bgray@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).