Skip to content

Commit ca469a7

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.76' into linux-linaro-lsk-v4.4
This is the 4.4.76 stable release
2 parents 03a929f + 4282d39 commit ca469a7

96 files changed

Lines changed: 665 additions & 445 deletions

File tree

Some content is hidden

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

Documentation/sysctl/kernel.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -810,14 +810,13 @@ via the /proc/sys interface:
810810
Each write syscall must fully contain the sysctl value to be
811811
written, and multiple writes on the same sysctl file descriptor
812812
will rewrite the sysctl value, regardless of file position.
813-
0 - (default) Same behavior as above, but warn about processes that
814-
perform writes to a sysctl file descriptor when the file position
815-
is not 0.
816-
1 - Respect file position when writing sysctl strings. Multiple writes
817-
will append to the sysctl value buffer. Anything past the max length
818-
of the sysctl value buffer will be ignored. Writes to numeric sysctl
819-
entries must always be at file position 0 and the value must be
820-
fully contained in the buffer sent in the write syscall.
813+
0 - Same behavior as above, but warn about processes that perform writes
814+
to a sysctl file descriptor when the file position is not 0.
815+
1 - (default) Respect file position when writing sysctl strings. Multiple
816+
writes will append to the sysctl value buffer. Anything past the max
817+
length of the sysctl value buffer will be ignored. Writes to numeric
818+
sysctl entries must always be at file position 0 and the value must
819+
be fully contained in the buffer sent in the write syscall.
821820

822821
==============================================================
823822

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 75
3+
SUBLEVEL = 76
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

@@ -633,6 +633,12 @@ endif
633633
# Tell gcc to never replace conditional load with a non-conditional one
634634
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
635635

636+
# check for 'asm goto'
637+
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
638+
KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
639+
KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
640+
endif
641+
636642
ifdef CONFIG_READABLE_ASM
637643
# Disable optimizations that make assembler listings hard to read.
638644
# reorder blocks reorders the control in the function
@@ -788,12 +794,6 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
788794
# use the deterministic mode of AR if available
789795
KBUILD_ARFLAGS := $(call ar-option,D)
790796

791-
# check for 'asm goto'
792-
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
793-
KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
794-
KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
795-
endif
796-
797797
include scripts/Makefile.kasan
798798
include scripts/Makefile.extrawarn
799799

arch/arm/boot/dts/bcm5301x.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
timer@0200 {
5555
compatible = "arm,cortex-a9-global-timer";
5656
reg = <0x0200 0x100>;
57-
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
57+
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
5858
clocks = <&clk_periph>;
5959
};
6060

6161
local-timer@0600 {
6262
compatible = "arm,cortex-a9-twd-timer";
6363
reg = <0x0600 0x100>;
64-
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
64+
interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
6565
clocks = <&clk_periph>;
6666
};
6767

arch/arm/mm/mmu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,15 +1184,15 @@ void __init sanity_check_meminfo(void)
11841184

11851185
high_memory = __va(arm_lowmem_limit - 1) + 1;
11861186

1187+
if (!memblock_limit)
1188+
memblock_limit = arm_lowmem_limit;
1189+
11871190
/*
11881191
* Round the memblock limit down to a pmd size. This
11891192
* helps to ensure that we will allocate memory from the
11901193
* last full pmd, which should be mapped.
11911194
*/
1192-
if (memblock_limit)
1193-
memblock_limit = round_down(memblock_limit, PMD_SIZE);
1194-
if (!memblock_limit)
1195-
memblock_limit = arm_lowmem_limit;
1195+
memblock_limit = round_down(memblock_limit, PMD_SIZE);
11961196

11971197
memblock_set_current_limit(memblock_limit);
11981198
}

arch/arm64/include/asm/acpi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
#define ACPI_MADT_GICC_LENGTH \
2323
(acpi_gbl_FADT.header.revision < 6 ? 76 : 80)
2424

25-
#define BAD_MADT_GICC_ENTRY(entry, end) \
26-
(!(entry) || (unsigned long)(entry) + sizeof(*(entry)) > (end) || \
27-
(entry)->header.length != ACPI_MADT_GICC_LENGTH)
25+
#define BAD_MADT_GICC_ENTRY(entry, end) \
26+
(!(entry) || (entry)->header.length != ACPI_MADT_GICC_LENGTH || \
27+
(unsigned long)(entry) + ACPI_MADT_GICC_LENGTH > (end))
2828

