Skip to content

Commit 44726be

Browse files
committed
Merge tag 'v5.4.118' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroid-5.4.y
This is the 5.4.118 stable release Change-Id: I69e0b92f713bd64337f12c596b657e1921243a99
2 parents 0de67c8 + 1602211 commit 44726be

File tree

196 files changed

+1541
-1051
lines changed

Some content is hidden

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

196 files changed

+1541
-1051
lines changed

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 4
4-
SUBLEVEL = 117
4+
SUBLEVEL = 118
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

@@ -765,16 +765,16 @@ KBUILD_CFLAGS += -Wno-tautological-compare
765765
KBUILD_CFLAGS += -mno-global-merge
766766
else
767767

768-
# These warnings generated too much noise in a regular build.
769-
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
770-
KBUILD_CFLAGS += -Wno-unused-but-set-variable
771-
772768
# Warn about unmarked fall-throughs in switch statement.
773769
# Disabled for clang while comment to attribute conversion happens and
774770
# https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
775771
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
776772
endif
777773

774+
# These warnings generated too much noise in a regular build.
775+
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
776+
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
777+
778778
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
779779
ifdef CONFIG_FRAME_POINTER
780780
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls

arch/arm/boot/compressed/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ asflags-y := -DZIMAGE
122122

123123
# Supply kernel BSS size to the decompressor via a linker symbol.
124124
KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \
125-
sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
126-
-e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
125+
sed -n -e 's/^\([^ ]*\) [ABD] __bss_start$$/-0x\1/p' \
126+
-e 's/^\([^ ]*\) [ABD] __bss_stop$$/+0x\1/p') )) )
127127
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
128128
# Supply ZRELADDR to the decompressor via a linker symbol.
129129
ifneq ($(CONFIG_AUTO_ZRELADDR),y)

arch/arm64/boot/dts/marvell/armada-37xx.dtsi

+2-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@
156156
};
157157

158158
nb_periph_clk: nb-periph-clk@13000 {
159-
compatible = "marvell,armada-3700-periph-clock-nb";
159+
compatible = "marvell,armada-3700-periph-clock-nb",
160+
"syscon";
160161
reg = <0x13000 0x100>;
161162
clocks = <&tbg 0>, <&tbg 1>, <&tbg 2>,
162163
<&tbg 3>, <&xtalclk>;

arch/arm64/boot/dts/mediatek/mt8173.dtsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@
11371137
<&mmsys CLK_MM_DSI1_DIGITAL>,
11381138
<&mipi_tx1>;
11391139
clock-names = "engine", "digital", "hs";
1140-
phy = <&mipi_tx1>;
1140+
phys = <&mipi_tx1>;
11411141
phy-names = "dphy";
11421142
status = "disabled";
11431143
};

arch/arm64/kernel/vdso/vdso.lds.S

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ SECTIONS
2828
.gnu.version_d : { *(.gnu.version_d) }
2929
.gnu.version_r : { *(.gnu.version_r) }
3030

31+
/*
32+
* Discard .note.gnu.property sections which are unused and have
33+
* different alignment requirement from vDSO note sections.
34+
*/
35+
/DISCARD/ : {
36+
*(.note.GNU-stack .note.gnu.property)
37+
}
3138
.note : { *(.note.*) } :text :note
3239

3340
. = ALIGN(16);
@@ -48,7 +55,6 @@ SECTIONS
4855
PROVIDE(end = .);
4956

5057
/DISCARD/ : {
51-
*(.note.GNU-stack)
5258
*(.data .data.* .gnu.linkonce.d.* .sdata*)
5359
*(.bss .sbss .dynbss .dynsbss)
5460
}

arch/powerpc/include/uapi/asm/errno.h

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#ifndef _ASM_POWERPC_ERRNO_H
33
#define _ASM_POWERPC_ERRNO_H
44

5+
#undef EDEADLOCK
56
#include <asm-generic/errno.h>
67

78
#undef EDEADLOCK

arch/powerpc/kernel/eeh.c

+4-7
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,11 @@ static inline unsigned long eeh_token_to_phys(unsigned long token)
368368
pa = pte_pfn(*ptep);
369369

370370
/* On radix we can do hugepage mappings for io, so handle that */
371-
if (hugepage_shift) {
372-
pa <<= hugepage_shift;
373-
pa |= token & ((1ul << hugepage_shift) - 1);
374-
} else {
375-
pa <<= PAGE_SHIFT;
376-
pa |= token & (PAGE_SIZE - 1);
377-
}
371+
if (!hugepage_shift)
372+
hugepage_shift = PAGE_SHIFT;
378373

374+
pa <<= PAGE_SHIFT;
375+
pa |= token & ((1ul << hugepage_shift) - 1);
379376
return pa;
380377
}
381378

