Skip to content

Commit

Permalink
Merge tag 'v5.15.40' into 5.15
Browse files Browse the repository at this point in the history
This is the 5.15.40 stable release
  • Loading branch information
xanmod committed May 15, 2022
2 parents 98da5cc + ae76649 commit a1c6c26
Show file tree
Hide file tree
Showing 254 changed files with 1,898 additions and 1,137 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 38
SUBLEVEL = 40
EXTRAVERSION =
NAME = Trick or Treat

Expand Down
8 changes: 4 additions & 4 deletions arch/mips/include/asm/timex.h
Expand Up @@ -40,9 +40,9 @@
typedef unsigned int cycles_t;

/*
* On R4000/R4400 before version 5.0 an erratum exists such that if the
* cycle counter is read in the exact moment that it is matching the
* compare register, no interrupt will be generated.
* On R4000/R4400 an erratum exists such that if the cycle counter is
* read in the exact moment that it is matching the compare register,
* no interrupt will be generated.
*
* There is a suggested workaround and also the erratum can't strike if
* the compare interrupt isn't being used as the clock source device.
Expand All @@ -63,7 +63,7 @@ static inline int can_use_mips_counter(unsigned int prid)
if (!__builtin_constant_p(cpu_has_counter))
asm volatile("" : "=m" (cpu_data[0].options));
if (likely(cpu_has_counter &&
prid >= (PRID_IMP_R4000 | PRID_REV_ENCODE_44(5, 0))))
prid > (PRID_IMP_R4000 | PRID_REV_ENCODE_44(15, 15))))
return 1;
else
return 0;
Expand Down
11 changes: 3 additions & 8 deletions arch/mips/kernel/time.c
Expand Up @@ -141,15 +141,10 @@ static __init int cpu_has_mfc0_count_bug(void)
case CPU_R4400MC:
/*
* The published errata for the R4400 up to 3.0 say the CPU
* has the mfc0 from count bug.
* has the mfc0 from count bug. This seems the last version
* produced.
*/
if ((current_cpu_data.processor_id & 0xff) <= 0x30)
return 1;

/*
* we assume newer revisions are ok
*/
return 0;
return 1;
}

return 0;
Expand Down
3 changes: 1 addition & 2 deletions arch/parisc/kernel/processor.c
Expand Up @@ -418,8 +418,7 @@ show_cpuinfo (struct seq_file *m, void *v)
}
seq_printf(m, " (0x%02lx)\n", boot_cpu_data.pdc.capabilities);

seq_printf(m, "model\t\t: %s\n"
"model name\t: %s\n",
seq_printf(m, "model\t\t: %s - %s\n",
boot_cpu_data.pdc.sys_model_name,
cpuinfo->dev ?
cpuinfo->dev->name : "Unknown");
Expand Down
2 changes: 2 additions & 0 deletions arch/parisc/kernel/setup.c
Expand Up @@ -150,6 +150,8 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_PA11
dma_ops_init();
#endif

clear_sched_clock_stable();
}

/*
Expand Down
6 changes: 1 addition & 5 deletions arch/parisc/kernel/time.c
Expand Up @@ -249,13 +249,9 @@ void __init time_init(void)
static int __init init_cr16_clocksource(void)
{
/*
* The cr16 interval timers are not syncronized across CPUs, even if
* they share the same socket.
* The cr16 interval timers are not synchronized across CPUs.
*/
if (num_online_cpus() > 1 && !running_on_qemu) {
/* mark sched_clock unstable */
clear_sched_clock_stable();

clocksource_cr16.name = "cr16_unstable";
clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
clocksource_cr16.rating = 0;
Expand Down
21 changes: 19 additions & 2 deletions arch/riscv/mm/init.c
Expand Up @@ -218,8 +218,25 @@ static void __init setup_bootmem(void)
* early_init_fdt_reserve_self() since __pa() does
* not work for DTB pointers that are fixmap addresses
*/
if (!IS_ENABLED(CONFIG_BUILTIN_DTB))
memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va));
if (!IS_ENABLED(CONFIG_BUILTIN_DTB)) {
/*
* In case the DTB is not located in a memory region we won't
* be able to locate it later on via the linear mapping and
* get a segfault when accessing it via __va(dtb_early_pa).
* To avoid this situation copy DTB to a memory region.
* Note that memblock_phys_alloc will also reserve DTB region.
*/
if (!memblock_is_memory(dtb_early_pa)) {
size_t fdt_size = fdt_totalsize(dtb_early_va);
phys_addr_t new_dtb_early_pa = memblock_phys_alloc(fdt_size, PAGE_SIZE);
void *new_dtb_early_va = early_memremap(new_dtb_early_pa, fdt_size);

memcpy(new_dtb_early_va, dtb_early_va, fdt_size);
early_memunmap(new_dtb_early_va, fdt_size);
_dtb_early_pa = new_dtb_early_pa;
} else
memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va));
}