2929
/* Basic configuration for ACPI */
3030
#ifdef CONFIG_ACPI

arch/mips/ath79/common.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ void ath79_ddr_set_pci_windows(void)
7676
{
7777
BUG_ON(!ath79_ddr_pci_win_base);
7878

79-
__raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0);
80-
__raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 1);
81-
__raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 2);
82-
__raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 3);
83-
__raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 4);
84-
__raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 5);
85-
__raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 6);
86-
__raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 7);
79+
__raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0x0);
80+
__raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 0x4);
81+
__raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 0x8);
82+
__raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 0xc);
83+
__raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 0x10);
84+
__raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 0x14);
85+
__raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 0x18);
86+
__raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 0x1c);
8787
}
8888
EXPORT_SYMBOL_GPL(ath79_ddr_set_pci_windows);
8989

arch/mips/kernel/entry.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <asm/asm.h>
1212
#include <asm/asmmacro.h>
1313
#include <asm/compiler.h>
14+
#include <asm/irqflags.h>
1415
#include <asm/regdef.h>
1516
#include <asm/mipsregs.h>
1617
#include <asm/stackframe.h>
@@ -137,6 +138,7 @@ work_pending:
137138
andi t0, a2, _TIF_NEED_RESCHED # a2 is preloaded with TI_FLAGS
138139
beqz t0, work_notifysig
139140
work_resched:
141+
TRACE_IRQS_OFF
140142
jal schedule
141143

142144
local_irq_disable # make sure need_resched and
@@ -173,6 +175,7 @@ syscall_exit_work:
173175
beqz t0, work_pending # trace bit set?
174176
local_irq_enable # could let syscall_trace_leave()
175177
# call schedule() instead
178+
TRACE_IRQS_ON
176179
move a0, sp
177180
jal syscall_trace_leave
178181
b resume_userspace

arch/mips/kernel/pm-cps.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ DECLARE_BITMAP(state_support, CPS_PM_STATE_COUNT);
5555
* state. Actually per-core rather than per-CPU.
5656
*/
5757
static DEFINE_PER_CPU_ALIGNED(u32*, ready_count);
58-
static DEFINE_PER_CPU_ALIGNED(void*, ready_count_alloc);
5958

