Skip to content

Commit 0de67c8

Browse files
committed
Merge tag 'v5.4.117' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroid-5.4.y
This is the 5.4.117 stable release Change-Id: Ia0719ad00d98cede9f340690f7b9d6a1e3897080
2 parents 2e2b96c + b5dbcd0 commit 0de67c8

File tree

22 files changed

+181
-85
lines changed

22 files changed

+181
-85
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 = 116
4+
SUBLEVEL = 117
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

arch/mips/include/asm/vdso/gettimeofday.h

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626

2727
#define __VDSO_USE_SYSCALL ULLONG_MAX
2828

29+
#if MIPS_ISA_REV < 6
30+
#define VDSO_SYSCALL_CLOBBERS "hi", "lo",
31+
#else
32+
#define VDSO_SYSCALL_CLOBBERS
33+
#endif
34+
2935
static __always_inline long gettimeofday_fallback(
3036
struct __kernel_old_timeval *_tv,
3137
struct timezone *_tz)
@@ -41,7 +47,9 @@ static __always_inline long gettimeofday_fallback(
4147
: "=r" (ret), "=r" (error)
4248
: "r" (tv), "r" (tz), "r" (nr)
4349
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
44-
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
50+
"$14", "$15", "$24", "$25",
51+
VDSO_SYSCALL_CLOBBERS
52+
"memory");
4553

4654
return error ? -ret : ret;
4755
}
@@ -65,7 +73,9 @@ static __always_inline long clock_gettime_fallback(
6573
: "=r" (ret), "=r" (error)
6674
: "r" (clkid), "r" (ts), "r" (nr)
6775
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
68-
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
76+
"$14", "$15", "$24", "$25",
77+
VDSO_SYSCALL_CLOBBERS
78+
"memory");
6979

7080
return error ? -ret : ret;
7181
}
@@ -89,7 +99,9 @@ static __always_inline int clock_getres_fallback(
8999
: "=r" (ret), "=r" (error)
90100
: "r" (clkid), "r" (ts), "r" (nr)
91101
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
92-
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
102+
"$14", "$15", "$24", "$25",
103+
VDSO_SYSCALL_CLOBBERS
104+
"memory");
93105

94106
return error ? -ret : ret;
95107
}
@@ -113,7 +125,9 @@ static __always_inline long clock_gettime32_fallback(
113125
: "=r" (ret), "=r" (error)
114126
: "r" (clkid), "r" (ts), "r" (nr)
115127
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
116-
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
128+
"$14", "$15", "$24", "$25",
129+
VDSO_SYSCALL_CLOBBERS
130+
"memory");
117131

118132
return error ? -ret : ret;
119133
}
@@ -133,7 +147,9 @@ static __always_inline int clock_getres32_fallback(
133147
: "=r" (ret), "=r" (error)
134148
: "r" (clkid), "r" (ts), "r" (nr)
135149
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
136-
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
150+
"$14", "$15", "$24", "$25",
151+
VDSO_SYSCALL_CLOBBERS
152+
"memory");
137153

138154
return error ? -ret : ret;
139155
}

arch/x86/kernel/acpi/boot.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,10 +1553,18 @@ void __init acpi_boot_table_init(void)
15531553
/*
15541554
* Initialize the ACPI boot-time table parser.
15551555
*/
1556-
if (acpi_table_init()) {
1556+
if (acpi_locate_initial_tables())
15571557
disable_acpi();
1558-
return;
1559-
}
1558+
else
1559+
acpi_reserve_initial_tables();
1560+
}
1561+
1562+
int __init early_acpi_boot_init(void)
1563+
{
1564+
if (acpi_disabled)
1565+
return 1;
1566+
1567+
acpi_table_init_complete();
15601568

15611569
acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);
15621570

