Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 May 2019 16:41:54 +0000 (09:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 May 2019 16:41:54 +0000 (09:41 -0700)
Pull ARM updates from Russell King:
 "ARM development updates:

   - more unified assembly conversions for clang

   - drop obsolete -mauto-it assembler option

   - remove arm_memory_present in preference to the generic version

   - remove unused asm/limits.h header

   - vdso linker update

  We tried to make the assembler warn if unified syntax was not used,
  but unfortunately older versions of GCC warn, so the commit had to be
  reverted"

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  Revert "ARM: 8846/1: warn if divided syntax assembler is used"
  ARM: 8858/1: vdso: use $(LD) instead of $(CC) to link VDSO
  ARM: 8855/1: remove unused <asm/limits.h>
  ARM: 8850/1: use memblocks_present
  ARM: 8854/1: drop -mauto-it
  ARM: 8846/1: warn if divided syntax assembler is used
  ARM: 8853/1: drop WASM to work around LLVM issue
  ARM: 8852/1: uaccess: use unified assembler language syntax
  ARM: 8851/1: add TUSERCOND() macro for conditional postfix

arch/arm/Makefile
arch/arm/include/asm/domain.h
arch/arm/include/asm/futex.h
arch/arm/include/asm/limits.h [deleted file]
arch/arm/include/asm/processor.h
arch/arm/include/asm/uaccess.h
arch/arm/mm/init.c
arch/arm/vdso/Makefile

index 05ecc004de867a5d24ea251cd84649476c21efdc..f863c6935d0e5008ce70da79245f96afe5fbeb6f 100644 (file)
@@ -116,8 +116,7 @@ endif
 AFLAGS_NOWARN  :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
 
 ifeq ($(CONFIG_THUMB2_KERNEL),y)
-AFLAGS_AUTOIT  :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it)
-CFLAGS_ISA     :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN)
+CFLAGS_ISA     :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN)
 AFLAGS_ISA     :=$(CFLAGS_ISA) -Wa$(comma)-mthumb
 # Work around buggy relocation from gas if requested:
 ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y)
index 99d9f630d6b6838954bde8ddbdd90b0b5ace17b8..1888c2d15da5463e8020a88a93c87ef6cb52448d 100644 (file)
@@ -133,9 +133,11 @@ static inline void modify_domain(unsigned dom, unsigned type)      { }
  * instructions (inline assembly)
  */
 #ifdef CONFIG_CPU_USE_DOMAINS
-#define TUSER(instr)   #instr "t"
+#define TUSER(instr)           TUSERCOND(instr, )
+#define TUSERCOND(instr, cond) #instr "t" #cond
 #else
-#define TUSER(instr)   #instr
+#define TUSER(instr)           TUSERCOND(instr, )
+#define TUSERCOND(instr, cond) #instr #cond
 #endif
 
 #else /* __ASSEMBLY__ */
index 0a46676b4245b3d15292eac1c03f5915033d8cae..83c391b597d45f82f107ac55103bf80b52b8045a 100644 (file)
@@ -110,10 +110,11 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
        preempt_disable();
        __ua_flags = uaccess_save_and_enable();
        __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
+       "       .syntax unified\n"
        "1:     " TUSER(ldr) "  %1, [%4]\n"
        "       teq     %1, %2\n"
        "       it      eq      @ explicit IT needed for the 2b label\n"
-       "2:     " TUSER(streq) "        %3, [%4]\n"
+       "2:     " TUSERCOND(str, eq) "  %3, [%4]\n"
        __futex_atomic_ex_table("%5")
        : "+r" (ret), "=&r" (val)
        : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
diff --git a/arch/arm/include/asm/limits.h b/arch/arm/include/asm/limits.h
deleted file mode 100644 (file)
index ab15937..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_PIPE_H
-#define __ASM_PIPE_H
-
-#ifndef PAGE_SIZE
-#include <asm/page.h>
-#endif
-
-#define PIPE_BUF       PAGE_SIZE
-
-#endif
-
index 57fe73ea0f7258af4315ea6b7fcecea7566d838e..5d06f75ffad47ab486b43552ca7814d50086cdba 100644 (file)
@@ -135,8 +135,8 @@ static inline void prefetchw(const void *ptr)
        __asm__ __volatile__(
                ".arch_extension        mp\n"
                __ALT_SMP_ASM(
-                       WASM(pldw)              "\t%a0",
-                       WASM(pld)               "\t%a0"
+                       "pldw\t%a0",
+                       "pld\t%a0"
                )
                :: "p" (ptr));
 }
