LKML Archive on
help / color / mirror / Atom feed
From: Arnd Bergmann <>
To: Christophe Leroy <>
Cc: Anders Roxell <>,
	Benjamin Herrenschmidt <>,
	Paul Mackerras <>, Arnd Bergmann <>,, Nick Desaulniers <>,
	Linux Kernel Mailing List <>,
	Nathan Chancellor <>,
	linuxppc-dev <>
Subject: Re: [PATCH] powerpc: mm: radix_tlb: rearrange the if-else block
Date: Fri, 26 Nov 2021 14:59:29 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Nov 26, 2021 at 2:43 PM Christophe Leroy
<> wrote:
> Le 25/11/2021 à 16:44, Anders Roxell a écrit :
> Can't you fix CLANG instead :) ?
> Or just add an else to the IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) that
> sets hstart and hend to 0 ?

That doesn't sound any less risky than duplicating the code, it can lead to
incorrect changes just as easily if a patch ends up actually flushing at the
wrong address, and the compiler fails to complain because of the bogus

> Or just put hstart and hend calculation outside the IS_ENABLED() ? After
> all GCC should drop the calculation when not used.

I like this one. I'm still unsure how clang can get so confused about whether
the variables are initialized or not, usually it handles this much better than
gcc. My best guess is that one of the memory clobbers makes it conclude
that 'hflush' can be true when it gets written to by an inline asm.


  reply	other threads:[~2021-11-26 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 15:44 Anders Roxell
2021-11-26 13:43 ` Christophe Leroy
2021-11-26 13:59   ` Arnd Bergmann [this message]
2021-11-26 15:46     ` Nathan Chancellor
2021-11-26 16:25       ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] powerpc: mm: radix_tlb: rearrange the if-else block' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).