@@ -1569,18 +1577,9 @@ void __init acpi_boot_table_init(void)
15691577
} else {
15701578
printk(KERN_WARNING PREFIX "Disabling ACPI support\n");
15711579
disable_acpi();
1572-
return;
1580+
return 1;
15731581
}
15741582
}
1575-
}
1576-
1577-
int __init early_acpi_boot_init(void)
1578-
{
1579-
/*
1580-
* If acpi_disabled, bail out
1581-
*/
1582-
if (acpi_disabled)
1583-
return 1;
15841583

15851584
/*
15861585
* Process the Multiple APIC Description Table (MADT), if present

arch/x86/kernel/setup.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,18 +1196,15 @@ void __init setup_arch(char **cmdline_p)
11961196
reserve_initrd();
11971197

11981198
acpi_table_upgrade();
1199+
/* Look for ACPI tables and reserve memory occupied by them. */
1200+
acpi_boot_table_init();
11991201

12001202
vsmp_init();
12011203

12021204
io_delay_init();
12031205

12041206
early_platform_quirks();
12051207

1206-
/*
1207-
* Parse the ACPI tables for possible boot-time SMP configuration.
1208-
*/
1209-
acpi_boot_table_init();
1210-
12111208
early_acpi_boot_init();
12121209

12131210
initmem_init();

drivers/acpi/tables.c

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,15 +791,15 @@ acpi_status acpi_os_table_override(struct acpi_table_header *existing_table,
791791
}
792792

793793
/*
794-
* acpi_table_init()
794+
* acpi_locate_initial_tables()
795795
*
796796
* find RSDP, find and checksum SDT/XSDT.
797797
* checksum all tables, print SDT/XSDT
798798
*
799799
* result: sdt_entry[] is initialized
800800
*/
801801

802-
int __init acpi_table_init(void)
802+
int __init acpi_locate_initial_tables(void)
803803
{
804804
acpi_status status;
805805

@@ -814,9 +814,45 @@ int __init acpi_table_init(void)
814814
status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
815815
if (ACPI_FAILURE(status))
816816
return -EINVAL;
817-
acpi_table_initrd_scan();
818817

818+
return 0;
819+
}
820+
821+
void __init acpi_reserve_initial_tables(void)
822+
{
823+
int i;
824+
825+
for (i = 0; i < ACPI_MAX_TABLES; i++) {
826+
struct acpi_table_desc *table_desc = &initial_tables[i];
827+
u64 start = table_desc->address;
828+
u64 size = table_desc->length;
829+
830+
if (!start || !size)
831+
break;
832+
833+
pr_info("Reserving %4s table memory at [mem 0x%llx-0x%llx]\n",
834+
table_desc->signature.ascii, start, start + size - 1);
835+
836+
memblock_reserve(start, size);
837+
}
838+
}
839+
840+
void __init acpi_table_init_complete(void)
841+
{
842+
acpi_table_initrd_scan();
819843
check_multiple_madt();
844+
}
845+
846+
int __init acpi_table_init(void)
847+
{
848+
int ret;
849+
850+
ret = acpi_locate_initial_tables();
851+
if (ret)
852+
return ret;
853+
854+
acpi_table_init_complete();
855+
820856
return 0;
821857
}
822858

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4326,8 +4326,7 @@ static void igb_setup_mrqc(struct igb_adapter *adapter)
43264326
else
43274327
mrqc |= E1000_MRQC_ENABLE_VMDQ;
43284328
} else {
4329-
if (hw->mac.type != e1000_i211)
4330-
mrqc |= E1000_MRQC_ENABLE_RSS_MQ;
4329+
mrqc |= E1000_MRQC_ENABLE_RSS_MQ;
43314330
}
43324331
igb_vmm_control(adapter);
43334332

drivers/net/usb/ax88179_178a.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,12 @@ static int ax88179_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
295295
int ret;
296296

297297
if (2 == size) {
298-
u16 buf;
298+
u16 buf = 0;
299299
ret = __ax88179_read_cmd(dev, cmd, value, index, size, &buf, 0);
300300
le16_to_cpus(&buf);
301301
*((u16 *)data) = buf;
302302
} else if (4 == size) {
303-
u32 buf;
303+
u32 buf = 0;
304304
ret = __ax88179_read_cmd(dev, cmd, value, index, size, &buf, 0);
305305
le32_to_cpus(&buf);
306306
*((u32 *)data) = buf;

drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ static int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans,
705705
const u8 *cmddata[IWL_MAX_CMD_TBS_PER_TFD];
706706
u16 cmdlen[IWL_MAX_CMD_TBS_PER_TFD];
707707
struct iwl_tfh_tfd *tfd;
708+
unsigned long flags2;
708709

709710
copy_size = sizeof(struct iwl_cmd_header_wide);
710711
cmd_size = sizeof(struct iwl_cmd_header_wide);
@@ -773,14 +774,14 @@ static int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans,
773774
goto free_dup_buf;
774775
}
775776

776-
spin_lock_bh(&txq->lock);
777+
spin_lock_irqsave(&txq->lock, flags2);
777778

778779
idx = iwl_pcie_get_cmd_index(txq, txq->write_ptr);
779780
tfd = iwl_pcie_get_tfd(trans, txq, txq->write_ptr);
780781
memset(tfd, 0, sizeof(*tfd));
781782