index dff49845eb87628a007776e695fc4103db1a7a58..d49ce8f48be38bbc4c8fc4c357dfacf9a79a29f5 100644 (file)
@@ -112,10 +112,11 @@ static inline void __user *__uaccess_mask_range_ptr(const void __user *ptr,
        unsigned long tmp;
 
        asm volatile(
+       "       .syntax unified\n"
        "       sub     %1, %3, #1\n"
        "       subs    %1, %1, %0\n"
        "       addhs   %1, %1, #1\n"
-       "       subhss  %1, %1, %2\n"
+       "       subshs  %1, %1, %2\n"
        "       movlo   %0, #0\n"
        : "+r" (safe_ptr), "=&r" (tmp)
        : "r" (size), "r" (current_thread_info()->addr_limit)
index 68dcd5f8d7c63d2d1c0f7be00d07840faf45efbc..be0b42937888d734aa386978d4ad57263bda874e 100644 (file)
@@ -182,21 +182,6 @@ int pfn_valid(unsigned long pfn)
 EXPORT_SYMBOL(pfn_valid);
 #endif
 
-#ifndef CONFIG_SPARSEMEM
-static void __init arm_memory_present(void)
-{
-}
-#else
-static void __init arm_memory_present(void)
-{
-       struct memblock_region *reg;
-
-       for_each_memblock(memory, reg)
-               memory_present(0, memblock_region_memory_base_pfn(reg),
-                              memblock_region_memory_end_pfn(reg));
-}
-#endif
-
 static bool arm_memblock_steal_permitted = true;
 
 phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
@@ -293,7 +278,7 @@ void __init bootmem_init(void)
         * Sparsemem tries to allocate bootmem in memory_present(),
         * so must be done after the fixed reservations
         */
-       arm_memory_present();
+       memblocks_present();
 
        /*
         * sparse_init() needs the bootmem allocator up and running.
index f4efff9d3afbb68e6ae9d09f0b4cd3538bb66f63..fadf554d939176c99db0c6e7ac5a0f2acca70b4c 100644 (file)
@@ -10,12 +10,12 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
 ccflags-y += -DDISABLE_BRANCH_PROFILING
 
-VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
-VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
-VDSO_LDFLAGS += -nostdlib -shared
-VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
-VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
-VDSO_LDFLAGS += $(call cc-ldoption, -fuse-ld=bfd)
+ldflags-y = -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
+           -z max-page-size=4096 -z common-page-size=4096 \
+           -nostdlib -shared \
+           $(call ld-option, --hash-style=sysv) \
+           $(call ld-option, --build-id) \
+           -T
 
 obj-$(CONFIG_VDSO) += vdso.o
 extra-$(CONFIG_VDSO) += vdso.lds
@@ -37,8 +37,8 @@ KCOV_INSTRUMENT := n
 $(obj)/vdso.o : $(obj)/vdso.so
 
 # Link rule for the .so file
-$(obj)/vdso.so.raw: $(src)/vdso.lds $(obj-vdso) FORCE
-       $(call if_changed,vdsold)
+$(obj)/vdso.so.raw: $(obj)/vdso.lds $(obj-vdso) FORCE
+       $(call if_changed,ld)
 
 $(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/vdsomunge FORCE
        $(call if_changed,vdsomunge)
@@ -48,11 +48,6 @@ $(obj)/%.so: OBJCOPYFLAGS := -S
 $(obj)/%.so: $(obj)/%.so.dbg FORCE
        $(call if_changed,objcopy)
 
-# Actual build commands
-quiet_cmd_vdsold = VDSO    $@
-      cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
-                   -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
-
 quiet_cmd_vdsomunge = MUNGE   $@
       cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@