linux/arch/arm/mm
Nick Desaulniers a2faac3986 ARM: 9263/1: use .arch directives instead of assembler command line flags
Similar to commit a6c30873ee ("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: 1d51c699b9
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>
2022-11-08 18:36:17 +00:00
..
abort-ev4.S
abort-ev4t.S
abort-ev5t.S
abort-ev5tj.S
abort-ev6.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
abort-ev7.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
abort-lv4t.S
abort-macro.S
abort-nommu.S
alignment.c ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction 2022-07-06 22:44:49 +01:00
cache-b15-rac.c ARM: mm: fix typos in comments 2022-04-04 10:18:54 -07:00
cache-fa.S
cache-feroceon-l2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1) 2022-06-10 14:51:35 +02:00
cache-l2x0-pmu.c
cache-l2x0.c ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values 2020-09-15 14:35:53 +01:00
cache-nop.S
cache-tauros2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1) 2022-06-10 14:51:35 +02:00
cache-tauros3.h
cache-uniphier.c
cache-v4.S
cache-v4wb.S
cache-v4wt.S
cache-v6.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
cache-v7.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
cache-v7m.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
cache-xsc3l2.c
context.c ARM: mm: make vmalloc_seq handling SMP safe 2022-01-25 09:53:52 +01:00
copypage-fa.c
copypage-feroceon.c ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
copypage-v4mc.c mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
copypage-v4wb.c
copypage-v4wt.c
copypage-v6.c mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
copypage-xsc3.c ARM: PXA: fix multi-cpu build of xsc3 2022-05-07 22:56:16 +02:00
copypage-xscale.c mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
dma-mapping-nommu.c ARM/nommu: use the generic dma-direct code for non-coherent devices 2021-08-18 16:24:10 +02:00
dma-mapping.c ARM: 9240/1: dma-mapping: Pass (void *) to virt_to_page() 2022-10-04 11:09:48 +01:00
dma.h
dump.c ARM: 9246/1: dump: show page table level name 2022-10-04 11:09:48 +01:00
extable.c
fault-armv.c
fault.c ARM: 9254/1: mm: Provide better message when kernel fault 2022-11-07 14:19:00 +00:00
fault.h ARM: 9131/1: mm: Fix PXN process with LPAE feature 2021-10-19 10:35:43 +01:00
flush.c mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
fsr-2level.c
fsr-3level.c
hugetlbpage.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
idmap.c
init.c swiotlb: make the swiotlb_init interface more useful 2022-04-18 07:21:11 +02:00
iomap.c
ioremap.c ARM: mm: kill unused runtime hook arch_iounmap() 2022-06-27 12:21:09 +01:00
kasan_init.c ARM: 9242/1: kasan: Only map modules if CONFIG_KASAN_VMALLOC=n 2022-10-04 11:09:48 +01:00
Kconfig ARM: 9212/1: domain: Modify Kconfig help text 2022-07-06 22:44:49 +01:00
l2c-common.c
l2c-l2x0-resume.S
Makefile ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
mm.h ARM/dma-mapping: Remove CMA code when not built with CMA 2022-03-31 11:19:25 -07:00
mmap.c arm: Use the generic devmem_is_allowed() 2020-12-11 12:28:24 -08:00
mmu.c - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
nommu.c ARM: mm: kill unused runtime hook arch_iounmap() 2022-06-27 12:21:09 +01:00
pabort-legacy.S
pabort-v6.S
pabort-v7.S
pageattr.c ARM: 9164/1: mm: Provide set_memory_valid() 2021-12-17 11:34:36 +00:00
pgd.c ARM: 9016/2: Initialize the mapping of KASan shadow memory 2020-10-27 12:11:10 +00:00
physaddr.c
pmsa-v7.c ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range() 2021-03-25 10:25:20 +00:00
pmsa-v8.c ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range() 2021-03-25 10:25:20 +00:00
proc-arm7tdmi.S
proc-arm9tdmi.S
proc-arm720.S
proc-arm740.S
proc-arm920.S
proc-arm922.S
proc-arm925.S
proc-arm926.S
proc-arm940.S
proc-arm946.S
proc-arm1020.S
proc-arm1020e.S
proc-arm1022.S
proc-arm1026.S
proc-fa526.S
proc-feroceon.S
proc-macros.S Merge branches 'devel-stable' and 'misc' into for-linus 2021-11-02 09:04:22 +00:00
proc-mohawk.S
proc-sa110.S
proc-sa1100.S
proc-syms.c
proc-v6.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
proc-v7-2level.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
proc-v7-3level.S
proc-v7-bugs.c ARM: 9213/1: Print message about disabled Spectre workarounds only once 2022-07-06 22:44:49 +01:00
proc-v7.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
proc-v7m.S ARM: 9168/1: Add support for Cortex-M55 processor 2021-12-17 11:34:40 +00:00
proc-xsc3.S
proc-xscale.S
ptdump_debugfs.c ARM: 9074/1: ptdump: convert to DEFINE_SHOW_ATTRIBUTE 2021-04-18 19:15:13 +01:00
pv-fixup-asm.S ARM: 9104/2: Fix Keystone 2 kernel mapping regression 2021-08-10 12:17:25 +01:00
tcm.h
tlb-fa.S
tlb-v4.S
tlb-v4wb.S
tlb-v4wbi.S
tlb-v6.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
tlb-v7.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00