Skip to content

Commit ad8f96c

Browse files
committed
Merge tag 'v5.4.133' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroid-5.4.y
This is the 5.4.133 stable release Change-Id: Ie0e6f9c928edf9acc9a6176d83eca8b6da68c190
2 parents 4b82acb + 795e847 commit ad8f96c

File tree

143 files changed

+895
-438
lines changed

Some content is hidden

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

143 files changed

+895
-438
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
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 = 132
4+
SUBLEVEL = 133
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

arch/mips/boot/compressed/string.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Very small subset of simple string routines
66
*/
77

8+
#include <linux/compiler_attributes.h>
89
#include <linux/types.h>
910

1011
void *memcpy(void *dest, const void *src, size_t n)
@@ -27,3 +28,19 @@ void *memset(void *s, int c, size_t n)
2728
ss[i] = c;
2829
return s;
2930
}
31+
32+
void * __weak memmove(void *dest, const void *src, size_t n)
33+
{
34+
unsigned int i;
35+
const char *s = src;
36+
char *d = dest;
37+
38+
if ((uintptr_t)dest < (uintptr_t)src) {
39+
for (i = 0; i < n; i++)
40+
d[i] = s[i];
41+
} else {
42+
for (i = n; i > 0; i--)
43+
d[i - 1] = s[i - 1];
44+
}
45+
return dest;
46+
}

arch/mips/include/asm/hugetlb.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
5353
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
5454
unsigned long addr, pte_t *ptep)
5555
{
56-
flush_tlb_page(vma, addr & huge_page_mask(hstate_vma(vma)));
56+
/*
57+
* clear the huge pte entry firstly, so that the other smp threads will
58+
* not get old pte entry after finishing flush_tlb_page and before
59+
* setting new huge pte entry
60+
*/
61+
huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
62+
flush_tlb_page(vma, addr);
5763
}
5864

5965
#define __HAVE_ARCH_HUGE_PTE_NONE

