ARM: 7893/1: bitops: only emit .arch_extension mp if CONFIG_SMP

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 22 17:59:05 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b7ec699405f55667caeb46d96229d75bf33a83ad
Commit:     b7ec699405f55667caeb46d96229d75bf33a83ad
Parent:     5761704a41c63ebe756295a13d2e236280dd8a86
Author:     Will Deacon <will.deacon at arm.com>
AuthorDate: Tue Nov 19 15:46:11 2013 +0100
Committer:  Russell King <rmk+kernel at arm.linux.org.uk>
CommitDate: Wed Nov 20 23:05:53 2013 +0000

    ARM: 7893/1: bitops: only emit .arch_extension mp if CONFIG_SMP
    
    Uwe reported a build failure when targetting a NOMMU platform with my
    recent prefetch changes:
    
      arch/arm/lib/changebit.S: Assembler messages:
      arch/arm/lib/changebit.S:15: Error: architectural extension `mp' is
    			not allowed for the current base architecture
    
    This is due to use of the .arch_extension mp directive immediately prior
    to an ALT_SMP(...) instruction. Whilst the ALT_SMP macro will expand to
    nothing if !CONFIG_SMP, gas will still choke on the directive.
    
    This patch fixes the issue by only emitting the sequence (including the
    directive) if CONFIG_SMP=y.
    
    Tested-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
    Signed-off-by: Will Deacon <will.deacon at arm.com>
    Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
 arch/arm/lib/bitops.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h
index e0c68d5..52886b8 100644
--- a/arch/arm/lib/bitops.h
+++ b/arch/arm/lib/bitops.h
@@ -10,7 +10,7 @@ UNWIND(	.fnstart	)
 	and	r3, r0, #31		@ Get bit offset
 	mov	r0, r0, lsr #5
 	add	r1, r1, r0, lsl #2	@ Get word offset
-#if __LINUX_ARM_ARCH__ >= 7
+#if __LINUX_ARM_ARCH__ >= 7 && defined(CONFIG_SMP)
 	.arch_extension	mp
 	ALT_SMP(W(pldw)	[r1])
 	ALT_UP(W(nop))



More information about the linux-mtd-cvs mailing list