Skip to content

Commit da94a82

Browse files
arndbRussell King
authored andcommitted
ARM: 7743/1: compressed/head.S: work around new binutils warning
In August 2012, Matthew Gretton-Dann checked a change into binutils labelled "Error on obsolete & warn on deprecated registers", apparently as part of ARMv8 support. Apparently, this was supposed to emit the message "Warning: This coprocessor register access is deprecated in ARMv8" when using certain mcr/mrc instructions and building for ARMv8. Unfortunately, the message that is actually emitted appears to be '(null)', which is less helpful in comparison. Even more unfortunately, this is biting us on every single kernel build with a new gas, because arch/arm/boot/compressed/head.S and some other files in that directory are built with -march=all since kernel commit 80cec14 "[ARM] Add -march=all to assembly file build in arch/arm/boot/compressed" back in v2.6.28. This patch reverts Russell's nice solution and instead marks the head.S file to be built for armv7-a, which fortunately lets us build all instructions in that file without warnings even on the broken binutils. Without this patch, building anything results in: arch/arm/boot/compressed/head.S: Assembler messages: arch/arm/boot/compressed/head.S:565: Warning: (null) arch/arm/boot/compressed/head.S:676: Warning: (null) arch/arm/boot/compressed/head.S:698: Warning: (null) arch/arm/boot/compressed/head.S:722: Warning: (null) arch/arm/boot/compressed/head.S:726: Warning: (null) arch/arm/boot/compressed/head.S:957: Warning: (null) arch/arm/boot/compressed/head.S:996: Warning: (null) arch/arm/boot/compressed/head.S:997: Warning: (null) arch/arm/boot/compressed/head.S:1027: Warning: (null) arch/arm/boot/compressed/head.S:1035: Warning: (null) arch/arm/boot/compressed/head.S:1046: Warning: (null) arch/arm/boot/compressed/head.S:1060: Warning: (null) arch/arm/boot/compressed/head.S:1092: Warning: (null) arch/arm/boot/compressed/head.S:1094: Warning: (null) arch/arm/boot/compressed/head.S:1095: Warning: (null) arch/arm/boot/compressed/head.S:1102: Warning: (null) arch/arm/boot/compressed/head.S:1134: Warning: (null) Signed-off-by: Arnd Bergmann <[email protected]> Cc: [email protected] Cc: Matthew Gretton-Dann <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 92bdd3f commit da94a82

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

arch/arm/boot/compressed/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
124124
endif
125125

126126
ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
127-
asflags-y := -Wa,-march=all -DZIMAGE
127+
asflags-y := -DZIMAGE
128128

129129
# Supply kernel BSS size to the decompressor via a linker symbol.
130130
KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \

arch/arm/boot/compressed/head-sa1100.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <asm/mach-types.h>
1212

1313
.section ".start", "ax"
14+
.arch armv4
1415

1516
__SA1100_start:
1617

arch/arm/boot/compressed/head-shark.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
1919
.section ".start", "ax"
2020

21+
.arch armv4
2122
b __beginning
2223
2324
__ofw_data: .long 0 @ the number of memory blocks

arch/arm/boot/compressed/head.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/linkage.h>
1212
#include <asm/assembler.h>
1313

14+
.arch armv7-a
1415
/*
1516
* Debugging stuff
1617
*

0 commit comments

Comments
 (0)