Skip to content

Commit

Permalink
Merge tag 'v5.8.6' into 5.8
Browse files Browse the repository at this point in the history
This is the 5.8.6 stable release
  • Loading branch information
xanmod committed Sep 3, 2020
2 parents 65efbed + 66534fe commit cd64b82
Show file tree
Hide file tree
Showing 312 changed files with 2,868 additions and 1,333 deletions.
3 changes: 3 additions & 0 deletions Documentation/admin-guide/ext4.rst
Expand Up @@ -482,6 +482,9 @@ Files in /sys/fs/ext4/<devname>:
multiple of this tuning parameter if the stripe size is not set in the
ext4 superblock

mb_max_inode_prealloc
The maximum length of per-inode ext4_prealloc_space list.

mb_max_to_scan
The maximum number of extents the multiblock allocator will search to
find the best extent.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 8
SUBLEVEL = 5
SUBLEVEL = 6
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/ls1021a.dtsi
Expand Up @@ -772,7 +772,7 @@
fsl,tmr-prsc = <2>;
fsl,tmr-add = <0xaaaaaaab>;
fsl,tmr-fiper1 = <999999995>;
fsl,tmr-fiper2 = <99990>;
fsl,tmr-fiper2 = <999999995>;
fsl,max-adj = <499999999>;
fsl,extts-fifo;
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/Makefile
Expand Up @@ -158,7 +158,8 @@ zinstall install:
PHONY += vdso_install
vdso_install:
$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso32 $@
$(if $(CONFIG_COMPAT_VDSO), \
$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso32 $@)

# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
Expand Up @@ -569,7 +569,7 @@
pins = "gpio63", "gpio64", "gpio65", "gpio66",
"gpio67", "gpio68";
drive-strength = <2>;
bias-disable;
bias-pull-down;
};
};
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/include/asm/kvm_arm.h
Expand Up @@ -71,11 +71,12 @@
* IMO: Override CPSR.I and enable signaling with VI
* FMO: Override CPSR.F and enable signaling with VF
* SWIO: Turn set/way invalidates into set/way clean+invalidate
* PTW: Take a stage2 fault if a stage1 walk steps in device memory
*/
#define HCR_GUEST_FLAGS (HCR_TSC | HCR_TSW | HCR_TWE | HCR_TWI | HCR_VM | \
HCR_BSU_IS | HCR_FB | HCR_TAC | \
HCR_AMO | HCR_SWIO | HCR_TIDCP | HCR_RW | HCR_TLOR | \
HCR_FMO | HCR_IMO)
HCR_FMO | HCR_IMO | HCR_PTW )
#define HCR_VIRT_EXCP_MASK (HCR_VSE | HCR_VI | HCR_VF)
#define HCR_HOST_NVHE_FLAGS (HCR_RW | HCR_API | HCR_APK)
#define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H)
Expand Down
7 changes: 6 additions & 1 deletion arch/arm64/include/asm/smp.h
Expand Up @@ -46,7 +46,12 @@ DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);
* Logical CPU mapping.
*/
extern u64 __cpu_logical_map[NR_CPUS];
#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
extern u64 cpu_logical_map(int cpu);

static inline void set_cpu_logical_map(int cpu, u64 hwid)
{
__cpu_logical_map[cpu] = hwid;
}

struct seq_file;

Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/kernel/cpu_errata.c
Expand Up @@ -910,6 +910,8 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
.desc = "ARM erratum 1418040",
.capability = ARM64_WORKAROUND_1418040,
ERRATA_MIDR_RANGE_LIST(erratum_1418040_list),
.type = (ARM64_CPUCAP_SCOPE_LOCAL_CPU |
ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU),
},
#endif
#ifdef CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT
Expand Down
21 changes: 0 additions & 21 deletions arch/arm64/kernel/entry.S
Expand Up @@ -169,19 +169,6 @@ alternative_cb_end
stp x28, x29, [sp, #16 * 14]

.if \el == 0
.if \regsize == 32
/*
* If we're returning from a 32-bit task on a system affected by
* 1418040 then re-enable userspace access to the virtual counter.
*/
#ifdef CONFIG_ARM64_ERRATUM_1418040
alternative_if ARM64_WORKAROUND_1418040
mrs x0, cntkctl_el1
orr x0, x0, #2 // ARCH_TIMER_USR_VCT_ACCESS_EN
msr cntkctl_el1, x0
alternative_else_nop_endif
#endif
.endif
clear_gp_regs
mrs x21, sp_el0
ldr_this_cpu tsk, __entry_task, x20
Expand Down Expand Up @@ -337,14 +324,6 @@ alternative_else_nop_endif
tst x22, #PSR_MODE32_BIT // native task?
b.eq 3f

#ifdef CONFIG_ARM64_ERRATUM_1418040
alternative_if ARM64_WORKAROUND_1418040
mrs x0, cntkctl_el1
bic x0, x0, #2 // ARCH_TIMER_USR_VCT_ACCESS_EN
msr cntkctl_el1, x0
alternative_else_nop_endif
#endif

#ifdef CONFIG_ARM64_ERRATUM_845719
alternative_if ARM64_WORKAROUND_845719
#ifdef CONFIG_PID_IN_CONTEXTIDR
Expand Down
34 changes: 34 additions & 0 deletions arch/arm64/kernel/process.c
Expand Up @@ -515,6 +515,39 @@ static void entry_task_switch(struct task_struct *next)
__this_cpu_write(__entry_task, next);
}

