Skip to content

Commit

Permalink
Merge tag 'v5.4.62' into 5.4
Browse files Browse the repository at this point in the history
This is the 5.4.62 stable release
  • Loading branch information
xanmod committed Sep 4, 2020
2 parents d976101 + 933cf1c commit a96981e
Show file tree
Hide file tree
Showing 231 changed files with 2,124 additions and 1,013 deletions.
13 changes: 10 additions & 3 deletions Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 61
SUBLEVEL = 62
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down Expand Up @@ -442,6 +442,12 @@ PYTHON = python
PYTHON3 = python3
CHECK = sparse
BASH = bash
KGZIP = gzip
KBZIP2 = bzip2
KLZOP = lzop
LZMA = lzma
LZ4 = lz4c
XZ = xz

CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
Expand Down Expand Up @@ -490,6 +496,7 @@ CLANG_FLAGS :=
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF PAHOLE LEX YACC AWK INSTALLKERNEL
export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE

export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS
Expand Down Expand Up @@ -997,10 +1004,10 @@ export mod_strip_cmd
mod_compress_cmd = true
ifdef CONFIG_MODULE_COMPRESS
ifdef CONFIG_MODULE_COMPRESS_GZIP
mod_compress_cmd = gzip -n -f
mod_compress_cmd = $(KGZIP) -n -f
endif # CONFIG_MODULE_COMPRESS_GZIP
ifdef CONFIG_MODULE_COMPRESS_XZ
mod_compress_cmd = xz -f
mod_compress_cmd = $(XZ) -f
endif # CONFIG_MODULE_COMPRESS_XZ
endif # CONFIG_MODULE_COMPRESS
export mod_compress_cmd
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/deflate_xip_data.sh
Expand Up @@ -56,7 +56,7 @@ trap 'rm -f "$XIPIMAGE.tmp"; exit 1' 1 2 3
# substitute the data section by a compressed version
$DD if="$XIPIMAGE" count=$data_start iflag=count_bytes of="$XIPIMAGE.tmp"
$DD if="$XIPIMAGE" skip=$data_start iflag=skip_bytes |
gzip -9 >> "$XIPIMAGE.tmp"
$KGZIP -9 >> "$XIPIMAGE.tmp"

# replace kernel binary
mv -f "$XIPIMAGE.tmp" "$XIPIMAGE"
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/ls1021a.dtsi
Expand Up @@ -753,7 +753,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 @@ -146,7 +146,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 @@ -521,7 +521,7 @@
pins = "gpio63", "gpio64", "gpio65", "gpio66",
"gpio67", "gpio68";
drive-strength = <2>;
bias-disable;
bias-pull-down;
};
};
};
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 @@ -917,6 +917,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_ERRATUM_1165522
Expand Down
34 changes: 34 additions & 0 deletions arch/arm64/kernel/process.c
Expand Up @@ -498,6 +498,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 @@ -514,6 +547,7 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev,
uao_thread_switch(next);
ptrauth_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 @@ -549,7 +549,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 @@ -663,7 +663,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 @@ -704,7 +704,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 @@ -754,7 +754,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
2 changes: 1 addition & 1 deletion arch/ia64/Makefile
Expand Up @@ -40,7 +40,7 @@ $(error Sorry, you need a newer version of the assember, one that is built from
endif

quiet_cmd_gzip = GZIP $@
cmd_gzip = cat $(real-prereqs) | gzip -n -f -9 > $@
cmd_gzip = cat $(real-prereqs) | $(KGZIP) -n -f -9 > $@

quiet_cmd_objcopy = OBJCOPY $@
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
Expand Down
8 changes: 4 additions & 4 deletions arch/m68k/Makefile
Expand Up @@ -135,10 +135,10 @@ vmlinux.gz: vmlinux
ifndef CONFIG_KGDB
cp vmlinux vmlinux.tmp
$(STRIP) vmlinux.tmp
gzip -9c vmlinux.tmp >vmlinux.gz
$(KGZIP) -9c vmlinux.tmp >vmlinux.gz
rm vmlinux.tmp
else
gzip -9c vmlinux >vmlinux.gz
$(KGZIP) -9c vmlinux >vmlinux.gz
endif

bzImage: vmlinux.bz2
Expand All @@ -148,10 +148,10 @@ vmlinux.bz2: vmlinux
ifndef CONFIG_KGDB
cp vmlinux vmlinux.tmp
$(STRIP) vmlinux.tmp
bzip2 -1c vmlinux.tmp >vmlinux.bz2
$(KBZIP2) -1c vmlinux.tmp >vmlinux.bz2
rm vmlinux.tmp
else
bzip2 -1c vmlinux >vmlinux.bz2
$(KBZIP2) -1c vmlinux >vmlinux.bz2
endif

archclean:
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 @@ -280,10 +288,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;
}
2 changes: 1 addition & 1 deletion arch/parisc/Makefile
Expand Up @@ -156,7 +156,7 @@ vmlinuz: bzImage
$(OBJCOPY) $(boot)/bzImage $@
else
vmlinuz: vmlinux
@gzip -cf -9 $< > $@
@$(KGZIP) -cf -9 $< > $@
endif

install:
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/cpu_setup_power.S
Expand Up @@ -184,7 +184,7 @@ __init_LPCR_ISA300:

__init_FSCR:
mfspr r3,SPRN_FSCR
ori r3,r3,FSCR_TAR|FSCR_DSCR|FSCR_EBB
ori r3,r3,FSCR_TAR|FSCR_EBB
mtspr SPRN_FSCR,r3
blr

Expand Down
23 changes: 18 additions & 5 deletions arch/powerpc/perf/core-book3s.c
Expand Up @@ -1522,9 +1522,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 @@ -1846,7 +1853,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 @@ -1952,7 +1958,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 @@ -2106,6 +2115,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
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 a96981e

Please sign in to comment.