early_init_fdt_scan_reserved_mem();
dma_contiguous_reserve(dma32_phys_limit);
Expand Down
12 changes: 12 additions & 0 deletions arch/x86/Kconfig
Expand Up @@ -469,6 +469,18 @@ config RETPOLINE
branches. Requires a compiler with -mindirect-branch=thunk-extern
support for full protection. The kernel may run slower.

config CC_HAS_SLS
def_bool $(cc-option,-mharden-sls=all)

config SLS
bool "Mitigate Straight-Line-Speculation"
depends on CC_HAS_SLS && X86_64
default n
help
Compile the kernel with straight-line-speculation options to guard
against straight line speculation. The kernel image might be slightly
larger.

config X86_CPU_RESCTRL
bool "x86 CPU resource control support"
depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/Makefile
Expand Up @@ -215,6 +215,10 @@ ifdef CONFIG_RETPOLINE
endif
endif

ifdef CONFIG_SLS
KBUILD_CFLAGS += -mharden-sls=all
endif

KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE)

ifdef CONFIG_LTO_CLANG
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/compressed/efi_thunk_64.S
Expand Up @@ -93,7 +93,7 @@ SYM_FUNC_START(__efi64_thunk)

pop %rbx
pop %rbp
ret
RET
SYM_FUNC_END(__efi64_thunk)

.code32
Expand Down
8 changes: 4 additions & 4 deletions arch/x86/boot/compressed/head_64.S
Expand Up @@ -813,7 +813,7 @@ SYM_FUNC_START(efi32_pe_entry)
2: popl %edi // restore callee-save registers
popl %ebx
leave
ret
RET
SYM_FUNC_END(efi32_pe_entry)

.section ".rodata"
Expand Down Expand Up @@ -868,7 +868,7 @@ SYM_FUNC_START(startup32_set_idt_entry)

pop %ecx
pop %ebx
ret
RET
SYM_FUNC_END(startup32_set_idt_entry)
#endif

Expand All @@ -884,7 +884,7 @@ SYM_FUNC_START(startup32_load_idt)
movl %eax, rva(boot32_idt_desc+2)(%ebp)
lidt rva(boot32_idt_desc)(%ebp)
#endif
ret
RET
SYM_FUNC_END(startup32_load_idt)

/*
Expand Down Expand Up @@ -954,7 +954,7 @@ SYM_FUNC_START(startup32_check_sev_cbit)
popl %ebx
popl %eax
#endif
ret
RET
SYM_FUNC_END(startup32_check_sev_cbit)

/*
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/boot/compressed/mem_encrypt.S
Expand Up @@ -58,7 +58,7 @@ SYM_FUNC_START(get_sev_encryption_bit)

#endif /* CONFIG_AMD_MEM_ENCRYPT */

ret
RET
SYM_FUNC_END(get_sev_encryption_bit)

/**
Expand Down Expand Up @@ -92,7 +92,7 @@ SYM_CODE_START_LOCAL(sev_es_req_cpuid)
/* All good - return success */
xorl %eax, %eax
1:
ret
RET
2:
movl $-1, %eax
jmp 1b
Expand Down Expand Up @@ -221,7 +221,7 @@ SYM_FUNC_START(set_sev_encryption_mask)
#endif

xor %rax, %rax
ret
RET
SYM_FUNC_END(set_sev_encryption_mask)

.data
Expand Down

0 comments on commit a1c6c26

Please sign in to comment.