arm, vt8500, LLVMLlinux: Use mcr instead of mcr% for mach-vt8500
Subsystems (3)
PATCH 1/1 arm, vt8500, LLVMLlinux: Use mcr instead of mcr% for mach-vt8500
The ASM below does not compile with clang and is not the way that the mcr command is used in other parts of the kernel.
arch/arm/mach-vt8500/vt8500.c:72:11: error: invalid % escape in inline assembly string
asm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0));
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~1 error generated.
There are other forms that are supported on different ARM instruction sets but generally the kernel just uses mcr as it is supported in all ARM instruction sets.
--- arch/arm/mach-vt8500/vt8500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-vt8500/vt8500.c +1 -1
@@ -69,7 +69,7 @@ static void vt8500_power_off(void) {local_irq_disable ();writew (5 , pmc_base +VT8500_HCR_REG ); - asm("mcr%? p15, 0, %0, c7, c0, 4" : :"r" (0 )); + asm("mcr p15, 0, %0, c7, c0, 4" : :"r" (0 )); }static void __init vt8500_init (void )
Signature · 1 line
1.9.1
Quoted 11 lines · On Tuesday 23 September 2014 20:44:44 Behan Webster wrote:
The ASM below does not compile with clang and is not the way that the mcr command is used in other parts of the kernel.
arch/arm/mach-vt8500/vt8500.c:72:11: error: invalid % escape in inline assembly stringasm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~1 error generated.
There are other forms that are supported on different ARM instruction sets but generally the kernel just uses mcr as it is supported in all ARM instruction sets.
Just for confirm: both forms are actually correct and we don't need this backported for stable, right?
Quoted 3 lines
Signed-off-by Behan Webster <[email protected]>Reviewed-by Mark Charlebois <[email protected]>Acked-by Will Deacon <[email protected]>
Tony, would you like to pick this one up and send it in a pull request to arm-soc, or should we apply it to fixes-non-critical directly?
Arnd
Quoted 9 lines · Arnd Bergmann
Quoted 8 lines · On Tuesday 23 September 2014 20:44:44 Behan Webster wrote:
The ASM below does not compile with clang and is not the way that the mcr command is used in other parts of the kernel.
arch/arm/mach-vt8500/vt8500.c:72:11: error: invalid % escape in inline assembly stringasm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~1 error generated.
Quoted 5 lines
Quoted 3 lines
There are other forms that are supported on different ARM instruction sets but generally the kernel just uses mcr as it is supported in all ARM instruction sets.
Just for confirm: both forms are actually correct and we don't need this backported for stable, right?
My understanding is that the %? carries a condition code to the next instruction (which in this case is then ignored). So essentially in this situation both are equivalent.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Behan Webster <[email protected]>Reviewed-by Mark Charlebois <[email protected]>Acked-by Will Deacon <[email protected]>Acked-by Arnd Bergmann <[email protected]>Tony, would you like to pick this one up and send it in a pull request to arm-soc, or should we apply it to fixes-non-critical directly?
Thanks,
Behan
Signature · 2 lines
Behan Webster behanw at converseincode.com
Quoted 18 lines · Arnd Bergmann
Quoted 11 lines · On Tuesday 23 September 2014 20:44:44 Behan Webster wrote:
The ASM below does not compile with clang and is not the way that the mcr command is used in other parts of the kernel.
arch/arm/mach-vt8500/vt8500.c:72:11: error: invalid % escape in inline assembly stringasm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~1 error generated.
There are other forms that are supported on different ARM instruction sets but generally the kernel just uses mcr as it is supported in all ARM instruction sets.
Just for confirm: both forms are actually correct and we don't need this backported for stable, right?
Quoted 3 lines
Signed-off-by Behan Webster <[email protected]>Reviewed-by Mark Charlebois <[email protected]>Acked-by Will Deacon <[email protected]>
Quoted 6 lines
Acked-by Arnd Bergmann <[email protected]>Tony, would you like to pick this one up and send it in a pull request to arm-soc, or should we apply it to fixes-non-critical directly?
Arnd
Arnd,
You can apply it directly to fixes-non-critical if that's ok.
Regards
Tony Prisk
Arnd Bergmann
AppliedQuoted 7 lines · Tony Prisk
Quoted 4 lines
Tony, would you like to pick this one up and send it in a pull request to arm-soc, or should we apply it to fixes-non-critical directly?
Arnd
Arnd,
You can apply it directly to fixes-non-critical if that's ok.
Applied, thanks!
Arnd