Skip to content

Commit 58eb131

Browse files
committed
Merge remote-tracking branch 'stable/linux-4.14.y' into rpi-4.14.y
2 parents 4fca48b + 2c6025e commit 58eb131

560 files changed

Lines changed: 5730 additions & 2341 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/devicetree/bindings/clock/sunxi-ccu.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Required properties :
2020
- "allwinner,sun50i-a64-ccu"
2121
- "allwinner,sun50i-a64-r-ccu"
2222
- "allwinner,sun50i-h5-ccu"
23+
- "allwinner,sun50i-h6-ccu"
2324
- "nextthing,gr8-ccu"
2425

2526
- reg: Must contain the registers base address and length
@@ -31,6 +32,9 @@ Required properties :
3132
- #clock-cells : must contain 1
3233
- #reset-cells : must contain 1
3334

35+
For the main CCU on H6, one more clock is needed:
36+
- "iosc": the SoC's internal frequency oscillator
37+
3438
For the PRCM CCUs on A83T/H3/A64, two more clocks are needed:
3539
- "pll-periph": the SoC's peripheral PLL from the main CCU
3640
- "iosc": the SoC's internal frequency oscillator

‎Documentation/devicetree/bindings/dma/mv-xor-v2.txt‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ Required properties:
1111
interrupts.
1212

1313
Optional properties:
14-
- clocks: Optional reference to the clock used by the XOR engine.
14+
- clocks: Optional reference to the clocks used by the XOR engine.
15+
- clock-names: mandatory if there is a second clock, in this case the
16+
name must be "core" for the first clock and "reg" for the second
17+
one
18+
1519

1620
Example:
1721

‎Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Required subnode-properties:
2020
gpio: cpuclkoutgrp0, udlclkoutgrp0, i2c1grp0, i2c2grp0,
2121
i2c3grp0, i2s0grp0, i2s1grp0, i2srefclkgrp0, spi0grp0,
2222
spi1grp0, pciedebuggrp0, uart0grp0, uart0grp1, uart1grp0,
23-
uart2grp0, uart2grp1, uart3grp0, uart4grp0, uart5grp0
23+
uart2grp0, uart2grp1, uart3grp0, uart4grp0, uart5grp0,
24+
uart5nocts
2425
cpuclkout: cpuclkoutgrp0
2526
udlclkout: udlclkoutgrp0
2627
i2c1: i2c1grp0
@@ -37,7 +38,7 @@ Required subnode-properties:
3738
uart2: uart2grp0, uart2grp1
3839
uart3: uart3grp0
3940
uart4: uart4grp0
40-
uart5: uart5grp0
41+
uart5: uart5grp0, uart5nocts
4142
nand: nandgrp0
4243
sdio0: sdio0grp0
4344
sdio1: sdio1grp0

‎Makefile‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 4
33
PATCHLEVEL = 14
4-
SUBLEVEL = 44
4+
SUBLEVEL = 48
55
EXTRAVERSION =
66
NAME = Petit Gorille
77

@@ -369,11 +369,6 @@ HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
369369
HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
370370
HOST_LOADLIBES := $(HOST_LFS_LIBS)
371371

372-
ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
373-
HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \
374-
-Wno-missing-field-initializers -fno-delete-null-pointer-checks
375-
endif
376-
377372
# Make variables (CC, etc...)
378373
AS = $(CROSS_COMPILE)as
379374
LD = $(CROSS_COMPILE)ld
@@ -711,7 +706,6 @@ KBUILD_CFLAGS += $(stackp-flag)
711706

712707
ifeq ($(cc-name),clang)
713708
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
714-
KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable)
715709
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
716710
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
717711
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
@@ -729,9 +723,9 @@ else
729723
# These warnings generated too much noise in a regular build.
730724
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
731725
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
732-
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
733726
endif
734727

728+
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
735729
ifdef CONFIG_FRAME_POINTER
736730
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
737731
else

‎arch/alpha/include/asm/xchg.h‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@
1212
* Atomic exchange.
1313
* Since it can be used to implement critical sections
1414
* it must clobber "memory" (also for interrupts in UP).
15+
*
16+
* The leading and the trailing memory barriers guarantee that these
17+
* operations are fully ordered.
18+
*
1519
*/
1620

