Skip to content

Commit 0ac000e

Browse files
author
Russell King
committed
Merge branches 'fixes', 'misc' and 'spectre' into for-linus
3 parents 92d44a4 + 83d41fb + 10573ae commit 0ac000e

41 files changed

Lines changed: 1318 additions & 210 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/Kconfig‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,7 @@ config ARCH_WANT_GENERAL_HUGETLB
17041704
config ARM_MODULE_PLTS
17051705
bool "Use PLTs to allow module memory to spill over into vmalloc area"
17061706
depends on MODULES
1707+
default y
17071708
help
17081709
Allocate PLTs when loading modules so that jumps and calls whose
17091710
targets are too far away for their relative offsets to be encoded
@@ -1714,7 +1715,8 @@ config ARM_MODULE_PLTS
17141715
rounding up to page size, the actual memory footprint is usually
17151716
the same.
17161717

1717-
Say y if you are getting out of memory errors while loading modules
1718+
Disabling this is usually safe for small single-platform
1719+
configurations. If unsure, say y.
17181720

17191721
source "mm/Kconfig"
17201722

‎arch/arm/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ tune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
106106
tune-y := $(tune-y)
107107

108108
ifeq ($(CONFIG_AEABI),y)
109-
CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
109+
CFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp
110110
else
111111
CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
112112
endif

‎arch/arm/boot/compressed/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ CFLAGS_fdt_ro.o := $(nossp_flags)
113113
CFLAGS_fdt_rw.o := $(nossp_flags)
114114
CFLAGS_fdt_wip.o := $(nossp_flags)
115115

116-
ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
116+
ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
117117
asflags-y := -DZIMAGE
118118

119119
# Supply kernel BSS size to the decompressor via a linker symbol.

‎arch/arm/include/asm/assembler.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,14 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
447447
.size \name , . - \name
448448
.endm
449449

450+
.macro csdb
451+
#ifdef CONFIG_THUMB2_KERNEL
452+
.inst.w 0xf3af8014
453+
#else
454+
.inst 0xe320f014
455+
#endif
456+
.endm
457+
450458
.macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req
451459
#ifndef CONFIG_CPU_USE_DOMAINS
452460
adds \tmp, \addr, #\size - 1

‎arch/arm/include/asm/barrier.h‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
#define isb(option) __asm__ __volatile__ ("isb " #option : : : "memory")
1818
#define dsb(option) __asm__ __volatile__ ("dsb " #option : : : "memory")
1919
#define dmb(option) __asm__ __volatile__ ("dmb " #option : : : "memory")
20+
#ifdef CONFIG_THUMB2_KERNEL
21+
#define CSDB ".inst.w 0xf3af8014"
22+
#else
23+
#define CSDB ".inst 0xe320f014"
24+
#endif
25+
#define csdb() __asm__ __volatile__(CSDB : : : "memory")
2026
#elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6
2127
#define isb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \
2228
: : "r" (0) : "memory")
@@ -37,6 +43,13 @@
3743
#define dmb(x) __asm__ __volatile__ ("" : : : "memory")
3844
#endif
3945

46+
#ifndef CSDB
47+
#define CSDB
48+
#endif
49+
#ifndef csdb
50+
#define csdb()
51+
#endif
52+
4053
#ifdef CONFIG_ARM_HEAVY_MB
4154
extern void (*soc_mb)(void);
4255
extern void arm_heavy_mb(void);
@@ -63,6 +76,25 @@ extern void arm_heavy_mb(void);
6376
#define __smp_rmb() __smp_mb()
6477
#define __smp_wmb() dmb(ishst)
6578

79+
#ifdef CONFIG_CPU_SPECTRE
80+
static inline unsigned long array_index_mask_nospec(unsigned long idx,
81+
unsigned long sz)
82+
{
83+
unsigned long mask;
84+
85+
asm volatile(
86+
"cmp %1, %2\n"
87+
" sbc %0, %1, %1\n"
88+
CSDB
89+
: "=r" (mask)
90+
: "r" (idx), "Ir" (sz)
91+
: "cc");
92+
93+
return mask;
94+
}
95+
#define array_index_mask_nospec array_index_mask_nospec
96+
#endif
97+
6698
#include <asm-generic/barrier.h>
6799

68100
#endif /* !__ASSEMBLY__ */

‎arch/arm/include/asm/bugs.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
#ifndef __ASM_BUGS_H
1111
#define __ASM_BUGS_H
1212

13-
#ifdef CONFIG_MMU
1413
extern void check_writebuffer_bugs(void);
1514

16-
#define check_bugs() check_writebuffer_bugs()
15+
#ifdef CONFIG_MMU
16+
extern void check_bugs(void);
17+
extern void check_other_bugs(void);
1718
#else
1819
#define check_bugs() do { } while (0)
20+
#define check_other_bugs() do { } while (0)
1921
#endif
2022

2123
#endif

‎arch/arm/include/asm/cp15.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
#define __write_sysreg(v, r, w, c, t) asm volatile(w " " c : : "r" ((t)(v)))
6666
#define write_sysreg(v, ...) __write_sysreg(v, __VA_ARGS__)
6767

68+
#define BPIALL __ACCESS_CP15(c7, 0, c5, 6)
69+
#define ICIALLU __ACCESS_CP15(c7, 0, c5, 0)
70+
6871
extern unsigned long cr_alignment; /* defined in entry-armv.S */
6972

7073
static inline unsigned long get_cr(void)

‎arch/arm/include/asm/cputype.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,16 @@
7777
#define ARM_CPU_PART_CORTEX_A12 0x4100c0d0
7878
#define ARM_CPU_PART_CORTEX_A17 0x4100c0e0
7979
#define ARM_CPU_PART_CORTEX_A15 0x4100c0f0
80+
#define ARM_CPU_PART_CORTEX_A53 0x4100d030
81+
#define ARM_CPU_PART_CORTEX_A57 0x4100d070
82+
#define ARM_CPU_PART_CORTEX_A72 0x4100d080
83+
#define ARM_CPU_PART_CORTEX_A73 0x4100d090
84+
#define ARM_CPU_PART_CORTEX_A75 0x4100d0a0
8085
#define ARM_CPU_PART_MASK 0xff00fff0
8186

87+
/* Broadcom cores */
88+
#define ARM_CPU_PART_BRAHMA_B15 0x420000f0
89+
8290
/* DEC implemented cores */
8391
#define ARM_CPU_PART_SA1100 0x4400a110
8492

‎arch/arm/include/asm/kgdb.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extern int kgdb_fault_expected;
7777

7878
#define KGDB_MAX_NO_CPUS 1
7979
#define BUFMAX 400
80-
#define NUMREGBYTES (DBG_MAX_REG_NUM << 2)
80+
#define NUMREGBYTES (GDB_MAX_REGS << 2)
8181
#define NUMCRITREGBYTES (32 << 2)
8282

8383
#define _R0 0

‎arch/arm/include/asm/kvm_asm.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ struct kvm_vcpu;
6161
extern char __kvm_hyp_init[];
6262
extern char __kvm_hyp_init_end[];
6363

64-
extern char __kvm_hyp_vector[];
65-
6664
extern void __kvm_flush_vm_context(void);
6765
extern void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa);
6866
extern void __kvm_tlb_flush_vmid(struct kvm *kvm);

0 commit comments

Comments
 (0)