diff options
| -rw-r--r-- | arch/arm/Makefile | 3 | ||||
| -rw-r--r-- | arch/arm/include/asm/domain.h | 6 | ||||
| -rw-r--r-- | arch/arm/include/asm/futex.h | 3 | ||||
| -rw-r--r-- | arch/arm/include/asm/limits.h | 12 | ||||
| -rw-r--r-- | arch/arm/include/asm/processor.h | 4 | ||||
| -rw-r--r-- | arch/arm/include/asm/uaccess.h | 3 | ||||
| -rw-r--r-- | arch/arm/mm/init.c | 17 | ||||
| -rw-r--r-- | arch/arm/vdso/Makefile | 21 |
8 files changed, 20 insertions, 49 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 05ecc004de86..f863c6935d0e 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -116,8 +116,7 @@ endif | |||
| 116 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) | 116 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) |
| 117 | 117 | ||
| 118 | ifeq ($(CONFIG_THUMB2_KERNEL),y) | 118 | ifeq ($(CONFIG_THUMB2_KERNEL),y) |
| 119 | AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) | 119 | CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN) |
| 120 | CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) | ||
| 121 | AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb | 120 | AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb |
| 122 | # Work around buggy relocation from gas if requested: | 121 | # Work around buggy relocation from gas if requested: |
| 123 | ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) | 122 | ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) |
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index 99d9f630d6b6..1888c2d15da5 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h | |||
| @@ -133,9 +133,11 @@ static inline void modify_domain(unsigned dom, unsigned type) { } | |||
| 133 | * instructions (inline assembly) | 133 | * instructions (inline assembly) |
| 134 | */ | 134 | */ |
| 135 | #ifdef CONFIG_CPU_USE_DOMAINS | 135 | #ifdef CONFIG_CPU_USE_DOMAINS |
| 136 | #define TUSER(instr) #instr "t" | 136 | #define TUSER(instr) TUSERCOND(instr, ) |
| 137 | #define TUSERCOND(instr, cond) #instr "t" #cond | ||
| 137 | #else | 138 | #else |
| 138 | #define TUSER(instr) #instr | 139 | #define TUSER(instr) TUSERCOND(instr, ) |
| 140 | #define TUSERCOND(instr, cond) #instr #cond | ||
| 139 | #endif | 141 | #endif |
| 140 | 142 | ||
| 141 | #else /* __ASSEMBLY__ */ | 143 | #else /* __ASSEMBLY__ */ |
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 0a46676b4245..83c391b597d4 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
| @@ -110,10 +110,11 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
| 110 | preempt_disable(); | 110 | preempt_disable(); |
| 111 | __ua_flags = uaccess_save_and_enable(); | 111 | __ua_flags = uaccess_save_and_enable(); |
| 112 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | 112 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" |
| 113 | " .syntax unified\n" | ||
| 113 | "1: " TUSER(ldr) " %1, [%4]\n" | 114 | "1: " TUSER(ldr) " %1, [%4]\n" |
| 114 | " teq %1, %2\n" | 115 | " teq %1, %2\n" |
| 115 | " it eq @ explicit IT needed for the 2b label\n" | 116 | " it eq @ explicit IT needed for the 2b label\n" |
| 116 | "2: " TUSER(streq) " %3, [%4]\n" | 117 | "2: " TUSERCOND(str, eq) " %3, [%4]\n" |
| 117 | __futex_atomic_ex_table("%5") | 118 | __futex_atomic_ex_table("%5") |
| 118 | : "+r" (ret), "=&r" (val) | 119 | : "+r" (ret), "=&r" (val) |
| 119 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) | 120 | : "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 index ab159371d786..000000000000 --- a/arch/arm/include/asm/limits.h +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __ASM_PIPE_H | ||
| 3 | #define __ASM_PIPE_H | ||
| 4 | |||
| 5 | #ifndef PAGE_SIZE | ||
| 6 | #include <asm/page.h> | ||
| 7 | #endif | ||
| 8 | |||
| 9 | #define PIPE_BUF PAGE_SIZE | ||
| 10 | |||
| 11 | #endif | ||
| 12 | |||
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 57fe73ea0f72..5d06f75ffad4 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
| @@ -135,8 +135,8 @@ static inline void prefetchw(const void *ptr) | |||
| 135 | __asm__ __volatile__( | 135 | __asm__ __volatile__( |
| 136 | ".arch_extension mp\n" | 136 | ".arch_extension mp\n" |
| 137 | __ALT_SMP_ASM( | 137 | __ALT_SMP_ASM( |
| 138 | WASM(pldw) "\t%a0", | 138 | "pldw\t%a0", |
| 139 | WASM(pld) "\t%a0" | 139 | "pld\t%a0" |
| 140 | ) | 140 | ) |
| 141 | :: "p" (ptr)); | 141 | :: "p" (ptr)); |
| 142 | } | 142 | } |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index dff49845eb87..d49ce8f48be3 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
| @@ -112,10 +112,11 @@ static inline void __user *__uaccess_mask_range_ptr(const void __user *ptr, | |||
| 112 | unsigned long tmp; | 112 | unsigned long tmp; |
| 113 | 113 | ||
| 114 | asm volatile( | 114 | asm volatile( |
| 115 | " .syntax unified\n" | ||
| 115 | " sub %1, %3, #1\n" | 116 | " sub %1, %3, #1\n" |
| 116 | " subs %1, %1, %0\n" | 117 | " subs %1, %1, %0\n" |
| 117 | " addhs %1, %1, #1\n" | 118 | " addhs %1, %1, #1\n" |
| 118 | " subhss %1, %1, %2\n" | 119 | " subshs %1, %1, %2\n" |
| 119 | " movlo %0, #0\n" | 120 | " movlo %0, #0\n" |
| 120 | : "+r" (safe_ptr), "=&r" (tmp) | 121 | : "+r" (safe_ptr), "=&r" (tmp) |
| 121 | : "r" (size), "r" (current_thread_info()->addr_limit) | 122 | : "r" (size), "r" (current_thread_info()->addr_limit) |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 68dcd5f8d7c6..be0b42937888 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
| @@ -182,21 +182,6 @@ int pfn_valid(unsigned long pfn) | |||
| 182 | EXPORT_SYMBOL(pfn_valid); | 182 | EXPORT_SYMBOL(pfn_valid); |
| 183 | #endif | 183 | #endif |
| 184 | 184 | ||
| 185 | #ifndef CONFIG_SPARSEMEM | ||
| 186 | static void __init arm_memory_present(void) | ||
| 187 | { | ||
| 188 | } | ||
| 189 | #else | ||
| 190 | static void __init arm_memory_present(void) | ||
| 191 | { | ||
| 192 | struct memblock_region *reg; | ||
| 193 | |||
| 194 | for_each_memblock(memory, reg) | ||
| 195 | memory_present(0, memblock_region_memory_base_pfn(reg), | ||
| 196 | memblock_region_memory_end_pfn(reg)); | ||
| 197 | } | ||
| 198 | #endif | ||
| 199 | |||
| 200 | static bool arm_memblock_steal_permitted = true; | 185 | static bool arm_memblock_steal_permitted = true; |
| 201 | 186 | ||
| 202 | phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) | 187 | phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) |
| @@ -293,7 +278,7 @@ void __init bootmem_init(void) | |||
| 293 | * Sparsemem tries to allocate bootmem in memory_present(), | 278 | * Sparsemem tries to allocate bootmem in memory_present(), |
| 294 | * so must be done after the fixed reservations | 279 | * so must be done after the fixed reservations |
| 295 | */ | 280 | */ |
| 296 | arm_memory_present(); | 281 | memblocks_present(); |
| 297 | 282 | ||
| 298 | /* | 283 | /* |
| 299 | * sparse_init() needs the bootmem allocator up and running. | 284 | * sparse_init() needs the bootmem allocator up and running. |
diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile index f4efff9d3afb..fadf554d9391 100644 --- a/arch/arm/vdso/Makefile +++ b/arch/arm/vdso/Makefile | |||
| @@ -10,12 +10,12 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) | |||
| 10 | ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector | 10 | ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector |
| 11 | ccflags-y += -DDISABLE_BRANCH_PROFILING | 11 | ccflags-y += -DDISABLE_BRANCH_PROFILING |
| 12 | 12 | ||
| 13 | VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 | 13 | ldflags-y = -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ |
| 14 | VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 | 14 | -z max-page-size=4096 -z common-page-size=4096 \ |
| 15 | VDSO_LDFLAGS += -nostdlib -shared | 15 | -nostdlib -shared \ |
| 16 | VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) | 16 | $(call ld-option, --hash-style=sysv) \ |
| 17 | VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id) | 17 | $(call ld-option, --build-id) \ |
| 18 | VDSO_LDFLAGS += $(call cc-ldoption, -fuse-ld=bfd) | 18 | -T |
| 19 | 19 | ||
| 20 | obj-$(CONFIG_VDSO) += vdso.o | 20 | obj-$(CONFIG_VDSO) += vdso.o |
| 21 | extra-$(CONFIG_VDSO) += vdso.lds | 21 | extra-$(CONFIG_VDSO) += vdso.lds |
| @@ -37,8 +37,8 @@ KCOV_INSTRUMENT := n | |||
| 37 | $(obj)/vdso.o : $(obj)/vdso.so | 37 | $(obj)/vdso.o : $(obj)/vdso.so |
| 38 | 38 | ||
| 39 | # Link rule for the .so file | 39 | # Link rule for the .so file |
| 40 | $(obj)/vdso.so.raw: $(src)/vdso.lds $(obj-vdso) FORCE | 40 | $(obj)/vdso.so.raw: $(obj)/vdso.lds $(obj-vdso) FORCE |
| 41 | $(call if_changed,vdsold) | 41 | $(call if_changed,ld) |
| 42 | 42 | ||
| 43 | $(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/vdsomunge FORCE | 43 | $(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/vdsomunge FORCE |
| 44 | $(call if_changed,vdsomunge) | 44 | $(call if_changed,vdsomunge) |
| @@ -48,11 +48,6 @@ $(obj)/%.so: OBJCOPYFLAGS := -S | |||
| 48 | $(obj)/%.so: $(obj)/%.so.dbg FORCE | 48 | $(obj)/%.so: $(obj)/%.so.dbg FORCE |
| 49 | $(call if_changed,objcopy) | 49 | $(call if_changed,objcopy) |
| 50 | 50 | ||
| 51 | # Actual build commands | ||
| 52 | quiet_cmd_vdsold = VDSO $@ | ||
| 53 | cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \ | ||
| 54 | -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@ | ||
| 55 | |||
| 56 | quiet_cmd_vdsomunge = MUNGE $@ | 51 | quiet_cmd_vdsomunge = MUNGE $@ |
| 57 | cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@ | 52 | cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@ |
| 58 | 53 | ||