arch/mips/include/asm/mipsregs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
20072007
({ int __res; \
20082008
__asm__ __volatile__( \
20092009
".set\tpush\n\t" \
2010-
".set\tmips32r2\n\t" \
2010+
".set\tmips32r5\n\t" \
20112011
_ASM_SET_VIRT \
20122012
"mfgc0\t%0, " #source ", %1\n\t" \
20132013
".set\tpop" \
@@ -2020,7 +2020,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
20202020
({ unsigned long long __res; \
20212021
__asm__ __volatile__( \
20222022
".set\tpush\n\t" \
2023-
".set\tmips64r2\n\t" \
2023+
".set\tmips64r5\n\t" \
20242024
_ASM_SET_VIRT \
20252025
"dmfgc0\t%0, " #source ", %1\n\t" \
20262026
".set\tpop" \
@@ -2033,7 +2033,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
20332033
do { \
20342034
__asm__ __volatile__( \
20352035
".set\tpush\n\t" \
2036-
".set\tmips32r2\n\t" \
2036+
".set\tmips32r5\n\t" \
20372037
_ASM_SET_VIRT \
20382038
"mtgc0\t%z0, " #register ", %1\n\t" \
20392039
".set\tpop" \
@@ -2045,7 +2045,7 @@ do { \
20452045
do { \
20462046
__asm__ __volatile__( \
20472047
".set\tpush\n\t" \
2048-
".set\tmips64r2\n\t" \
2048+
".set\tmips64r5\n\t" \
20492049
_ASM_SET_VIRT \
20502050
"dmtgc0\t%z0, " #register ", %1\n\t" \
20512051
".set\tpop" \

arch/mips/include/asm/pgalloc.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,15 @@ do { \
6262

6363
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
6464
{
65-
pmd_t *pmd;
65+
pmd_t *pmd = NULL;
66+
struct page *pg;
6667

67-
pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER);
68-
if (pmd)
68+
pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER);
69+
if (pg) {
70+
pgtable_pmd_page_ctor(pg);
71+
pmd = (pmd_t *)page_address(pg);
6972
pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table);
73+
}
7074
return pmd;
7175
}
7276

arch/mips/loongson64/loongson-3/numa.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ static void __init node_mem_init(unsigned int node)
200200
if (node_end_pfn(0) >= (0xffffffff >> PAGE_SHIFT))
201201
memblock_reserve((node_addrspace_offset | 0xfe000000),
202202
32 << 20);
203+
204+
/* Reserve pfn range 0~node[0]->node_start_pfn */
205+
memblock_reserve(0, PAGE_SIZE * start_pfn);
203206
}
204207
}
205208

arch/powerpc/include/asm/barrier.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
# define SMPWMB eieio
4545
#endif
4646

47+
/* clang defines this macro for a builtin, which will not work with runtime patching */
48+
#undef __lwsync
4749
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
4850
#define dma_rmb() __lwsync()
4951
#define dma_wmb() __asm__ __volatile__ (stringify_in_c(SMPWMB) : : :"memory")

arch/powerpc/mm/fault.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ static bool bad_kernel_fault(struct pt_regs *regs, unsigned long error_code,
204204
{
205205
int is_exec = TRAP(regs) == 0x400;
206206

207-
/* NX faults set DSISR_PROTFAULT on the 8xx, DSISR_NOEXEC_OR_G on others */
208-
if (is_exec && (error_code & (DSISR_NOEXEC_OR_G | DSISR_KEYFAULT |
209-
DSISR_PROTFAULT))) {
207+
if (is_exec) {
210208
pr_crit_ratelimited("kernel tried to execute %s page (%lx) - exploit attempt? (uid: %d)\n",
211209
address >= TASK_SIZE ? "exec-protected" : "user",
212210
address,

block/blk-rq-qos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data,
266266
if (!has_sleeper && acquire_inflight_cb(rqw, private_data))
267267
return;
268268

269-
prepare_to_wait_exclusive(&rqw->wait, &data.wq, TASK_UNINTERRUPTIBLE);
270-
has_sleeper = !wq_has_single_sleeper(&rqw->wait);
269+
has_sleeper = !prepare_to_wait_exclusive(&rqw->wait, &data.wq,
270+
TASK_UNINTERRUPTIBLE);
271271
do {
272272
/* The memory barrier in set_task_state saves us here. */
273273
if (data.got_token)

drivers/ata/ahci_sunxi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static void ahci_sunxi_start_engine(struct ata_port *ap)
200200
}
201201

202202
static const struct ata_port_info ahci_sunxi_port_info = {
203-
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ,
203+
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ | ATA_FLAG_NO_DIPM,
204204
.pio_mask = ATA_PIO4,
205205
.udma_mask = ATA_UDMA6,
206206
.port_ops = &ahci_platform_ops,

drivers/atm/iphase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3295,7 +3295,7 @@ static void __exit ia_module_exit(void)
32953295
{
32963296
pci_unregister_driver(&ia_driver);
32973297

3298-
del_timer(&ia_timer);
3298+
del_timer_sync(&ia_timer);
32993299
}
33003300

33013301
module_init(ia_module_init);

drivers/atm/nicstar.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static void __exit nicstar_cleanup(void)
297297
{
298298
XPRINTK("nicstar: nicstar_cleanup() called.\n");
299299

300-
del_timer(&ns_timer);
300+
del_timer_sync(&ns_timer);
301301

302302
pci_unregister_driver(&nicstar_driver);
303303

@@ -525,6 +525,15 @@ static int ns_init_card(int i, struct pci_dev *pcidev)
525525
/* Set the VPI/VCI MSb mask to zero so we can receive OAM cells */
526526
writel(0x00000000, card->membase + VPM);
527527

528+
card->intcnt = 0;
529+
if (request_irq
530+
(pcidev->irq, &ns_irq_handler, IRQF_SHARED, "nicstar", card) != 0) {
531+
pr_err("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq);
532+
error = 9;
533+
ns_init_card_error(card, error);
534+
return error;
535+
}
536+
528537
/* Initialize TSQ */
529538
card->tsq.org = dma_alloc_coherent(&card->pcidev->dev,
530539
NS_TSQSIZE + NS_TSQ_ALIGNMENT,
@@ -751,15 +760,6 @@ static int ns_init_card(int i, struct pci_dev *pcidev)
751760

752761
card->efbie = 1;
753762

754-
card->intcnt = 0;
755-
if (request_irq
756-
(pcidev->irq, &ns_irq_handler, IRQF_SHARED, "nicstar", card) != 0) {
757-
printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq);
758-
error = 9;
759-
ns_init_card_error(card, error);
760-
return error;
761-
}
762-
763763
/* Register device */
764764
card->atmdev = atm_dev_register("nicstar", &card->pcidev->dev, &atm_ops,
765765
-1, NULL);
@@ -837,10 +837,12 @@ static void ns_init_card_error(ns_dev *card, int error)
837837
dev_kfree_skb_any(hb);
838838
}
839839
if (error >= 12) {
840-
kfree(card->rsq.org);
840+
dma_free_coherent(&card->pcidev->dev, NS_RSQSIZE + NS_RSQ_ALIGNMENT,
841+
card->rsq.org, card->rsq.dma);
841842
}
842843
if (error >= 11) {
843-
kfree(card->tsq.org);
844+
dma_free_coherent(&card->pcidev->dev, NS_TSQSIZE + NS_TSQ_ALIGNMENT,
845+
card->tsq.org, card->tsq.dma);
844846
}
845847
if (error >= 10) {
846848
free_irq(card->pcidev->irq, card);

drivers/bluetooth/btusb.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,11 +2700,6 @@ static int btusb_mtk_hci_wmt_sync(struct hci_dev *hdev,
27002700
struct btmtk_wmt_hdr *hdr;
27012701
int err;
27022702

2703-
/* Submit control IN URB on demand to process the WMT event */
2704-
err = btusb_mtk_submit_wmt_recv_urb(hdev);
2705-
if (err < 0)
2706-
return err;
2707-
27082703
/* Send the WMT command and wait until the WMT event returns */
27092704
hlen = sizeof(*hdr) + wmt_params->dlen;
27102705
if (hlen > 255)
@@ -2726,6 +2721,11 @@ static int btusb_mtk_hci_wmt_sync(struct hci_dev *hdev,
27262721
return err;
27272722
}
27282723

2724+
/* Submit control IN URB on demand to process the WMT event */
2725+
err = btusb_mtk_submit_wmt_recv_urb(hdev);
2726+
if (err < 0)
2727+
return err;
2728+
27292729
/* The vendor specific WMT commands are all answered by a vendor
27302730
* specific event and will have the Command Status or Command
27312731
* Complete as with usual HCI command flow control.
@@ -3263,6 +3263,11 @@ static int btusb_setup_qca_download_fw(struct hci_dev *hdev,
32633263
sent += size;
32643264
count -= size;
32653265

3266+
/* ep2 need time to switch from function acl to function dfu,
3267+
* so we add 20ms delay here.
3268+
*/
3269+
msleep(20);
3270+
32663271
while (count) {
32673272
size = min_t(size_t, count, QCA_DFU_PACKET_LEN);
32683273

drivers/char/ipmi/ipmi_watchdog.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,18 @@ static int __ipmi_set_timeout(struct ipmi_smi_msg *smi_msg,
366366
data[0] = 0;
367367
WDOG_SET_TIMER_USE(data[0], WDOG_TIMER_USE_SMS_OS);
368368

369-
if ((ipmi_version_major > 1)
370-
|| ((ipmi_version_major == 1) && (ipmi_version_minor >= 5))) {
371-
/* This is an IPMI 1.5-only feature. */
372-
data[0] |= WDOG_DONT_STOP_ON_SET;
373-
} else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
374-
/*
375-
* In ipmi 1.0, setting the timer stops the watchdog, we
376-
* need to start it back up again.
377-
*/
378-
hbnow = 1;
369+
if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
370+
if ((ipmi_version_major > 1) ||
371+
((ipmi_version_major == 1) && (ipmi_version_minor >= 5))) {
372+
/* This is an IPMI 1.5-only feature. */
373+
data[0] |= WDOG_DONT_STOP_ON_SET;
374+
} else {
375+
/*
376+
* In ipmi 1.0, setting the timer stops the watchdog, we
377+
* need to start it back up again.
378+
*/
379+
hbnow = 1;
380+
}
379381
}
380382

381383
data[1] = 0;

drivers/clk/renesas/r8a77995-cpg-mssr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ static const struct cpg_core_clk r8a77995_core_clks[] __initconst = {
7575
DEF_RATE(".oco", CLK_OCO, 8 * 1000 * 1000),
7676

7777
/* Core Clock Outputs */
78+
DEF_FIXED("za2", R8A77995_CLK_ZA2, CLK_PLL0D3, 2, 1),
7879
DEF_FIXED("z2", R8A77995_CLK_Z2, CLK_PLL0D3, 1, 1),
7980
DEF_FIXED("ztr", R8A77995_CLK_ZTR, CLK_PLL1, 6, 1),
8081
DEF_FIXED("zt", R8A77995_CLK_ZT, CLK_PLL1, 4, 1),

drivers/clk/tegra/clk-pll.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,8 @@ static int clk_pllu_enable(struct clk_hw *hw)
10891089
if (pll->lock)
10901090
spin_lock_irqsave(pll->lock, flags);
10911091

1092-
_clk_pll_enable(hw);
1092+
if (!clk_pll_is_enabled(hw))
1093+
_clk_pll_enable(hw);
10931094

10941095
ret = clk_pll_wait_for_lock(pll);
10951096
if (ret < 0)
@@ -1706,15 +1707,13 @@ static int clk_pllu_tegra114_enable(struct clk_hw *hw)
17061707
return -EINVAL;
17071708
}
17081709

1709-
if (clk_pll_is_enabled(hw))
1710-
return 0;
1711-
17121710
input_rate = clk_hw_get_rate(__clk_get_hw(osc));
17131711

17141712
if (pll->lock)
17151713
spin_lock_irqsave(pll->lock, flags);
17161714

1717-
_clk_pll_enable(hw);
1715+
if (!clk_pll_is_enabled(hw))
1716+
_clk_pll_enable(hw);
17181717

17191718
ret = clk_pll_wait_for_lock(pll);
17201719
if (ret < 0)

drivers/clocksource/arm_arch_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ static u64 notrace arm64_858921_read_cntvct_el0(void)
348348
do { \
349349
_val = read_sysreg(reg); \
350350
_retries--; \
351-
} while (((_val + 1) & GENMASK(9, 0)) <= 1 && _retries); \
351+
} while (((_val + 1) & GENMASK(8, 0)) <= 1 && _retries); \
352352
\
353353
WARN_ON_ONCE(!_retries); \
354354
_val; \

drivers/crypto/ccp/psp-dev.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ static int psp_probe_timeout = 5;
4040
module_param(psp_probe_timeout, int, 0644);
4141
MODULE_PARM_DESC(psp_probe_timeout, " default timeout value, in seconds, during PSP device probe");
4242

43+
MODULE_FIRMWARE("amd/amd_sev_fam17h_model0xh.sbin"); /* 1st gen EPYC */
44+
MODULE_FIRMWARE("amd/amd_sev_fam17h_model3xh.sbin"); /* 2nd gen EPYC */
45+
MODULE_FIRMWARE("amd/amd_sev_fam19h_model0xh.sbin"); /* 3rd gen EPYC */
46+
4347
static bool psp_dead;
4448
static int psp_timeout;
4549

drivers/extcon/extcon-intel-mrfld.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
197197
struct intel_soc_pmic *pmic = dev_get_drvdata(dev->parent);
198198
struct regmap *regmap = pmic->regmap;
199199
struct mrfld_extcon_data *data;
200+
unsigned int status;
200201
unsigned int id;
201202
int irq, ret;
202203

@@ -244,6 +245,14 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
244245
/* Get initial state */
245246
mrfld_extcon_role_detect(data);
246247

248+
/*
249+
* Cached status value is used for cable detection, see comments
250+
* in mrfld_extcon_cable_detect(), we need to sync cached value
251+
* with a real state of the hardware.
252+
*/
253+
regmap_read(regmap, BCOVE_SCHGRIRQ1, &status);
254+
data->status = status;
255+
247256
mrfld_extcon_clear(data, BCOVE_MIRQLVL1, BCOVE_LVL1_CHGR);
248257
mrfld_extcon_clear(data, BCOVE_MCHGRIRQ1, BCOVE_CHGRIRQ_ALL);
249258

drivers/firmware/qemu_fw_cfg.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,13 @@ static int fw_cfg_do_platform_probe(struct platform_device *pdev)
296296
return 0;
297297
}
298298

299-
static ssize_t fw_cfg_showrev(struct kobject *k, struct attribute *a, char *buf)
299+
static ssize_t fw_cfg_showrev(struct kobject *k, struct kobj_attribute *a,
300+
char *buf)
300301
{
301302
return sprintf(buf, "%u\n", fw_cfg_rev);
302303
}
303304

304-
static const struct {
305-
struct attribute attr;
306-
ssize_t (*show)(struct kobject *k, struct attribute *a, char *buf);
307-
} fw_cfg_rev_attr = {
305+
static const struct kobj_attribute fw_cfg_rev_attr = {
308306
.attr = { .name = "rev", .mode = S_IRUSR },
309307
.show = fw_cfg_showrev,
310308
};

drivers/fpga/stratix10-soc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ static int s10_remove(struct platform_device *pdev)
476476
struct s10_priv *priv = mgr->priv;
477477

478478
fpga_mgr_unregister(mgr);
479+
fpga_mgr_free(mgr);
479480
stratix10_svc_free_channel(priv->chan);
480481

481482
return 0;

0 commit comments

Comments
 (0)