1721
static inline unsigned long
1822
____xchg(_u8, volatile char *m, unsigned long val)
1923
{
2024
unsigned long ret, tmp, addr64;
2125

26+
smp_mb();
2227
__asm__ __volatile__(
2328
" andnot %4,7,%3\n"
2429
" insbl %1,%4,%1\n"
@@ -43,6 +48,7 @@ ____xchg(_u16, volatile short *m, unsigned long val)
4348
{
4449
unsigned long ret, tmp, addr64;
4550

51+
smp_mb();
4652
__asm__ __volatile__(
4753
" andnot %4,7,%3\n"
4854
" inswl %1,%4,%1\n"
@@ -67,6 +73,7 @@ ____xchg(_u32, volatile int *m, unsigned long val)
6773
{
6874
unsigned long dummy;
6975

76+
smp_mb();
7077
__asm__ __volatile__(
7178
"1: ldl_l %0,%4\n"
7279
" bis $31,%3,%1\n"
@@ -87,6 +94,7 @@ ____xchg(_u64, volatile long *m, unsigned long val)
8794
{
8895
unsigned long dummy;
8996

97+
smp_mb();
9098
__asm__ __volatile__(
9199
"1: ldq_l %0,%4\n"
92100
" bis $31,%3,%1\n"
@@ -128,17 +136,20 @@ ____xchg(, volatile void *ptr, unsigned long x, int size)
128136
* store NEW in MEM. Return the initial value in MEM. Success is
129137
* indicated by comparing RETURN with OLD.
130138
*
131-
* The memory barrier should be placed in SMP only when we actually
132-
* make the change. If we don't change anything (so if the returned
133-
* prev is equal to old) then we aren't acquiring anything new and
134-
* we don't need any memory barrier as far I can tell.
139+
* The leading and the trailing memory barriers guarantee that these
140+
* operations are fully ordered.
141+
*
142+
* The trailing memory barrier is placed in SMP unconditionally, in
143+
* order to guarantee that dependency ordering is preserved when a
144+
* dependency is headed by an unsuccessful operation.
135145
*/
136146

137147
static inline unsigned long
138148
____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new)
139149
{
140150
unsigned long prev, tmp, cmp, addr64;
141151

152+
smp_mb();
142153
__asm__ __volatile__(
143154
" andnot %5,7,%4\n"
144155
" insbl %1,%5,%1\n"
@@ -150,8 +161,8 @@ ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new)
150161
" or %1,%2,%2\n"
151162
" stq_c %2,0(%4)\n"
152163
" beq %2,3f\n"
153-
__ASM__MB
154164
"2:\n"
165+
__ASM__MB
155166
".subsection 2\n"
156167
"3: br 1b\n"
157168
".previous"
@@ -166,6 +177,7 @@ ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new)
166177
{
167178
unsigned long prev, tmp, cmp, addr64;
168179

180+
smp_mb();
169181
__asm__ __volatile__(
170182
" andnot %5,7,%4\n"
171183
" inswl %1,%5,%1\n"
@@ -177,8 +189,8 @@ ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new)
177189
" or %1,%2,%2\n"
178190
" stq_c %2,0(%4)\n"
179191
" beq %2,3f\n"
180-
__ASM__MB
181192
"2:\n"
193+
__ASM__MB
182194
".subsection 2\n"
183195
"3: br 1b\n"
184196
".previous"
@@ -193,15 +205,16 @@ ____cmpxchg(_u32, volatile int *m, int old, int new)
193205
{
194206
unsigned long prev, cmp;
195207

208+
smp_mb();
196209
__asm__ __volatile__(
197210
"1: ldl_l %0,%5\n"
198211
" cmpeq %0,%3,%1\n"
199212
" beq %1,2f\n"
200213
" mov %4,%1\n"
201214
" stl_c %1,%2\n"
202215
" beq %1,3f\n"
203-
__ASM__MB
204216
"2:\n"
217+
__ASM__MB
205218
".subsection 2\n"
206219
"3: br 1b\n"
207220
".previous"
@@ -216,15 +229,16 @@ ____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new)
216229
{
217230
unsigned long prev, cmp;
218231

232+
smp_mb();
219233
__asm__ __volatile__(
220234
"1: ldq_l %0,%5\n"
221235
" cmpeq %0,%3,%1\n"
222236
" beq %1,2f\n"
223237
" mov %4,%1\n"
224238
" stq_c %1,%2\n"
225239
" beq %1,3f\n"
226-
__ASM__MB
227240
"2:\n"
241+
__ASM__MB
228242
".subsection 2\n"
229243
"3: br 1b\n"
230244
".previous"

‎arch/arc/Kconfig‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ config ARC_CURR_IN_REG
487487

488488
config ARC_EMUL_UNALIGNED
489489
bool "Emulate unaligned memory access (userspace only)"
490-
default N
491490
select SYSCTL_ARCH_UNALIGN_NO_WARN
492491
select SYSCTL_ARCH_UNALIGN_ALLOW
493492
depends on ISA_ARCOMPACT

‎arch/arc/include/asm/bug.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ void die(const char *str, struct pt_regs *regs, unsigned long address);
2323

2424
#define BUG() do { \
2525
pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
26-
dump_stack(); \
26+
barrier_before_unreachable(); \
27+
__builtin_trap(); \
2728
} while (0)
2829

2930
#define HAVE_ARCH_BUG

‎arch/arc/kernel/mcip.c‎

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,79 @@ static DEFINE_RAW_SPINLOCK(mcip_lock);
2222

2323
static char smp_cpuinfo_buf[128];
2424

25+
/*
26+
* Set mask to halt GFRC if any online core in SMP cluster is halted.
27+
* Only works for ARC HS v3.0+, on earlier versions has no effect.
28+
*/
29+
static void mcip_update_gfrc_halt_mask(int cpu)
30+
{
31+
struct bcr_generic gfrc;
32+
unsigned long flags;
33+
u32 gfrc_halt_mask;
34+
35+
READ_BCR(ARC_REG_GFRC_BUILD, gfrc);
36+
37+
/*
38+
* CMD_GFRC_SET_CORE and CMD_GFRC_READ_CORE commands were added in
39+
* GFRC 0x3 version.
40+
*/
41+
if (gfrc.ver < 0x3)
42+
return;
43+
44+
raw_spin_lock_irqsave(&mcip_lock, flags);
45+
46+
__mcip_cmd(CMD_GFRC_READ_CORE, 0);
47+
gfrc_halt_mask = read_aux_reg(ARC_REG_MCIP_READBACK);
48+
gfrc_halt_mask |= BIT(cpu);
49+
__mcip_cmd_data(CMD_GFRC_SET_CORE, 0, gfrc_halt_mask);
50+
51+
raw_spin_unlock_irqrestore(&mcip_lock, flags);
52+
}
53+
54+
static void mcip_update_debug_halt_mask(int cpu)
55+
{
56+
u32 mcip_mask = 0;
57+
unsigned long flags;
58+
59+
raw_spin_lock_irqsave(&mcip_lock, flags);
60+
61+
/*
62+
* mcip_mask is same for CMD_DEBUG_SET_SELECT and CMD_DEBUG_SET_MASK
63+
* commands. So read it once instead of reading both CMD_DEBUG_READ_MASK
64+
* and CMD_DEBUG_READ_SELECT.
65+
*/
66+
__mcip_cmd(CMD_DEBUG_READ_SELECT, 0);
67+
mcip_mask = read_aux_reg(ARC_REG_MCIP_READBACK);
68+
69+
mcip_mask |= BIT(cpu);
70+
71+
__mcip_cmd_data(CMD_DEBUG_SET_SELECT, 0, mcip_mask);
72+
/*
73+
* Parameter specified halt cause:
74+
* STATUS32[H]/actionpoint/breakpoint/self-halt
75+
* We choose all of them (0xF).
76+
*/
77+
__mcip_cmd_data(CMD_DEBUG_SET_MASK, 0xF, mcip_mask);
78+
79+
raw_spin_unlock_irqrestore(&mcip_lock, flags);
80+
}
81+
2582
static void mcip_setup_per_cpu(int cpu)
2683
{
84+
struct mcip_bcr mp;
85+
86+
READ_BCR(ARC_REG_MCIP_BCR, mp);
87+
2788
smp_ipi_irq_setup(cpu, IPI_IRQ);
2889
smp_ipi_irq_setup(cpu, SOFTIRQ_IRQ);
90+
91+
/* Update GFRC halt mask as new CPU came online */
92+
if (mp.gfrc)
93+
mcip_update_gfrc_halt_mask(cpu);
94+
95+
/* Update MCIP debug mask as new CPU came online */
96+
if (mp.dbg)
97+
mcip_update_debug_halt_mask(cpu);
2998
}
3099

31100
static void mcip_ipi_send(int cpu)
@@ -101,11 +170,6 @@ static void mcip_probe_n_setup(void)
101170
IS_AVAIL1(mp.gfrc, "GFRC"));
102171

103172
cpuinfo_arc700[0].extn.gfrc = mp.gfrc;
104-
105-
if (mp.dbg) {
106-
__mcip_cmd_data(CMD_DEBUG_SET_SELECT, 0, 0xf);
107-
__mcip_cmd_data(CMD_DEBUG_SET_MASK, 0xf, 0xf);
108-
}
109173
}
110174

111175
struct plat_smp_ops plat_smp_ops = {

0 commit comments

Comments
 (0)