Skip to content

Commit f8aa942

Browse files
committed
Merge branch 'stable/linux-4.14.y' into linux-4.14-at91
2 parents a8b5d98 + 50961e4 commit f8aa942

159 files changed

Lines changed: 1212 additions & 499 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.

Makefile

Lines changed: 3 additions & 3 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 = 78
4+
SUBLEVEL = 79
55
EXTRAVERSION =
66
NAME = Petit Gorille
77

@@ -487,6 +487,8 @@ CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN)
487487
endif
488488
KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
489489
KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
490+
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
491+
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
490492
endif
491493

492494
RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
@@ -721,8 +723,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
721723
# See modpost pattern 2
722724
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
723725
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
724-
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
725-
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
726726
else
727727

728728
# These warnings generated too much noise in a regular build.

arch/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,4 +965,12 @@ config REFCOUNT_FULL
965965
against various use-after-free conditions that can be used in
966966
security flaw exploits.
967967

968+
config HAVE_ARCH_COMPILER_H
969+
bool
970+
help
971+
An architecture can select this if it provides an
972+
asm/compiler.h header that should be included after
973+
linux/compiler-*.h in order to override macro definitions that those
974+
headers generally provide.
975+
968976
source "kernel/gcov/Kconfig"

arch/arm/boot/dts/bcm63138.dtsi

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,21 +106,23 @@
106106
global_timer: timer@1e200 {
107107
compatible = "arm,cortex-a9-global-timer";
108108
reg = <0x1e200 0x20>;
109-
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
109+
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
110110
clocks = <&axi_clk>;
111111
};
112112

113113
local_timer: local-timer@1e600 {
114114
compatible = "arm,cortex-a9-twd-timer";
115115
reg = <0x1e600 0x20>;
116-
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
116+
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
117+
IRQ_TYPE_EDGE_RISING)>;
117118
clocks = <&axi_clk>;
118119
};
119120

120121
twd_watchdog: watchdog@1e620 {
121122
compatible = "arm,cortex-a9-twd-wdt";
122123
reg = <0x1e620 0x20>;
123-
interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>;
124+
interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) |
125+
IRQ_TYPE_LEVEL_HIGH)>;
124126
};
125127

126128
armpll: armpll {
@@ -158,7 +160,7 @@
158160
serial0: serial@600 {
159161
compatible = "brcm,bcm6345-uart";
160162
reg = <0x600 0x1b>;
161-
interrupts = <GIC_SPI 32 0>;
163+
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
162164
clocks = <&periph_clk>;
163165
clock-names = "periph";
164166
status = "disabled";
@@ -167,7 +169,7 @@
167169
serial1: serial@620 {
168170
compatible = "brcm,bcm6345-uart";
169171
reg = <0x620 0x1b>;
170-
interrupts = <GIC_SPI 33 0>;
172+
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
171173
clocks = <&periph_clk>;
172174
clock-names = "periph";
173175
status = "disabled";
@@ -180,7 +182,7 @@
180182
reg = <0x2000 0x600>, <0xf0 0x10>;
181183
reg-names = "nand", "nand-int-base";
182184
status = "disabled";
183-
interrupts = <GIC_SPI 38 0>;
185+
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
184186
interrupt-names = "nand";
185187
};
186188

arch/arm/boot/dts/imx53-qsb-common.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@
130130
};
131131
};
132132