/*
* ARM erratum 1418040 handling, affecting the 32bit view of CNTVCT.
* Assuming the virtual counter is enabled at the beginning of times:
*
* - disable access when switching from a 64bit task to a 32bit task
* - enable access when switching from a 32bit task to a 64bit task
*/
static void erratum_1418040_thread_switch(struct task_struct *prev,
struct task_struct *next)
{
bool prev32, next32;
u64 val;

if (!(IS_ENABLED(CONFIG_ARM64_ERRATUM_1418040) &&
cpus_have_const_cap(ARM64_WORKAROUND_1418040)))
return;

prev32 = is_compat_thread(task_thread_info(prev));
next32 = is_compat_thread(task_thread_info(next));

if (prev32 == next32)
return;

val = read_sysreg(cntkctl_el1);

if (!next32)
val |= ARCH_TIMER_USR_VCT_ACCESS_EN;
else
val &= ~ARCH_TIMER_USR_VCT_ACCESS_EN;

write_sysreg(val, cntkctl_el1);
}

/*
* Thread switching.
*/
Expand All @@ -530,6 +563,7 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev,
entry_task_switch(next);
uao_thread_switch(next);
ssbs_thread_switch(next);
erratum_1418040_thread_switch(prev, next);

/*
* Complete any pending TLB or cache maintenance on this CPU in case
Expand Down
8 changes: 7 additions & 1 deletion arch/arm64/kernel/setup.c
Expand Up @@ -85,7 +85,7 @@ u64 __cacheline_aligned boot_args[4];
void __init smp_setup_processor_id(void)
{
u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK;
cpu_logical_map(0) = mpidr;
set_cpu_logical_map(0, mpidr);

/*
* clear __my_cpu_offset on boot CPU to avoid hang caused by
Expand Down Expand Up @@ -276,6 +276,12 @@ arch_initcall(reserve_memblock_reserved_regions);

u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID };

u64 cpu_logical_map(int cpu)
{
return __cpu_logical_map[cpu];
}
EXPORT_SYMBOL_GPL(cpu_logical_map);

void __init setup_arch(char **cmdline_p)
{
init_mm.start_code = (unsigned long) _text;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm64/kernel/smp.c
Expand Up @@ -567,7 +567,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
return;

/* map the logical cpu id to cpu MPIDR */
cpu_logical_map(cpu_count) = hwid;
set_cpu_logical_map(cpu_count, hwid);

cpu_madt_gicc[cpu_count] = *processor;

Expand Down Expand Up @@ -681,7 +681,7 @@ static void __init of_parse_and_init_cpus(void)
goto next;

pr_debug("cpu logical map 0x%llx\n", hwid);
cpu_logical_map(cpu_count) = hwid;
set_cpu_logical_map(cpu_count, hwid);

early_map_cpu_to_node(cpu_count, of_node_to_nid(dn));
next:
Expand Down Expand Up @@ -722,7 +722,7 @@ void __init smp_init_cpus(void)
for (i = 1; i < nr_cpu_ids; i++) {
if (cpu_logical_map(i) != INVALID_HWID) {
if (smp_cpu_setup(i))
cpu_logical_map(i) = INVALID_HWID;
set_cpu_logical_map(i, INVALID_HWID);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kvm/hyp/switch.c
Expand Up @@ -897,7 +897,7 @@ static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par,
* making sure it is a kernel address and not a PC-relative
* reference.
*/
asm volatile("ldr %0, =__hyp_panic_string" : "=r" (str_va));
asm volatile("ldr %0, =%1" : "=r" (str_va) : "S" (__hyp_panic_string));

__hyp_do_panic(str_va,
spsr, elr,
Expand Down
1 change: 1 addition & 0 deletions arch/mips/Kconfig
Expand Up @@ -2203,6 +2203,7 @@ endchoice

config KVM_GUEST
bool "KVM Guest Kernel"
depends on CPU_MIPS32_R2
depends on BROKEN_ON_SMP
help
Select this option if building a guest kernel for KVM (Trap & Emulate)
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/kvm/Kconfig
Expand Up @@ -37,10 +37,11 @@ choice

config KVM_MIPS_TE
bool "Trap & Emulate"
depends on CPU_MIPS32_R2
help
Use trap and emulate to virtualize 32-bit guests in user mode. This
does not require any special hardware Virtualization support beyond
standard MIPS32/64 r2 or later, but it does require the guest kernel
standard MIPS32 r2 or later, but it does require the guest kernel
to be configured with CONFIG_KVM_GUEST=y so that it resides in the
user address segment.

Expand Down
10 changes: 10 additions & 0 deletions arch/mips/vdso/genvdso.c
Expand Up @@ -122,6 +122,7 @@ static void *map_vdso(const char *path, size_t *_size)
if (fstat(fd, &stat) != 0) {
fprintf(stderr, "%s: Failed to stat '%s': %s\n", program_name,
path, strerror(errno));
close(fd);
return NULL;
}

Expand All @@ -130,6 +131,7 @@ static void *map_vdso(const char *path, size_t *_size)
if (addr == MAP_FAILED) {
fprintf(stderr, "%s: Failed to map '%s': %s\n", program_name,
path, strerror(errno));
close(fd);
return NULL;
}

Expand All @@ -139,6 +141,7 @@ static void *map_vdso(const char *path, size_t *_size)
if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) {
fprintf(stderr, "%s: '%s' is not an ELF file\n", program_name,
path);
close(fd);
return NULL;
}

Expand All @@ -150,6 +153,7 @@ static void *map_vdso(const char *path, size_t *_size)
default:
fprintf(stderr, "%s: '%s' has invalid ELF class\n",
program_name, path);
close(fd);
return NULL;
}

Expand All @@ -161,22 +165,26 @@ static void *map_vdso(const char *path, size_t *_size)
default:
fprintf(stderr, "%s: '%s' has invalid ELF data order\n",
program_name, path);
close(fd);
return NULL;
}

