]> git.itanic.dy.fi Git - linux-stable/commitdiff
ARM: 9263/1: use .arch directives instead of assembler command line flags
authorNick Desaulniers <ndesaulniers@google.com>
Mon, 24 Oct 2022 19:44:41 +0000 (20:44 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 8 Nov 2022 18:36:17 +0000 (18:36 +0000)
Similar to commit a6c30873ee4a ("ARM: 8989/1: use .fpu assembler
directives instead of assembler arguments").

GCC and GNU binutils support setting the "sub arch" via -march=,
-Wa,-march, target function attribute, and .arch assembler directive.

Clang was missing support for -Wa,-march=, but this was implemented in
clang-13.

The behavior of both GCC and Clang is to
prefer -Wa,-march= over -march= for assembler and assembler-with-cpp
sources, but Clang will warn about the -march= being unused.

clang: warning: argument unused during compilation: '-march=armv6k'
[-Wunused-command-line-argument]

Since most assembler is non-conditionally assembled with one sub arch
(modulo arch/arm/delay-loop.S which conditionally is assembled as armv4
based on CONFIG_ARCH_RPC, and arch/arm/mach-at91/pm-suspend.S which is
conditionally assembled as armv7-a based on CONFIG_CPU_V7), prefer the
.arch assembler directive.

Add a few more instances found in compile testing as found by Arnd and
Nathan.

Link: https://github.com/llvm/llvm-project/commit/1d51c699b9e2ebc5bcfdbe85c74cc871426333d4
Link: https://bugs.llvm.org/show_bug.cgi?id=48894
Link: https://github.com/ClangBuiltLinux/linux/issues/1195
Link: https://github.com/ClangBuiltLinux/linux/issues/1315
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
41 files changed:
arch/arm/boot/compressed/Makefile
arch/arm/common/Makefile
arch/arm/common/mcpm_head.S
arch/arm/common/vlock.S
arch/arm/kernel/Makefile
arch/arm/kernel/hyp-stub.S
arch/arm/kernel/swp_emulate.c
arch/arm/lib/Makefile
arch/arm/lib/delay-loop.S
arch/arm/mach-at91/Makefile
arch/arm/mach-at91/pm_suspend.S
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/headsmp.S
arch/arm/mach-imx/resume-imx6.S
arch/arm/mach-imx/suspend-imx6.S
arch/arm/mach-mvebu/Makefile
arch/arm/mach-mvebu/coherency_ll.S
arch/arm/mach-mvebu/pmsu.c
arch/arm/mach-npcm/Makefile
arch/arm/mach-npcm/headsmp.S
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/reset-handler.S
arch/arm/mach-tegra/sleep-tegra20.S
arch/arm/mach-tegra/sleep-tegra30.S
arch/arm/mach-tegra/sleep.S
arch/arm/mm/Makefile
arch/arm/mm/abort-ev6.S
arch/arm/mm/abort-ev7.S
arch/arm/mm/cache-v6.S
arch/arm/mm/cache-v7.S
arch/arm/mm/cache-v7m.S
arch/arm/mm/copypage-feroceon.c
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7-2level.S
arch/arm/mm/proc-v7.S
arch/arm/mm/tlb-v6.S
arch/arm/mm/tlb-v7.S
drivers/memory/Makefile
drivers/memory/ti-emif-sram-pm.S
drivers/soc/bcm/brcmstb/pm/Makefile
drivers/soc/bcm/brcmstb/pm/s2-arm.S

index 2cc2af13779ef5436e00ee91f78ff00e238cad55..8c63f0a26f56b04c1b27b8b8ef597a59d6836eec 100644 (file)
@@ -164,4 +164,3 @@ $(obj)/piggy_data: $(obj)/../Image FORCE
 $(obj)/piggy.o: $(obj)/piggy_data
 
 CFLAGS_font.o := -Dstatic=
-AFLAGS_hyp-stub.o := -Wa,-march=armv7-a
index 7bae8cbaafe78d7dad2836214b5c567a7503492e..9733381074e0de4afbd959f707d6379f06e82fa0 100644 (file)
@@ -13,7 +13,5 @@ obj-$(CONFIG_SHARP_SCOOP)     += scoop.o
 obj-$(CONFIG_CPU_V7)           += secure_cntvoff.o
 obj-$(CONFIG_MCPM)             += mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
 CFLAGS_REMOVE_mcpm_entry.o     = -pg
-AFLAGS_mcpm_head.o             := -march=armv7-a
-AFLAGS_vlock.o                 := -march=armv7-a
 obj-$(CONFIG_BL_SWITCHER)      += bL_switcher.o
 obj-$(CONFIG_BL_SWITCHER_DUMMY_IF) += bL_switcher_dummy_if.o
index 291d969bc719cdd77c74c5f3e1735f7d0fe56a1d..299495c43dfd189659a629004ab7377943f6b5b3 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "vlock.h"
 
+.arch armv7-a
+
 .if MCPM_SYNC_CLUSTER_CPUS
 .error "cpus must be the first member of struct mcpm_sync_struct"
 .endif
index f1c7fd44f1b10bc7f08787765e4e57f94e0789de..1fa09c4697edc604f9300f4c26db4725c0d200c9 100644 (file)
@@ -12,6 +12,8 @@
 #include <linux/linkage.h>
 #include "vlock.h"
 
+.arch armv7-a
+
 /* Select different code if voting flags  can fit in a single word. */
 #if VLOCK_VOTING_SIZE > 4
 #define FEW(x...)
index 553866751e1a5ce66c805c083e392c1f0646088e..e64ed3a82f70330627fa80675e99432e6471ae05 100644 (file)
@@ -71,7 +71,6 @@ obj-$(CONFIG_HAVE_TCM)                += tcm.o
 obj-$(CONFIG_OF)               += devtree.o
 obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
 obj-$(CONFIG_SWP_EMULATE)      += swp_emulate.o
-CFLAGS_swp_emulate.o           := -Wa,-march=armv7-a
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)       += hw_breakpoint.o
 
 obj-$(CONFIG_CPU_XSCALE)       += xscale-cp0.o
@@ -100,7 +99,6 @@ CFLAGS_head-inflate-data.o := $(call cc-option,-Wframe-larger-than=10240)
 obj-$(CONFIG_XIP_DEFLATED_DATA) += head-inflate-data.o
 
 obj-$(CONFIG_ARM_VIRT_EXT)     += hyp-stub.o
-AFLAGS_hyp-stub.o              :=-Wa,-march=armv7-a
 ifeq ($(CONFIG_ARM_PSCI),y)
 obj-$(CONFIG_SMP)              += psci_smp.o
 endif
index b699b22a4db1fa2643518e7d8360102257b93cdd..3a506b9095a5da172d8d30e3656986c96f51769a 100644 (file)
@@ -9,6 +9,8 @@
 #include <asm/assembler.h>
 #include <asm/virt.h>
 
+.arch armv7-a
+
 #ifndef ZIMAGE
 /*
  * For the kernel proper, we need to find out the CPU boot mode long after
index b74bfcf94fb1a5ea85fea22756628afae9676630..fdce83c95acb08b23bbd7faa6dfc5ae08d1de876 100644 (file)
@@ -34,6 +34,7 @@
  */
 #define __user_swpX_asm(data, addr, res, temp, B)              \
        __asm__ __volatile__(                                   \
+       ".arch armv7-a\n"                                       \
        "0:     ldrex"B"        %2, [%3]\n"                     \
        "1:     strex"B"        %0, %1, [%3]\n"                 \
        "       cmp             %0, #0\n"                       \
index 6d2ba454f25b6a3a621ec56f17a675fa2f3a6c7d..42fb75c06647f8c76f90204ebd41c444a2381b63 100644 (file)
@@ -36,10 +36,6 @@ else
   lib-y        += io-readsw-armv4.o io-writesw-armv4.o
 endif
 
-ifeq ($(CONFIG_ARCH_RPC),y)
-  AFLAGS_delay-loop.o          += -march=armv4
-endif
-
 $(obj)/csumpartialcopy.o:      $(obj)/csumpartialcopygeneric.S
 $(obj)/csumpartialcopyuser.o:  $(obj)/csumpartialcopygeneric.S
 
index 3ccade0f813038c89404a26f92b4a35a3638dd86..3ac05177d09795d430b9010349b51b4b489d9597 100644 (file)
@@ -8,6 +8,10 @@
 #include <asm/assembler.h>
 #include <asm/delay.h>
 
+#ifdef CONFIG_ARCH_RPC
+               .arch   armv4
+#endif
+
                .text
 
 .LC0:          .word   loops_per_jiffy
index 0dcc3718058820f56c9cec1953340074b6818657..794bd12ab0a8e231986d380c904aeac165286322 100644 (file)
@@ -14,9 +14,6 @@ obj-$(CONFIG_SOC_SAMV7)               += samv7.o
 # Power Management
 obj-$(CONFIG_ATMEL_PM)         += pm.o pm_suspend.o
 
-ifeq ($(CONFIG_CPU_V7),y)
-AFLAGS_pm_suspend.o := -march=armv7-a
-endif
 ifeq ($(CONFIG_PM_DEBUG),y)
 CFLAGS_pm.o += -DDEBUG
 endif
index abe4ced33edafbbf5f91b4a69e4a6f76ce978ff1..f0aa220d668dd1e888d1cacd3c94c000611e385d 100644 (file)
 #include "pm.h"
 #include "pm_data-offsets.h"
 
+#ifdef CONFIG_CPU_V7
+.arch armv7-a
+#endif
+
 #define        SRAMC_SELF_FRESH_ACTIVE         0x01
 #define        SRAMC_SELF_FRESH_EXIT           0x00
 
index 6fb3965b9ae64786ce3df3704dca669d6c5ea03c..5c650bf40e0241e05523c985035b1b80e9d78fe8 100644 (file)
@@ -34,7 +34,6 @@ obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
 obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
 obj-$(CONFIG_HAVE_IMX_SRC) += src.o
 ifneq ($(CONFIG_SOC_IMX6)$(CONFIG_SOC_IMX7D_CA7)$(CONFIG_SOC_LS1021A),)
-AFLAGS_headsmp.o :=-Wa,-march=armv7-a
 obj-$(CONFIG_SMP) += headsmp.o platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
 endif
@@ -48,12 +47,10 @@ obj-$(CONFIG_SOC_IMX7D_CM4) += mach-imx7d-cm4.o
 obj-$(CONFIG_SOC_IMX7ULP) += mach-imx7ulp.o pm-imx7ulp.o
 
 ifeq ($(CONFIG_SUSPEND),y)
-AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
 obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
 obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
 endif
 ifeq ($(CONFIG_ARM_CPU_SUSPEND),y)
-AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a
 obj-$(CONFIG_SOC_IMX6) += resume-imx6.o
 endif
 obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
index fcba58be8e798c9ae502fb70c3002c484120207e..5f9c7b48ae806bbbfdccf9fe471db6425f472052 100644 (file)
@@ -8,6 +8,8 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 
+.arch armv7-a
+
 diag_reg_offset:
        .word   g_diag_reg - .
 
index 5bd1ba7ef15b61cb98d1bd2d3af4e85acc5ec632..2c0c5c771251650368e49c19a53bb2871fdffc04 100644 (file)
@@ -9,6 +9,8 @@
 #include <asm/hardware/cache-l2x0.h>
 #include "hardware.h"
 
+.arch armv7-a
+
 /*
  * The following code must assume it is running from physical address
  * where absolute virtual addresses to the data section have to be
index e06f946b75b96a9455d34facbf019b16121edb82..63ccc2d0e920acf562b686505f00054dfd78b763 100644 (file)
@@ -9,6 +9,8 @@
 #include <asm/hardware/cache-l2x0.h>
 #include "hardware.h"
 
+.arch armv7-a
+
 /*
  * ==================== low level suspend ====================
  *
index cb106899dd7c8c220d75245add6342cc8cec1107..9b9fddb699587e766bd57a9b8221908118fe45e0 100644 (file)
@@ -1,9 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
 
-AFLAGS_coherency_ll.o          := -Wa,-march=armv7-a
-CFLAGS_pmsu.o                  := -march=armv7-a
-
 obj-$(CONFIG_MACH_MVEBU_ANY)    += system-controller.o mvebu-soc-id.o
 
 ifeq ($(CONFIG_MACH_MVEBU_V7),y)
index eb81656e32d47100e4915856efa7585251340cdb..35930e03d9c6730c2258e55c9d0349e287f5ddba 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/assembler.h>
 #include <asm/cp15.h>
 
+       .arch armv7-a
        .text
 /*
  * Returns the coherency base address in r1 (r0 is untouched), or 0 if
index af27a7156675ab7294b9d51011d147595198a702..6f366d8c4231f34ee8bdd52314c87a03caa163c2 100644 (file)
@@ -291,6 +291,7 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle)
 
        /* Test the CR_C bit and set it if it was cleared */
        asm volatile(
+       ".arch  armv7-a\n\t"
        "mrc    p15, 0, r0, c1, c0, 0 \n\t"
        "tst    r0, %0 \n\t"
        "orreq  r0, r0, #(1 << 2) \n\t"
index 8d61fcd42fb1988c5fb9d0dcbdba2d9d99bdbe97..ac83e1caf2ee0aa61604797189dfe7168648ddb5 100644 (file)
@@ -1,6 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-AFLAGS_headsmp.o               += -march=armv7-a
-
 obj-$(CONFIG_ARCH_WPCM450)     += wpcm450.o
 obj-$(CONFIG_ARCH_NPCM7XX)     += npcm7xx.o
 obj-$(CONFIG_SMP)              += platsmp.o headsmp.o
index c083fe09a07b123cd347a42db6138faa24fd3853..84d2b6daaf0b7882f25a06f43cef2d90e9454376 100644 (file)
@@ -6,6 +6,8 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 
+.arch armv7-a
+
 /*
  * The boot ROM does not start secondary CPUs in SVC mode, so we need to do that
  * here.
index 07572b5373b8cd78a8c0f881fca41fe0d2678f6c..a2bb55bc0081ccb1914fa5f290ad44b38d2821d0 100644 (file)
@@ -1,6 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-asflags-y                              += -march=armv7-a
-
 obj-y                                   += io.o
 obj-y                                   += irq.o
 obj-y                                  += pm.o
index 06ca44b09381b303afeab5862fa7ad19415904dc..0ea456264f3e9d856306dddcebbb76b2110f4eff 100644 (file)
@@ -19,6 +19,8 @@
 
 #define PMC_SCRATCH41  0x140
 
+.arch armv7-a
+
 #ifdef CONFIG_PM_SLEEP
 /*
  *     tegra_resume
index a5a36cce142a4a90a43fdb2e42904667db20a58f..d8cd487a8f63202469dca7c605d1043189648240 100644 (file)
@@ -47,6 +47,8 @@
 #define PLLM_STORE_MASK                        (1 << 1)
 #define PLLP_STORE_MASK                        (1 << 2)
 
+.arch armv7-a
+
 .macro test_pll_state, rd, test_mask
        ldr     \rd, tegra_pll_state
        tst     \rd, #\test_mask
index 0cc40b6b2ba390d63e76304e474c76f11419949c..134ea5fe49b2ebb4e8187abeca69c81beec91cab 100644 (file)
@@ -78,6 +78,8 @@
 #define PLLX_STORE_MASK                        (1 << 4)
 #define PLLM_PMC_STORE_MASK            (1 << 5)
 
+.arch armv7-a
+
 .macro emc_device_mask, rd, base
        ldr     \rd, [\base, #EMC_ADR_CFG]
        tst     \rd, #0x1
index 8f88944831c5353ef7e8206664f914a90248ca59..945f2c1474f7de5b9e09aa28f75c9cae8e0b7cb5 100644 (file)
@@ -22,6 +22,8 @@
 #define CLK_RESET_CCLK_BURST   0x20
 #define CLK_RESET_CCLK_DIVIDER  0x24
 
+.arch armv7-a
+
 #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_PM_SLEEP)
 /*
  * tegra_disable_clean_inv_dcache
index 3510503bc5e688bb123503778c3e2118f1855817..71b858c9b10c47cf2fd5ab1227fa74e159a51256 100644 (file)
@@ -33,9 +33,6 @@ obj-$(CONFIG_CPU_ABRT_EV5TJ)  += abort-ev5tj.o
 obj-$(CONFIG_CPU_ABRT_EV6)     += abort-ev6.o
 obj-$(CONFIG_CPU_ABRT_EV7)     += abort-ev7.o
 
-AFLAGS_abort-ev6.o     :=-Wa,-march=armv6k
-AFLAGS_abort-ev7.o     :=-Wa,-march=armv7-a
-
 obj-$(CONFIG_CPU_PABRT_LEGACY) += pabort-legacy.o
 obj-$(CONFIG_CPU_PABRT_V6)     += pabort-v6.o
 obj-$(CONFIG_CPU_PABRT_V7)     += pabort-v7.o
@@ -49,10 +46,6 @@ obj-$(CONFIG_CPU_CACHE_FA)   += cache-fa.o
 obj-$(CONFIG_CPU_CACHE_NOP)    += cache-nop.o
 obj-$(CONFIG_CPU_CACHE_V7M)    += cache-v7m.o
 
-AFLAGS_cache-v6.o      :=-Wa,-march=armv6
-AFLAGS_cache-v7.o      :=-Wa,-march=armv7-a
-AFLAGS_cache-v7m.o     :=-Wa,-march=armv7-m
-
 obj-$(CONFIG_CPU_COPY_V4WT)    += copypage-v4wt.o
 obj-$(CONFIG_CPU_COPY_V4WB)    += copypage-v4wb.o
 obj-$(CONFIG_CPU_COPY_FEROCEON)        += copypage-feroceon.o
@@ -62,8 +55,6 @@ obj-$(CONFIG_CPU_XSCALE)      += copypage-xscale.o
 obj-$(CONFIG_CPU_XSC3)         += copypage-xsc3.o
 obj-$(CONFIG_CPU_COPY_FA)      += copypage-fa.o
 
-CFLAGS_copypage-feroceon.o := -march=armv5te
-
 obj-$(CONFIG_CPU_TLB_V4WT)     += tlb-v4.o
 obj-$(CONFIG_CPU_TLB_V4WB)     += tlb-v4wb.o
 obj-$(CONFIG_CPU_TLB_V4WBI)    += tlb-v4wbi.o
@@ -72,9 +63,6 @@ obj-$(CONFIG_CPU_TLB_V6)      += tlb-v6.o
 obj-$(CONFIG_CPU_TLB_V7)       += tlb-v7.o
 obj-$(CONFIG_CPU_TLB_FA)       += tlb-fa.o
 
-AFLAGS_tlb-v6.o                :=-Wa,-march=armv6
-AFLAGS_tlb-v7.o                :=-Wa,-march=armv7-a
-
 obj-$(CONFIG_CPU_ARM7TDMI)     += proc-arm7tdmi.o
 obj-$(CONFIG_CPU_ARM720T)      += proc-arm720.o
 obj-$(CONFIG_CPU_ARM740T)      += proc-arm740.o
@@ -101,9 +89,6 @@ obj-$(CONFIG_CPU_V6K)                += proc-v6.o
 obj-$(CONFIG_CPU_V7)           += proc-v7.o proc-v7-bugs.o
 obj-$(CONFIG_CPU_V7M)          += proc-v7m.o
 
-AFLAGS_proc-v6.o       :=-Wa,-march=armv6
-AFLAGS_proc-v7.o       :=-Wa,-march=armv7-a
-
 obj-$(CONFIG_OUTER_CACHE)      += l2c-common.o
 obj-$(CONFIG_CACHE_B15_RAC)    += cache-b15-rac.o
 obj-$(CONFIG_CACHE_FEROCEON_L2)        += cache-feroceon-l2.o
index c58bf8b43fea64f240ea66d079dc840c9c9d141f..836dc1299243415faaac1a93dce35ac46ae1a7da 100644 (file)
@@ -16,6 +16,7 @@
  * abort here if the I-TLB and D-TLB aren't seeing the same
  * picture.  Unfortunately, this does happen.  We live with it.
  */
+       .arch   armv6k
        .align  5
 ENTRY(v6_early_abort)
        mrc     p15, 0, r1, c5, c0, 0           @ get FSR
index f81bceacc660930c58314af8144bb7daaa4a4ab7..53fb41c24774db985eddc370904aa7666527f538 100644 (file)
@@ -12,6 +12,7 @@
  *
  * Purpose : obtain information about current aborted instruction.
  */
+       .arch   armv7-a
        .align  5
 ENTRY(v7_early_abort)
        mrc     p15, 0, r1, c5, c0, 0           @ get FSR
index f0f65eb073e481e082e216f846c7aebf20d0e279..250c83bf7158748df7ae851bf2d45e1c7330adc5 100644 (file)
@@ -19,6 +19,8 @@
 #define D_CACHE_LINE_SIZE      32
 #define BTB_FLUSH_SIZE         8
 
+.arch armv6
+
 /*
  *     v6_flush_icache_all()
  *
index 7c9499b728c4402262ea7f394ebc63ef00ea9c54..127afe2096bac4d0dd64e5470b57448dd10bf3b9 100644 (file)
@@ -16,6 +16,8 @@
 
 #include "proc-macros.S"
 
+.arch armv7-a
+
 #ifdef CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND
 .globl icache_size
        .data
index 1bc3a0a507539d0e71e365ee4f0c476cea387654..eb60b5e5e2ad85d38ecdda516dd7034eb9027233 100644 (file)
@@ -18,6 +18,8 @@
 
 #include "proc-macros.S"
 
+.arch armv7-m
+
 /* Generic V7M read/write macros for memory mapped cache operations */
 .macro v7m_cache_read, rt, reg
        movw    \rt, #:lower16:BASEADDR_V7M_SCB + \reg
index 064b19e6357118f7e40834e37305dabfb58c4ad5..5fc8ef1e665ff9bf40b9ea6a45ed34aee42aeb05 100644 (file)
@@ -15,6 +15,7 @@ static void feroceon_copy_user_page(void *kto, const void *kfrom)
        int tmp;
 
        asm volatile ("\
+.arch  armv5te                                 \n\
 1:     ldmia   %1!, {r2 - r7, ip, lr}          \n\
        pld     [%1, #0]                        \n\
        pld     [%1, #32]                       \n\
index a0618f3e6836b8511b03209d3ba21ff0b4715097..203dff89ab1abd769ace8009279b09393faad635 100644 (file)
@@ -32,6 +32,8 @@
 #define TTB_FLAGS_SMP  TTB_RGN_WBWA|TTB_S
 #define PMD_FLAGS_SMP  PMD_SECT_WBWA|PMD_SECT_S
 
+.arch armv6
+
 ENTRY(cpu_v6_proc_init)
        ret     lr
 
index 5db029c8f9876c2b5f0bffa4d6139e9e93c2ed7b..0a3083ad19c239c4152315921be4c2e7f7bfeb88 100644 (file)
@@ -24,6 +24,8 @@
 #define TTB_FLAGS_SMP  TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA
 #define PMD_FLAGS_SMP  PMD_SECT_WBWA|PMD_SECT_S
 
+.arch armv7-a
+
 /*
  *     cpu_v7_switch_mm(pgd_phys, tsk)
  *
index 26d726a08a34bbf539cea8c581d1893ea85f75b5..6b4ef9539b68384d618029a6f517f494cf03b635 100644 (file)
@@ -24,6 +24,8 @@
 #include "proc-v7-2level.S"
 #endif
 
+.arch armv7-a
+
 ENTRY(cpu_v7_proc_init)
        ret     lr
 ENDPROC(cpu_v7_proc_init)
index 74f4b383afe3d59465e914702195e3d1a8a42f27..1d91e49b2c2d6653a4037a0d6e4f9cac487a0063 100644 (file)
@@ -17,6 +17,8 @@
 
 #define HARVARD_TLB
 
+.arch armv6
+
 /*
  *     v6wbi_flush_user_tlb_range(start, end, vma)
  *
index 87bf4ab17721c782af2cd51102a2d955d71de693..35fd6d4f0d0384e2f82306124650e1d74f08aba7 100644 (file)
@@ -16,6 +16,8 @@
 #include <asm/tlbflush.h>
 #include "proc-macros.S"
 
+.arch armv7-a
+
 /*
  *     v7wbi_flush_user_tlb_range(start, end, vma)
  *
index bc7663ed1c250350eb64721edcba2bccd42f7624..d1388a7488726f7ec14a185a2d31a10619de4216 100644 (file)
@@ -32,8 +32,6 @@ obj-$(CONFIG_FPGA_DFL_EMIF)   += dfl-emif.o
 
 ti-emif-sram-objs              := ti-emif-pm.o ti-emif-sram-pm.o
 
-AFLAGS_ti-emif-sram-pm.o       :=-Wa,-march=armv7-a
-
 $(obj)/ti-emif-sram-pm.o: $(obj)/ti-emif-asm-offsets.h
 
 $(obj)/ti-emif-asm-offsets.h: $(obj)/emif-asm-offsets.s FORCE
index 9bcac35c3304586b646e7eeacb8c4fa2ef776f97..d60a8cfd63f35b13ffe775a367abd648a050fe4e 100644 (file)
@@ -28,6 +28,7 @@
 
        .arm
        .align 3
+       .arch armv7-a
 
 ENTRY(ti_emif_sram)
 
index 8e10abb14f8b99e9bbba35e9c52e808a446bb1a6..f849cfa69446b8c965e141456700d63f2b3ce2b4 100644 (file)
@@ -1,4 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_ARM)              += s2-arm.o pm-arm.o
-AFLAGS_s2-arm.o                        := -march=armv7-a
 obj-$(CONFIG_BMIPS_GENERIC)    += s2-mips.o s3-mips.o pm-mips.o
index 5f0c4a8ae9df149d631c8ddadcb7dca6997e801b..0d693795de27f81150105d24c6b5c9baef5084db 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "pm.h"
 
+       .arch armv7-a
        .text
        .align  3