public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Vladimir Murzin <vladimir.murzin@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: Move the LSE gas support detection to Kconfig
Date: Tue, 14 Jan 2020 17:19:07 +0000	[thread overview]
Message-ID: <20200114171906.GF2579@willie-the-truck> (raw)
In-Reply-To: <20200113113613.GA1876@arrakis.emea.arm.com>

On Mon, Jan 13, 2020 at 11:36:14AM +0000, Catalin Marinas wrote:
> On Fri, Jan 10, 2020 at 03:45:43PM +0000, Will Deacon wrote:
> > On Fri, Jan 10, 2020 at 03:30:14PM +0000, Catalin Marinas wrote:
> > > On Fri, Jan 10, 2020 at 12:08:26PM +0000, Will Deacon wrote:
> > > > On Fri, Jan 10, 2020 at 11:54:38AM +0000, Vladimir Murzin wrote:
> > > > > I was not lucky with the similar patch [1], anyway
> > > > > 
> > > > > Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
> > > > > 
> > > > > [1] https://www.spinics.net/lists/linux-crypto/msg36059.html
> > > > 
> > > > It's the loss of the warning that I object to, since I think it's a useful
> > > > diagnostic to have. Is there some way we can keep that, but using the new
> > > > kbuild logic?
> [...]
> > The thing I dislike about it is that if somebody sends you a .config with
> > LSE enabled, and your compiler doesn't support it, then it silently get
> > disabled.
> 
> I was thinking the other way. Someone sending me a .config file and I
> can't tell whether LSE was built into their kernel or not unless they
> also send the build log (I haven't seen anyone do this). At least for my
> local compiler, I have some control over it and can compare the
> resulting .config file. It would have been nice if oldconfig warned of
> features being disabled but I guess it would become too noisy.
> 
> To accommodate the two scenarios, what about this diff on top of patch 2
> (I can fold it in in v2 and feel free to suggest better config names):
> 
> -------8<-------------------------
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 2a0521f0f156..cf3b6d2a67cf 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1362,12 +1362,13 @@ config ARM64_PAN
>  	 The feature is detected at runtime, and will remain as a 'nop'
>  	 instruction if the cpu does not implement the feature.
>  
> -config ARM64_AS_HAS_LSE
> -	def_bool $(as-instr,.arch_extension lse)
> -
>  config ARM64_LSE_ATOMICS
> +	bool
> +	default ARM64_USE_LSE_ATOMICS
> +	depends on $(as-instr,.arch_extension lse)
> +
> +config ARM64_USE_LSE_ATOMICS
>  	bool "Atomic instructions"
> -	depends on ARM64_AS_HAS_LSE
>  	depends on JUMP_LABEL
>  	default y
>  	help
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index cca6de192d42..6dd8ecacc428 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -30,6 +30,12 @@ LDFLAGS_vmlinux	+= --fix-cortex-a53-843419
>    endif
>  endif
>  
> +ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS), y)
> +  ifneq ($(CONFIG_ARM64_LSE_ATOMICS), y)
> +$(warning LSE atomics not supported by binutils)
> +  endif
> +endif
> +

This looks good to me; I'll apply v2 when you post it.

Cheers,

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2020-01-14 17:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 17:49 [PATCH 0/2] arm64: Simplify gas LSE support detection Catalin Marinas
2020-01-09 17:49 ` [PATCH 1/2] kbuild: Add support for 'as-instr' to be used in Kconfig files Catalin Marinas
2020-01-09 17:49 ` [PATCH 2/2] arm64: Move the LSE gas support detection to Kconfig Catalin Marinas
2020-01-10 11:54   ` Vladimir Murzin
2020-01-10 12:08     ` Will Deacon
2020-01-10 15:30       ` Catalin Marinas
2020-01-10 15:45         ` Will Deacon
2020-01-13 11:36           ` Catalin Marinas
2020-01-14 17:19             ` Will Deacon [this message]

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=20200114171906.GF2579@willie-the-truck \
    --to=will@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=vladimir.murzin@arm.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