arch/s390/crypto/arch_random.c

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ static DECLARE_DELAYED_WORK(arch_rng_work, arch_rng_refill_buffer);
5353

5454
bool s390_arch_random_generate(u8 *buf, unsigned int nbytes)
5555
{
56+
/* max hunk is ARCH_RNG_BUF_SIZE */
57+
if (nbytes > ARCH_RNG_BUF_SIZE)
58+
return false;
59+
5660
/* lock rng buffer */
5761
if (!spin_trylock(&arch_rng_lock))
5862
return false;

arch/s390/kernel/dis.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ void show_code(struct pt_regs *regs)
557557

558558
void print_fn_code(unsigned char *code, unsigned long len)
559559
{
560-
char buffer[64], *ptr;
560+
char buffer[128], *ptr;
561561
int opsize, i;
562562

563563
while (len) {

arch/x86/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding
4040
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
4141
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member)
4242
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))
43+
REALMODE_CFLAGS += $(CLANG_FLAGS)
4344
export REALMODE_CFLAGS
4445

4546
# BITS is used as extension for files which are available in a 32 bit

arch/x86/kernel/cpu/common.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ static void setup_getcpu(int cpu)
18261826
unsigned long cpudata = vdso_encode_cpunode(cpu, early_cpu_to_node(cpu));
18271827
struct desc_struct d = { };
18281828

1829-
if (boot_cpu_has(X86_FEATURE_RDTSCP))
1829+
if (boot_cpu_has(X86_FEATURE_RDTSCP) || boot_cpu_has(X86_FEATURE_RDPID))
18301830
write_rdtscp_aux(cpudata);
18311831

18321832
/* Store CPU and node number in limit. */

crypto/api.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm)
568568
{
569569
struct crypto_alg *alg;
570570

571-
if (unlikely(!mem))
571+
if (IS_ERR_OR_NULL(mem))
572572
return;
573573

574574
alg = tfm->__crt_alg;

crypto/rng.c

+3-7
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,18 @@ int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)
3434
u8 *buf = NULL;
3535
int err;
3636

37-
crypto_stats_get(alg);
3837
if (!seed && slen) {
3938
buf = kmalloc(slen, GFP_KERNEL);
40-
if (!buf) {
41-
crypto_alg_put(alg);
39+
if (!buf)
4240
return -ENOMEM;
43-
}
4441

4542
err = get_random_bytes_wait(buf, slen);
46-
if (err) {
47-
crypto_alg_put(alg);
43+
if (err)
4844
goto out;
49-
}
5045
seed = buf;
5146
}
5247

48+
crypto_stats_get(alg);
5349
err = crypto_rng_alg(tfm)->seed(tfm, seed, slen);
5450
crypto_stats_rng_seed(alg, err);
5551
out:

drivers/acpi/arm64/gtdt.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
329329
int index)
330330
{
331331
struct platform_device *pdev;
332-
int irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
332+
int irq;
333333

334334
/*
335335
* According to SBSA specification the size of refresh and control
@@ -338,7 +338,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
338338
struct resource res[] = {
339339
DEFINE_RES_MEM(wd->control_frame_address, SZ_4K),
340340
DEFINE_RES_MEM(wd->refresh_frame_address, SZ_4K),
341-
DEFINE_RES_IRQ(irq),
341+
{},
342342
};
343343
int nr_res = ARRAY_SIZE(res);
344344

@@ -348,10 +348,11 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
348348

349349
if (!(wd->refresh_frame_address && wd->control_frame_address)) {
350350
pr_err(FW_BUG "failed to get the Watchdog base address.\n");
351-
acpi_unregister_gsi(wd->timer_interrupt);
352351
return -EINVAL;
353352
}
354353

354+
irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
355+
res[2] = (struct resource)DEFINE_RES_IRQ(irq);
355356
if (irq <= 0) {
356357
pr_warn("failed to map the Watchdog interrupt.\n");
357358
nr_res--;
@@ -364,7 +365,8 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
364365
*/
365366
pdev = platform_device_register_simple("sbsa-gwdt", index, res, nr_res);
366367
if (IS_ERR(pdev)) {
367-
acpi_unregister_gsi(wd->timer_interrupt);
368+
if (irq > 0)
369+
acpi_unregister_gsi(wd->timer_interrupt);
368370
return PTR_ERR(pdev);
369371
}
370372

drivers/acpi/custom_method.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
4444
sizeof(struct acpi_table_header)))
4545
return -EFAULT;
4646
uncopied_bytes = max_size = table.length;
47+
/* make sure the buf is not allocated */
48+
kfree(buf);
4749
buf = kzalloc(max_size, GFP_KERNEL);
4850
if (!buf)
4951
return -ENOMEM;
@@ -57,6 +59,7 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
5759
(*ppos + count < count) ||
5860
(count > uncopied_bytes)) {
5961
kfree(buf);
62+
buf = NULL;
6063
return -EINVAL;
6164
}
6265

