Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7ec6994 authored by Will Deacon's avatar Will Deacon Committed by Russell King
Browse files

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 5761704a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -10,7 +10,7 @@ UNWIND( .fnstart )
	and	r3, r0, #31		@ Get bit offset
	and	r3, r0, #31		@ Get bit offset
	mov	r0, r0, lsr #5
	mov	r0, r0, lsr #5
	add	r1, r1, r0, lsl #2	@ Get word offset
	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
	.arch_extension	mp
	ALT_SMP(W(pldw)	[r1])
	ALT_SMP(W(pldw)	[r1])
	ALT_UP(W(nop))
	ALT_UP(W(nop))