133+
&cpu0 {
134+
/* CPU rated to 1GHz, not 1.2GHz as per the default settings */
135+
operating-points = <
136+
/* kHz uV */
137+
166666 850000
138+
400000 900000
139+
800000 1050000
140+
1000000 1200000
141+
>;
142+
};
143+
133144
&esdhc1 {
134145
pinctrl-names = "default";
135146
pinctrl-0 = <&pinctrl_esdhc1>;

arch/arm/boot/dts/r8a7790.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153

154154
trips {
155155
cpu-crit {
156-
temperature = <115000>;
156+
temperature = <95000>;
157157
hysteresis = <0>;
158158
type = "critical";
159159
};

arch/arm/boot/dts/tegra20.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@
706706
phy_type = "ulpi";
707707
clocks = <&tegra_car TEGRA20_CLK_USB2>,
708708
<&tegra_car TEGRA20_CLK_PLL_U>,
709-
<&tegra_car TEGRA20_CLK_CDEV2>;
709+
<&tegra_car TEGRA20_CLK_PLL_P_OUT4>;
710710
clock-names = "reg", "pll_u", "ulpi-link";
711711
resets = <&tegra_car 58>, <&tegra_car 22>;
712712
reset-names = "usb", "utmi-pads";

arch/arm/mm/ioremap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ void pci_ioremap_set_mem_type(int mem_type)
473473

474474
int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
475475
{
476-
BUG_ON(offset + SZ_64K > IO_SPACE_LIMIT);
476+
BUG_ON(offset + SZ_64K - 1 > IO_SPACE_LIMIT);
477477

478478
return ioremap_page_range(PCI_IO_VIRT_BASE + offset,
479479
PCI_IO_VIRT_BASE + offset + SZ_64K,

arch/arm64/mm/hugetlbpage.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,14 @@ static pte_t get_clear_flush(struct mm_struct *mm,
118118

119119
/*
120120
* If HW_AFDBM is enabled, then the HW could turn on
121-
* the dirty bit for any page in the set, so check
122-
* them all. All hugetlb entries are already young.
121+
* the dirty or accessed bit for any page in the set,
122+
* so check them all.
123123
*/
124124
if (pte_dirty(pte))
125125
orig_pte = pte_mkdirty(orig_pte);
126+
127+
if (pte_young(pte))
128+
orig_pte = pte_mkyoung(orig_pte);
126129
}
127130

128131
if (valid)
@@ -347,10 +350,13 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
347350
if (!pte_same(orig_pte, pte))
348351
changed = 1;
349352

350-
/* Make sure we don't lose the dirty state */
353+
/* Make sure we don't lose the dirty or young state */
351354
if (pte_dirty(orig_pte))
352355
pte = pte_mkdirty(pte);
353356

357+
if (pte_young(orig_pte))
358+
pte = pte_mkyoung(pte);
359+
354360
hugeprot = pte_pgprot(pte);
355361
for (i = 0; i < ncontig; i++, ptep++, addr += pgsize, pfn += dpfn)
356362
set_pte_at(vma->vm_mm, addr, ptep, pfn_pte(pfn, hugeprot));

arch/mips/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ config MIPS
2929
select GENERIC_SMP_IDLE_THREAD
3030
select GENERIC_TIME_VSYSCALL
3131
select HANDLE_DOMAIN_IRQ
32+
select HAVE_ARCH_COMPILER_H
3233
select HAVE_ARCH_JUMP_LABEL
3334
select HAVE_ARCH_KGDB
3435
select HAVE_ARCH_MMAP_RND_BITS if MMU

arch/mips/include/asm/compiler.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,41 @@
88
#ifndef _ASM_COMPILER_H
99
#define _ASM_COMPILER_H
1010

11+
/*
12+
* With GCC 4.5 onwards we can use __builtin_unreachable to indicate to the
13+
* compiler that a particular code path will never be hit. This allows it to be
14+
* optimised out of the generated binary.
15+
*
16+
* Unfortunately at least GCC 4.6.3 through 7.3.0 inclusive suffer from a bug
17+
* that can lead to instructions from beyond an unreachable statement being
18+
* incorrectly reordered into earlier delay slots if the unreachable statement
19+
* is the only content of a case in a switch statement. This can lead to
20+
* seemingly random behaviour, such as invalid memory accesses from incorrectly
21+
* reordered loads or stores. See this potential GCC fix for details:
22+
*
23+
* https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00360.html
24+
*
25+
* It is unclear whether GCC 8 onwards suffer from the same issue - nothing
26+
* relevant is mentioned in GCC 8 release notes and nothing obviously relevant
27+
* stands out in GCC commit logs, but these newer GCC versions generate very
28+
* different code for the testcase which doesn't exhibit the bug.
29+
*
30+
* GCC also handles stack allocation suboptimally when calling noreturn
31+
* functions or calling __builtin_unreachable():
32+
*
33+
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365
34+
*
35+
* We work around both of these issues by placing a volatile asm statement,
36+
* which GCC is prevented from reordering past, prior to __builtin_unreachable
37+
* calls.
38+
*
39+
* The .insn statement is required to ensure that any branches to the
40+
* statement, which sadly must be kept due to the asm statement, are known to
41+
* be branches to code and satisfy linker requirements for microMIPS kernels.
42+
*/
43+
#undef barrier_before_unreachable
44+
#define barrier_before_unreachable() asm volatile(".insn")
45+
1146
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
1247
#define GCC_IMM_ASM() "n"
1348
#define GCC_REG_ACCUM "$0"

0 commit comments

Comments
 (0)