if (swap_uint16(ehdr->e_machine) != EM_MIPS) {
fprintf(stderr,
"%s: '%s' has invalid ELF machine (expected EM_MIPS)\n",
program_name, path);
close(fd);
return NULL;
} else if (swap_uint16(ehdr->e_type) != ET_DYN) {
fprintf(stderr,
"%s: '%s' has invalid ELF type (expected ET_DYN)\n",
program_name, path);
close(fd);
return NULL;
}

*_size = stat.st_size;
close(fd);
return addr;
}

Expand Down Expand Up @@ -293,10 +301,12 @@ int main(int argc, char **argv)
/* Calculate and write symbol offsets to <output file> */
if (!get_symbols(dbg_vdso_path, dbg_vdso)) {
unlink(out_path);
fclose(out_file);
return EXIT_FAILURE;
}

fprintf(out_file, "};\n");
fclose(out_file);

return EXIT_SUCCESS;
}
23 changes: 18 additions & 5 deletions arch/powerpc/perf/core-book3s.c
Expand Up @@ -1517,9 +1517,16 @@ static int power_pmu_add(struct perf_event *event, int ef_flags)
ret = 0;
out:
if (has_branch_stack(event)) {
power_pmu_bhrb_enable(event);
cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
event->attr.branch_sample_type);
u64 bhrb_filter = -1;

if (ppmu->bhrb_filter_map)
bhrb_filter = ppmu->bhrb_filter_map(
event->attr.branch_sample_type);

if (bhrb_filter != -1) {
cpuhw->bhrb_filter = bhrb_filter;
power_pmu_bhrb_enable(event);
}
}

perf_pmu_enable(event->pmu);
Expand Down Expand Up @@ -1841,7 +1848,6 @@ static int power_pmu_event_init(struct perf_event *event)
int n;
int err;
struct cpu_hw_events *cpuhw;
u64 bhrb_filter;

if (!ppmu)
return -ENOENT;
Expand Down Expand Up @@ -1947,7 +1953,10 @@ static int power_pmu_event_init(struct perf_event *event)
err = power_check_constraints(cpuhw, events, cflags, n + 1);

if (has_branch_stack(event)) {
bhrb_filter = ppmu->bhrb_filter_map(
u64 bhrb_filter = -1;

if (ppmu->bhrb_filter_map)
bhrb_filter = ppmu->bhrb_filter_map(
event->attr.branch_sample_type);

if (bhrb_filter == -1) {
Expand Down Expand Up @@ -2101,6 +2110,10 @@ static void record_and_restart(struct perf_event *event, unsigned long val,

if (perf_event_overflow(event, &data, regs))
power_pmu_stop(event, 0);
} else if (period) {
/* Account for interrupt in case of invalid SIAR */
if (perf_event_account_interrupt(event))
power_pmu_stop(event, 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/Kconfig.cputype
Expand Up @@ -36,7 +36,7 @@ config PPC_BOOK3S_6xx
select PPC_HAVE_PMU_SUPPORT
select PPC_HAVE_KUEP
select PPC_HAVE_KUAP
select HAVE_ARCH_VMAP_STACK
select HAVE_ARCH_VMAP_STACK if !ADB_PMU

config PPC_BOOK3S_601
bool "PowerPC 601"
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/cell/Kconfig
Expand Up @@ -44,6 +44,7 @@ config SPU_FS
tristate "SPU file system"
default m
depends on PPC_CELL
depends on COREDUMP
select SPU_BASE
help
The SPU file system is used to access Synergistic Processing
Expand Down

0 comments on commit cd64b82

Please sign in to comment.