public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] ARM: cache-v7: optimise branches in v7_flush_cache_louis
Date: Thu, 09 Apr 2015 12:29:12 +0200	[thread overview]
Message-ID: <2927556.fYRDzU3Hag@wuerfel> (raw)
In-Reply-To: <20150409082116.GV12732@n2100.arm.linux.org.uk>

On Thursday 09 April 2015 09:21:16 Russell King - ARM Linux wrote:
> On Thu, Apr 09, 2015 at 10:13:06AM +0200, Arnd Bergmann wrote:
> > 
> > With this in linux-next, I get a build failure on randconfig kernels with
> > THUMB2_KERNEL enabled:
> > 
> > arch/arm/mm/cache-v7.S: Assembler messages:
> > arch/arm/mm/cache-v7.S:99: Error: ALT_UP() content must assemble to exactly 4 bytes
> > 
> > Any idea for a method that will work with all combinations of SMP/UP
> > and ARM/THUMB? The best I could come up with was to add an extra 'mov r0,r0',
> > but that gets rather ugly as you then have to do it only for THUMB2.
> 
> How about we make ALT_UP() add the additional padding?  Something like
> this maybe?
> 
> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
> index f67fd3afebdf..79f421796aab 100644
> --- a/arch/arm/include/asm/assembler.h
> +++ b/arch/arm/include/asm/assembler.h
> @@ -237,6 +237,9 @@
>  	.pushsection ".alt.smp.init", "a"			;\
>  	.long	9998b						;\
>  9997:	instr							;\
> +	.if . - 9997b == 2					;\
> +		nop						;\
> +	.endif
>  	.if . - 9997b != 4					;\
>  		.error "ALT_UP() content must assemble to exactly 4 bytes";\
>  	.endif							;\
> 

This looks like a good solution, and works fine after adding the
missing ';\' characters behind the .endif.

I don't expect any problems but I'm doing some more randconfig builds
now with this patch, and if you don't hear back today, feel free to add

Acked-by: Arnd Bergmann <arnd@arndb.de>

Thanks!

	Arnd

  reply	other threads:[~2015-04-09 10:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 22:49 [RFC] mixture of cleanups to cache-v7.S Russell King - ARM Linux
2015-04-02 22:57 ` Russell King - ARM Linux
2015-04-03 10:08   ` Russell King - ARM Linux
2015-04-03 10:53     ` Russell King - ARM Linux
2015-04-03 10:54     ` [PATCH 1/7] ARM: cache-v7: use movw/movt instructions Russell King
2015-04-09 17:10       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 2/7] ARM: cache-v7: shift CLIDR to extract appropriate field before masking Russell King
2015-04-09 17:09       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 3/7] ARM: cache-v7: consolidate initialisation of cache level index Russell King
2015-04-09 17:11       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 4/7] ARM: cache-v7: optimise branches in v7_flush_cache_louis Russell King
2015-04-09  8:13       ` Arnd Bergmann
2015-04-09  8:21         ` Russell King - ARM Linux
2015-04-09 10:29           ` Arnd Bergmann [this message]
2015-04-09 13:46             ` Russell King - ARM Linux
2015-04-09 17:26               ` Catalin Marinas
2015-04-09 17:17           ` Catalin Marinas
2015-04-09 17:15       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 5/7] ARM: cache-v7: optimise test for Cortex A9 r0pX devices Russell King
2015-04-09 17:20       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 6/7] ARM: enable ARM errata 643719 workaround by default Russell King
2015-04-09 17:21       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 7/7] ARM: cache-v7: further cleanups (and fix?) Russell King
2015-04-10 13:27 ` [RFC] mixture of cleanups to cache-v7.S Catalin Marinas
2015-04-10 14:11   ` Lorenzo Pieralisi
2015-04-10 14:26     ` Russell King - ARM Linux
2015-04-10 15:16       ` Catalin Marinas
2015-04-10 15:37       ` Lorenzo Pieralisi

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=2927556.fYRDzU3Hag@wuerfel \
    --to=arnd@arndb.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox