All of lore.kernel.org
 help / color / mirror / Atom feed
From: daniel.thompson@linaro.org (Daniel Thompson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: alternative: Provide if/else/endif assembler macros
Date: Fri, 17 Jul 2015 11:42:26 +0100	[thread overview]
Message-ID: <55A8DC12.2060904@linaro.org> (raw)
In-Reply-To: <20150716181929.GU26390@arm.com>

On 16/07/15 19:19, Will Deacon wrote:
>> Notes:
>>      To be honest these if not/else/endif macros are simply more readable
>>      than the original macro and that might be enough to justify them on
>>      their own. However below is an example that is needlessly hard to
>>      write without them because ICC_PMR_EL1 is a C pre-processor macro.
>>
>>       	.macro	disable_irq, tmp
>>       	mov	\tmp, #ICC_PMR_EL1_MASKED
>>      alternative_if_not ARM64_HAS_SYSREG_GIC_CPUIF
>>      	msr	daifset, #2
>>      alternative_else
>>       	msr_s	ICC_PMR_EL1, \tmp
>>      alternative_endif
>>      	.endm
>>
>>      The new macros have received a fair degree of testing because I have
>>      based my (not published since March) pseudo-NMI patch set on them.
>
> After some consideration, I think I prefer your suggestion over what we
> currently have in mainline. However, there are a bunch of patches that
> are candidates for 4.3 which will conflict horribly with this.
>
> Would you be able to:
>
>    (1) Split this up so that you have a patch introducing the new macro,
>        then a patch converting entry.S and cache.S then a separate one
>        for kvm/hyp.S?
>
>    (2) Keep alternative_insn around for the moment
>
>    (3) Once the dust has settled for 4.3, we can see how easy the old
>        macro is to remove
>
> Sound ok to you?

Absolutely fine.

I will get the split out patches posted soon.


Daniel.

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"patches@linaro.org" <patches@linaro.org>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
	John Stultz <john.stultz@linaro.org>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	Andre Przywara <Andre.Przywara@arm.com>
Subject: Re: [PATCH] arm64: alternative: Provide if/else/endif assembler macros
Date: Fri, 17 Jul 2015 11:42:26 +0100	[thread overview]
Message-ID: <55A8DC12.2060904@linaro.org> (raw)
In-Reply-To: <20150716181929.GU26390@arm.com>

On 16/07/15 19:19, Will Deacon wrote:
>> Notes:
>>      To be honest these if not/else/endif macros are simply more readable
>>      than the original macro and that might be enough to justify them on
>>      their own. However below is an example that is needlessly hard to
>>      write without them because ICC_PMR_EL1 is a C pre-processor macro.
>>
>>       	.macro	disable_irq, tmp
>>       	mov	\tmp, #ICC_PMR_EL1_MASKED
>>      alternative_if_not ARM64_HAS_SYSREG_GIC_CPUIF
>>      	msr	daifset, #2
>>      alternative_else
>>       	msr_s	ICC_PMR_EL1, \tmp
>>      alternative_endif
>>      	.endm
>>
>>      The new macros have received a fair degree of testing because I have
>>      based my (not published since March) pseudo-NMI patch set on them.
>
> After some consideration, I think I prefer your suggestion over what we
> currently have in mainline. However, there are a bunch of patches that
> are candidates for 4.3 which will conflict horribly with this.
>
> Would you be able to:
>
>    (1) Split this up so that you have a patch introducing the new macro,
>        then a patch converting entry.S and cache.S then a separate one
>        for kvm/hyp.S?
>
>    (2) Keep alternative_insn around for the moment
>
>    (3) Once the dust has settled for 4.3, we can see how easy the old
>        macro is to remove
>
> Sound ok to you?

Absolutely fine.

I will get the split out patches posted soon.


Daniel.

  reply	other threads:[~2015-07-17 10:42 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 13:48 [PATCH] arm64: alternative: Provide if/else/endif assembler macros Daniel Thompson
2015-07-10 13:48 ` Daniel Thompson
2015-07-16 18:19 ` Will Deacon
2015-07-16 18:19   ` Will Deacon
2015-07-17 10:42   ` Daniel Thompson [this message]
2015-07-17 10:42     ` Daniel Thompson
2015-07-20 15:09 ` [PATCH v2 0/5] " Daniel Thompson
2015-07-20 15:09   ` Daniel Thompson
2015-07-20 15:10   ` [PATCH v2 1/5] " Daniel Thompson
2015-07-20 15:10     ` Daniel Thompson
2015-07-20 17:12     ` Will Deacon
2015-07-20 17:12       ` Will Deacon
2015-07-22 11:08       ` Daniel Thompson
2015-07-22 11:08         ` Daniel Thompson
2015-07-20 15:10   ` [PATCH v2 2/5] arm64: mm: Adopt new alternative " Daniel Thompson
2015-07-20 15:10     ` Daniel Thompson
2015-07-20 15:10   ` [PATCH v2 3/5] arm64: kernel: " Daniel Thompson
2015-07-20 15:10     ` Daniel Thompson
2015-07-20 15:10   ` [PATCH v2 4/5] arm64: kvm: " Daniel Thompson
2015-07-20 15:10     ` Daniel Thompson
2015-07-20 15:10   ` [PATCH v2 5/5] arm64: alternative: Remove alternative_insn macro Daniel Thompson
2015-07-20 15:10     ` Daniel Thompson
2015-07-22 11:21 ` [PATCH v3 0/5] arm64: alternative: Provide if/else/endif assembler macros Daniel Thompson
2015-07-22 11:21   ` Daniel Thompson
2015-07-22 11:21   ` [PATCH v3 1/5] " Daniel Thompson
2015-07-22 11:21     ` Daniel Thompson
2015-07-22 11:21   ` [PATCH v3 2/5] arm64: mm: Adopt new alternative " Daniel Thompson
2015-07-22 11:21     ` Daniel Thompson
2015-07-22 11:21   ` [PATCH v3 3/5] arm64: kernel: " Daniel Thompson
2015-07-22 11:21     ` Daniel Thompson
2015-07-22 11:21   ` [PATCH v3 4/5] arm64: kvm: " Daniel Thompson
2015-07-22 11:21     ` Daniel Thompson
2015-07-22 15:17     ` Will Deacon
2015-07-22 15:17       ` Will Deacon
2015-07-22 15:55       ` Marc Zyngier
2015-07-22 15:55         ` Marc Zyngier
2015-07-22 11:21   ` [PATCH v3 5/5] arm64: alternative: Remove alternative_insn macro Daniel Thompson
2015-07-22 11:21     ` Daniel Thompson

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=55A8DC12.2060904@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.