6059
/* Indicates online CPUs coupled with the current CPU */
6160
static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
@@ -625,7 +624,6 @@ static int __init cps_gen_core_entries(unsigned cpu)
625624
{
626625
enum cps_pm_state state;
627626
unsigned core = cpu_data[cpu].core;
628-
unsigned dlinesz = cpu_data[cpu].dcache.linesz;
629627
void *entry_fn, *core_rc;
630628

631629
for (state = CPS_PM_NC_WAIT; state < CPS_PM_STATE_COUNT; state++) {
@@ -645,16 +643,11 @@ static int __init cps_gen_core_entries(unsigned cpu)
645643
}
646644

647645
if (!per_cpu(ready_count, core)) {
648-
core_rc = kmalloc(dlinesz * 2, GFP_KERNEL);
646+
core_rc = kmalloc(sizeof(u32), GFP_KERNEL);
649647
if (!core_rc) {
650648
pr_err("Failed allocate core %u ready_count\n", core);
651649
return -ENOMEM;
652650
}
653-
per_cpu(ready_count_alloc, core) = core_rc;
654-
655-
/* Ensure ready_count is aligned to a cacheline boundary */
656-
core_rc += dlinesz - 1;
657-
core_rc = (void *)((unsigned long)core_rc & ~(dlinesz - 1));
658651
per_cpu(ready_count, core) = core_rc;
659652
}
660653

arch/mips/kernel/traps.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ void show_stack(struct task_struct *task, unsigned long *sp)
194194
{
195195
struct pt_regs regs;
196196
mm_segment_t old_fs = get_fs();
197+
198+
regs.cp0_status = KSU_KERNEL;
197199
if (sp) {
198200
regs.regs[29] = (unsigned long)sp;
199201
regs.regs[31] = 0;

arch/mips/ralink/mt7620.c

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -107,31 +107,31 @@ static struct rt2880_pmx_group mt7620a_pinmux_data[] = {
107107
};
108108

109109
static struct rt2880_pmx_func pwm1_grp_mt7628[] = {
110-
FUNC("sdcx", 3, 19, 1),
110+
FUNC("sdxc d6", 3, 19, 1),
111111
FUNC("utif", 2, 19, 1),
112112
FUNC("gpio", 1, 19, 1),
113-
FUNC("pwm", 0, 19, 1),
113+
FUNC("pwm1", 0, 19, 1),
114114
};
115115

116116
static struct rt2880_pmx_func pwm0_grp_mt7628[] = {
117-
FUNC("sdcx", 3, 18, 1),
117+
FUNC("sdxc d7", 3, 18, 1),
118118
FUNC("utif", 2, 18, 1),
119119
FUNC("gpio", 1, 18, 1),
120-
FUNC("pwm", 0, 18, 1),
120+
FUNC("pwm0", 0, 18, 1),
121121
};
122122

123123
static struct rt2880_pmx_func uart2_grp_mt7628[] = {
124-
FUNC("sdcx", 3, 20, 2),
124+
FUNC("sdxc d5 d4", 3, 20, 2),
125125
FUNC("pwm", 2, 20, 2),
126126
FUNC("gpio", 1, 20, 2),
127-
FUNC("uart", 0, 20, 2),
127+
FUNC("uart2", 0, 20, 2),
128128
};
129129

130130
static struct rt2880_pmx_func uart1_grp_mt7628[] = {
131-
FUNC("sdcx", 3, 45, 2),
131+
FUNC("sw_r", 3, 45, 2),
132132
FUNC("pwm", 2, 45, 2),
133133
FUNC("gpio", 1, 45, 2),
134-
FUNC("uart", 0, 45, 2),
134+
FUNC("uart1", 0, 45, 2),
135135
};
136136

137137
static struct rt2880_pmx_func i2c_grp_mt7628[] = {
@@ -143,21 +143,21 @@ static struct rt2880_pmx_func i2c_grp_mt7628[] = {
143143

144144
static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 36, 1) };
145145
static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 37, 1) };
146-
static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 15, 38) };
146+
static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) };
147147
static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) };
148148

149149
static struct rt2880_pmx_func sd_mode_grp_mt7628[] = {
150150
FUNC("jtag", 3, 22, 8),
151151
FUNC("utif", 2, 22, 8),
152152
FUNC("gpio", 1, 22, 8),
153-
FUNC("sdcx", 0, 22, 8),
153+
FUNC("sdxc", 0, 22, 8),
154154
};
155155

156156
static struct rt2880_pmx_func uart0_grp_mt7628[] = {
157157
FUNC("-", 3, 12, 2),
158158
FUNC("-", 2, 12, 2),
159159
FUNC("gpio", 1, 12, 2),
160-
FUNC("uart", 0, 12, 2),
160+
FUNC("uart0", 0, 12, 2),
161161
};
162162