@@ -78,7 +81,6 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
7881
add_taint(TAINT_OVERRIDDEN_ACPI_TABLE, LOCKDEP_NOW_UNRELIABLE);
7982
}
8083

81-
kfree(buf);
8284
return count;
8385
}
8486

drivers/ata/ahci.c

+5
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
17281728
hpriv->flags |= AHCI_HFLAG_NO_DEVSLP;
17291729

17301730
#ifdef CONFIG_ARM64
1731+
if (pdev->vendor == PCI_VENDOR_ID_HUAWEI &&
1732+
pdev->device == 0xa235 &&
1733+
pdev->revision < 0x30)
1734+
hpriv->flags |= AHCI_HFLAG_NO_SXS;
1735+
17311736
if (pdev->vendor == 0x177d && pdev->device == 0xa01c)
17321737
hpriv->irq_handler = ahci_thunderx_irq_handler;
17331738
#endif

drivers/ata/ahci.h

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ enum {
242242
suspend/resume */
243243
AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP
244244
from phy_power_on() */
245+
AHCI_HFLAG_NO_SXS = (1 << 28), /* SXS not supported */
245246

246247
/* ap->flags bits */
247248

drivers/ata/libahci.c

+5
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,11 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv)
493493
cap |= HOST_CAP_ALPM;
494494
}
495495

496+
if ((cap & HOST_CAP_SXS) && (hpriv->flags & AHCI_HFLAG_NO_SXS)) {
497+
dev_info(dev, "controller does not support SXS, disabling CAP_SXS\n");
498+
cap &= ~HOST_CAP_SXS;
499+
}
500+
496501
if (hpriv->force_port_map && port_map != hpriv->force_port_map) {
497502
dev_info(dev, "forcing port_map 0x%x -> 0x%x\n",
498503
port_map, hpriv->force_port_map);

drivers/bus/ti-sysc.c

+49
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,51 @@ static int sysc_parse_and_check_child_range(struct sysc *ddata)
602602
return 0;
603603
}
604604

605+
/* Interconnect instances to probe before l4_per instances */
606+
static struct resource early_bus_ranges[] = {
607+
/* am3/4 l4_wkup */
608+
{ .start = 0x44c00000, .end = 0x44c00000 + 0x300000, },
609+
/* omap4/5 and dra7 l4_cfg */
610+
{ .start = 0x4a000000, .end = 0x4a000000 + 0x300000, },
611+
/* omap4 l4_wkup */
612+
{ .start = 0x4a300000, .end = 0x4a300000 + 0x30000, },
613+
/* omap5 and dra7 l4_wkup without dra7 dcan segment */
614+
{ .start = 0x4ae00000, .end = 0x4ae00000 + 0x30000, },
615+
};
616+
617+
static atomic_t sysc_defer = ATOMIC_INIT(10);
618+
619+
/**
620+
* sysc_defer_non_critical - defer non_critical interconnect probing
621+
* @ddata: device driver data
622+
*
623+
* We want to probe l4_cfg and l4_wkup interconnect instances before any
624+
* l4_per instances as l4_per instances depend on resources on l4_cfg and
625+
* l4_wkup interconnects.
626+
*/
627+
static int sysc_defer_non_critical(struct sysc *ddata)
628+
{
629+
struct resource *res;
630+
int i;
631+
632+
if (!atomic_read(&sysc_defer))
633+
return 0;
634+
635+
for (i = 0; i < ARRAY_SIZE(early_bus_ranges); i++) {
636+
res = &early_bus_ranges[i];
637+
if (ddata->module_pa >= res->start &&
638+
ddata->module_pa <= res->end) {
639+
atomic_set(&sysc_defer, 0);
640+
641+
return 0;
642+
}
643+
}
644+
645+
atomic_dec_if_positive(&sysc_defer);
646+
647+
return -EPROBE_DEFER;
648+
}
649+
605650
static struct device_node *stdout_path;
606651

607652
static void sysc_init_stdout_path(struct sysc *ddata)
@@ -826,6 +871,10 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
826871
if (error)
827872
return error;
828873

874+
error = sysc_defer_non_critical(ddata);
875+
if (error)
876+
return error;
877+
829878
sysc_check_children(ddata);
830879

831880
error = sysc_parse_registers(ddata);

drivers/char/tpm/eventlog/common.c

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ void tpm_bios_log_setup(struct tpm_chip *chip)
107107
int log_version;
108108
int rc = 0;
109109

110+
if (chip->flags & TPM_CHIP_FLAG_VIRTUAL)
111+
return;
112+
110113
rc = tpm_read_log(chip);
111114
if (rc < 0)
112115
return;

0 commit comments

Comments
 (0)