782783
if (iwl_queue_space(trans, txq) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) {
783-
spin_unlock_bh(&txq->lock);
784+
spin_unlock_irqrestore(&txq->lock, flags2);
784785

785786
IWL_ERR(trans, "No space in command queue\n");
786787
iwl_op_mode_cmd_queue_full(trans->op_mode);
@@ -915,7 +916,7 @@ static int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans,
915916
spin_unlock_irqrestore(&trans_pcie->reg_lock, flags);
916917

917918
out:
918-
spin_unlock_bh(&txq->lock);
919+
spin_unlock_irqrestore(&txq->lock, flags2);
919920
free_dup_buf:
920921
if (idx < 0)
921922
kfree(dup_buf);

drivers/net/wireless/intel/iwlwifi/pcie/tx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
15441544
u32 cmd_pos;
15451545
const u8 *cmddata[IWL_MAX_CMD_TBS_PER_TFD];
15461546
u16 cmdlen[IWL_MAX_CMD_TBS_PER_TFD];
1547+
unsigned long flags2;
15471548

15481549
if (WARN(!trans->wide_cmd_header &&
15491550
group_id > IWL_ALWAYS_LONG_GROUP,
@@ -1627,10 +1628,10 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
16271628
goto free_dup_buf;
16281629
}
16291630

1630-
spin_lock_bh(&txq->lock);
1631+
spin_lock_irqsave(&txq->lock, flags2);
16311632

16321633
if (iwl_queue_space(trans, txq) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) {
1633-
spin_unlock_bh(&txq->lock);
1634+
spin_unlock_irqrestore(&txq->lock, flags2);
16341635

16351636
IWL_ERR(trans, "No space in command queue\n");
16361637
iwl_op_mode_cmd_queue_full(trans->op_mode);
@@ -1791,7 +1792,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
17911792
spin_unlock_irqrestore(&trans_pcie->reg_lock, flags);
17921793

17931794
out:
1794-
spin_unlock_bh(&txq->lock);
1795+
spin_unlock_irqrestore(&txq->lock, flags2);
17951796
free_dup_buf:
17961797
if (idx < 0)
17971798
kfree(dup_buf);

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6284,6 +6284,7 @@ enum thermal_access_mode {
62846284
enum { /* TPACPI_THERMAL_TPEC_* */
62856285
TP_EC_THERMAL_TMP0 = 0x78, /* ACPI EC regs TMP 0..7 */
62866286
TP_EC_THERMAL_TMP8 = 0xC0, /* ACPI EC regs TMP 8..15 */
6287+
TP_EC_FUNCREV = 0xEF, /* ACPI EC Functional revision */
62876288
TP_EC_THERMAL_TMP_NA = -128, /* ACPI EC sensor not available */
62886289

62896290
TPACPI_THERMAL_SENSOR_NA = -128000, /* Sensor not available */
@@ -6482,7 +6483,7 @@ static const struct attribute_group thermal_temp_input8_group = {
64826483

64836484
static int __init thermal_init(struct ibm_init_struct *iibm)
64846485
{
6485-
u8 t, ta1, ta2;
6486+
u8 t, ta1, ta2, ver = 0;
64866487
int i;
64876488
int acpi_tmp7;
64886489
int res;
@@ -6497,7 +6498,14 @@ static int __init thermal_init(struct ibm_init_struct *iibm)
64976498
* 0x78-0x7F, 0xC0-0xC7. Registers return 0x00 for
64986499
* non-implemented, thermal sensors return 0x80 when
64996500
* not available
6501+
* The above rule is unfortunately flawed. This has been seen with
6502+
* 0xC2 (power supply ID) causing thermal control problems.
6503+
* The EC version can be determined by offset 0xEF and at least for
6504+
* version 3 the Lenovo firmware team confirmed that registers 0xC0-0xC7
6505+
* are not thermal registers.
65006506
*/
6507+
if (!acpi_ec_read(TP_EC_FUNCREV, &ver))
6508+
pr_warn("Thinkpad ACPI EC unable to access EC version\n");
65016509

65026510
ta1 = ta2 = 0;
65036511
for (i = 0; i < 8; i++) {
@@ -6507,11 +6515,13 @@ static int __init thermal_init(struct ibm_init_struct *iibm)
65076515
ta1 = 0;
65086516
break;
65096517
}
6510-
if (acpi_ec_read(TP_EC_THERMAL_TMP8 + i, &t)) {
6511-
ta2 |= t;
6512-
} else {
6513-
ta1 = 0;
6514-
break;
6518+
if (ver < 3) {
6519+
if (acpi_ec_read(TP_EC_THERMAL_TMP8 + i, &t)) {
6520+
ta2 |= t;
6521+
} else {
6522+
ta1 = 0;
6523+
break;
6524+
}
65156525
}
65166526
}
65176527
if (ta1 == 0) {
@@ -6524,9 +6534,12 @@ static int __init thermal_init(struct ibm_init_struct *iibm)
65246534
thermal_read_mode = TPACPI_THERMAL_NONE;
65256535
}
65266536
} else {
6527-
thermal_read_mode =
6528-
(ta2 != 0) ?
6529-
TPACPI_THERMAL_TPEC_16 : TPACPI_THERMAL_TPEC_8;
6537+
if (ver >= 3)
6538+
thermal_read_mode = TPACPI_THERMAL_TPEC_8;
6539+
else
6540+
thermal_read_mode =
6541+
(ta2 != 0) ?
6542+
TPACPI_THERMAL_TPEC_16 : TPACPI_THERMAL_TPEC_8;
65306543
}
65316544
} else if (acpi_tmp7) {
65326545
if (tpacpi_is_ibm() &&

0 commit comments

Comments
 (0)