163163
static struct rt2880_pmx_func i2s_grp_mt7628[] = {
@@ -171,7 +171,7 @@ static struct rt2880_pmx_func spi_cs1_grp_mt7628[] = {
171171
FUNC("-", 3, 6, 1),
172172
FUNC("refclk", 2, 6, 1),
173173
FUNC("gpio", 1, 6, 1),
174-
FUNC("spi", 0, 6, 1),
174+
FUNC("spi cs1", 0, 6, 1),
175175
};
176176

177177
static struct rt2880_pmx_func spis_grp_mt7628[] = {
@@ -188,28 +188,44 @@ static struct rt2880_pmx_func gpio_grp_mt7628[] = {
188188
FUNC("gpio", 0, 11, 1),
189189
};
190190

191-
#define MT7628_GPIO_MODE_MASK 0x3
192-
193-
#define MT7628_GPIO_MODE_PWM1 30
194-
#define MT7628_GPIO_MODE_PWM0 28
195-
#define MT7628_GPIO_MODE_UART2 26
196-
#define MT7628_GPIO_MODE_UART1 24
197-
#define MT7628_GPIO_MODE_I2C 20
198-
#define MT7628_GPIO_MODE_REFCLK 18
199-
#define MT7628_GPIO_MODE_PERST 16
200-
#define MT7628_GPIO_MODE_WDT 14
201-
#define MT7628_GPIO_MODE_SPI 12
202-
#define MT7628_GPIO_MODE_SDMODE 10
203-
#define MT7628_GPIO_MODE_UART0 8
204-
#define MT7628_GPIO_MODE_I2S 6
205-
#define MT7628_GPIO_MODE_CS1 4
206-
#define MT7628_GPIO_MODE_SPIS 2
207-
#define MT7628_GPIO_MODE_GPIO 0
191+
static struct rt2880_pmx_func wled_kn_grp_mt7628[] = {
192+
FUNC("rsvd", 3, 35, 1),
193+
FUNC("rsvd", 2, 35, 1),
194+
FUNC("gpio", 1, 35, 1),
195+
FUNC("wled_kn", 0, 35, 1),
196+
};
197+
198+
static struct rt2880_pmx_func wled_an_grp_mt7628[] = {
199+
FUNC("rsvd", 3, 44, 1),
200+
FUNC("rsvd", 2, 44, 1),
201+
FUNC("gpio", 1, 44, 1),
202+
FUNC("wled_an", 0, 44, 1),
203+
};
204+
205+
#define MT7628_GPIO_MODE_MASK 0x3
206+
207+
#define MT7628_GPIO_MODE_WLED_KN 48
208+
#define MT7628_GPIO_MODE_WLED_AN 32
209+
#define MT7628_GPIO_MODE_PWM1 30
210+
#define MT7628_GPIO_MODE_PWM0 28
211+
#define MT7628_GPIO_MODE_UART2 26
212+
#define MT7628_GPIO_MODE_UART1 24
213+
#define MT7628_GPIO_MODE_I2C 20
214+
#define MT7628_GPIO_MODE_REFCLK 18
215+
#define MT7628_GPIO_MODE_PERST 16
216+
#define MT7628_GPIO_MODE_WDT 14
217+
#define MT7628_GPIO_MODE_SPI 12
218+
#define MT7628_GPIO_MODE_SDMODE 10
219+
#define MT7628_GPIO_MODE_UART0 8
220+
#define MT7628_GPIO_MODE_I2S 6
221+
#define MT7628_GPIO_MODE_CS1 4
222+
#define MT7628_GPIO_MODE_SPIS 2
223+
#define MT7628_GPIO_MODE_GPIO 0
208224

209225
static struct rt2880_pmx_group mt7628an_pinmux_data[] = {
210-
GRP_G("pmw1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK,
226+
GRP_G("pwm1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK,
211227
1, MT7628_GPIO_MODE_PWM1),
212-
GRP_G("pmw1", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK,
228+
GRP_G("pwm0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK,
213229
1, MT7628_GPIO_MODE_PWM0),
214230
GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK,
215231
1, MT7628_GPIO_MODE_UART2),
@@ -233,6 +249,10 @@ static struct rt2880_pmx_group mt7628an_pinmux_data[] = {
233249
1, MT7628_GPIO_MODE_SPIS),
234250
GRP_G("gpio", gpio_grp_mt7628, MT7628_GPIO_MODE_MASK,
235251
1, MT7628_GPIO_MODE_GPIO),
252+
GRP_G("wled_an", wled_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
253+
1, MT7628_GPIO_MODE_WLED_AN),
254+
GRP_G("wled_kn", wled_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
255+
1, MT7628_GPIO_MODE_WLED_KN),
236256
{ 0 }
237257
};
238258

@@ -439,7 +459,7 @@ void __init ralink_clk_init(void)
439459
ralink_clk_add("10000c00.uartlite", periph_rate);
440460
ralink_clk_add("10180000.wmac", xtal_rate);
441461

442-
if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) {
462+
if (IS_ENABLED(CONFIG_USB) && !is_mt76x8()) {
443463
/*
444464
* When the CPU goes into sleep mode, the BUS clock will be
445465
* too low for USB to function properly. Adjust the busses

0 commit comments

Comments
 (0)