Commit d67f250e authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'mips-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fixes from Paul Burton:
 "Here are a few MIPS fixes, and a MAINTAINERS update to hand over MIPS
  maintenance to Thomas Bogendoerfer - this will be my final pull
  request as MIPS maintainer.

  Thanks for your helpful comments, useful corrections & responsiveness
  during the time I've fulfilled the role, and I'm sure I'll pop up
  elsewhere in the tree somewhere down the line"

* 'mips-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MAINTAINERS: Hand MIPS over to Thomas
  MIPS: ingenic: DTS: Fix watchdog nodes
  MIPS: X1000: Fix clock of watchdog node.
  MIPS: vdso: Wrap -mexplicit-relocs in cc-option
  MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()'
  MIPS: cavium_octeon: Fix syncw generation.
  mips: vdso: add build time check that no 'jalr t9' calls left
  MIPS: Disable VDSO time functionality on microMIPS
  mips: vdso: fix 'jalr t9' crash in vdso code
parents 63623fd4 3234f4ed
...@@ -567,6 +567,11 @@ D: Original author of Amiga FFS filesystem ...@@ -567,6 +567,11 @@ D: Original author of Amiga FFS filesystem
S: Orlando, Florida S: Orlando, Florida
S: USA S: USA
N: Paul Burton
E: paulburton@kernel.org
W: https://pburton.com
D: MIPS maintainer 2018-2020
N: Lennert Buytenhek N: Lennert Buytenhek
E: kernel@wantstofly.org E: kernel@wantstofly.org
D: Original (2.4) rewrite of the ethernet bridging code D: Original (2.4) rewrite of the ethernet bridging code
......
...@@ -11115,14 +11115,12 @@ S: Maintained ...@@ -11115,14 +11115,12 @@ S: Maintained
F: drivers/usb/image/microtek.* F: drivers/usb/image/microtek.*
MIPS MIPS
M: Ralf Baechle <ralf@linux-mips.org> M: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
M: Paul Burton <paulburton@kernel.org>
L: linux-mips@vger.kernel.org L: linux-mips@vger.kernel.org
W: http://www.linux-mips.org/ W: http://www.linux-mips.org/
T: git git://git.linux-mips.org/pub/scm/ralf/linux.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
Q: http://patchwork.linux-mips.org/project/linux-mips/list/ Q: http://patchwork.linux-mips.org/project/linux-mips/list/
S: Supported S: Maintained
F: Documentation/devicetree/bindings/mips/ F: Documentation/devicetree/bindings/mips/
F: Documentation/mips/ F: Documentation/mips/
F: arch/mips/ F: arch/mips/
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/clock/jz4740-cgu.h> #include <dt-bindings/clock/jz4740-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>
/ { / {
#address-cells = <1>; #address-cells = <1>;
...@@ -45,14 +46,6 @@ cgu: jz4740-cgu@10000000 { ...@@ -45,14 +46,6 @@ cgu: jz4740-cgu@10000000 {
#clock-cells = <1>; #clock-cells = <1>;
}; };
watchdog: watchdog@10002000 {
compatible = "ingenic,jz4740-watchdog";
reg = <0x10002000 0x10>;
clocks = <&cgu JZ4740_CLK_RTC>;
clock-names = "rtc";
};
tcu: timer@10002000 { tcu: timer@10002000 {
compatible = "ingenic,jz4740-tcu", "simple-mfd"; compatible = "ingenic,jz4740-tcu", "simple-mfd";
reg = <0x10002000 0x1000>; reg = <0x10002000 0x1000>;
...@@ -73,6 +66,14 @@ &cgu JZ4740_CLK_PCLK ...@@ -73,6 +66,14 @@ &cgu JZ4740_CLK_PCLK
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
interrupts = <23 22 21>; interrupts = <23 22 21>;
watchdog: watchdog@0 {
compatible = "ingenic,jz4740-watchdog";
reg = <0x0 0xc>;
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
}; };
rtc_dev: rtc@10003000 { rtc_dev: rtc@10003000 {
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/clock/jz4780-cgu.h> #include <dt-bindings/clock/jz4780-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>
#include <dt-bindings/dma/jz4780-dma.h> #include <dt-bindings/dma/jz4780-dma.h>
/ { / {
...@@ -67,6 +68,14 @@ &cgu JZ4780_CLK_EXCLK ...@@ -67,6 +68,14 @@ &cgu JZ4780_CLK_EXCLK
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
interrupts = <27 26 25>; interrupts = <27 26 25>;
watchdog: watchdog@0 {
compatible = "ingenic,jz4780-watchdog";
reg = <0x0 0xc>;
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
}; };
rtc_dev: rtc@10003000 { rtc_dev: rtc@10003000 {
...@@ -348,14 +357,6 @@ i2c4: i2c@10054000 { ...@@ -348,14 +357,6 @@ i2c4: i2c@10054000 {
status = "disabled"; status = "disabled";
}; };
watchdog: watchdog@10002000 {
compatible = "ingenic,jz4780-watchdog";
reg = <0x10002000 0x10>;
clocks = <&cgu JZ4780_CLK_RTCLK>;
clock-names = "rtc";
};
nemc: nemc@13410000 { nemc: nemc@13410000 {
compatible = "ingenic,jz4780-nemc"; compatible = "ingenic,jz4780-nemc";
reg = <0x13410000 0x10000>; reg = <0x13410000 0x10000>;
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/clock/ingenic,tcu.h>
#include <dt-bindings/clock/x1000-cgu.h> #include <dt-bindings/clock/x1000-cgu.h>
#include <dt-bindings/dma/x1000-dma.h> #include <dt-bindings/dma/x1000-dma.h>
...@@ -72,7 +73,7 @@ wdt: watchdog@0 { ...@@ -72,7 +73,7 @@ wdt: watchdog@0 {
compatible = "ingenic,x1000-watchdog", "ingenic,jz4780-watchdog"; compatible = "ingenic,x1000-watchdog", "ingenic,jz4780-watchdog";
reg = <0x0 0x10>; reg = <0x0 0x10>;
clocks = <&cgu X1000_CLK_RTCLK>; clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt"; clock-names = "wdt";
}; };
}; };
...@@ -158,7 +159,6 @@ gpd: gpio@3 { ...@@ -158,7 +159,6 @@ gpd: gpio@3 {
i2c0: i2c-controller@10050000 { i2c0: i2c-controller@10050000 {
compatible = "ingenic,x1000-i2c"; compatible = "ingenic,x1000-i2c";
reg = <0x10050000 0x1000>; reg = <0x10050000 0x1000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -173,7 +173,6 @@ i2c0: i2c-controller@10050000 { ...@@ -173,7 +173,6 @@ i2c0: i2c-controller@10050000 {
i2c1: i2c-controller@10051000 { i2c1: i2c-controller@10051000 {
compatible = "ingenic,x1000-i2c"; compatible = "ingenic,x1000-i2c";
reg = <0x10051000 0x1000>; reg = <0x10051000 0x1000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -188,7 +187,6 @@ i2c1: i2c-controller@10051000 { ...@@ -188,7 +187,6 @@ i2c1: i2c-controller@10051000 {
i2c2: i2c-controller@10052000 { i2c2: i2c-controller@10052000 {
compatible = "ingenic,x1000-i2c"; compatible = "ingenic,x1000-i2c";
reg = <0x10052000 0x1000>; reg = <0x10052000 0x1000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -155,9 +155,11 @@ ...@@ -155,9 +155,11 @@
* effective barrier as noted by commit 6b07d38aaa52 ("MIPS: Octeon: Use * effective barrier as noted by commit 6b07d38aaa52 ("MIPS: Octeon: Use
* optimized memory barrier primitives."). Here we specify that the affected * optimized memory barrier primitives."). Here we specify that the affected
* sync instructions should be emitted twice. * sync instructions should be emitted twice.
* Note that this expression is evaluated by the assembler (not the compiler),
* and that the assembler evaluates '==' as 0 or -1, not 0 or 1.
*/ */
#ifdef CONFIG_CPU_CAVIUM_OCTEON #ifdef CONFIG_CPU_CAVIUM_OCTEON
# define __SYNC_rpt(type) (1 + (type == __SYNC_wmb)) # define __SYNC_rpt(type) (1 - (type == __SYNC_wmb))
#else #else
# define __SYNC_rpt(type) 1 # define __SYNC_rpt(type) 1
#endif #endif
......
...@@ -134,7 +134,7 @@ void release_vpe(struct vpe *v) ...@@ -134,7 +134,7 @@ void release_vpe(struct vpe *v)
{ {
list_del(&v->list); list_del(&v->list);
if (v->load_addr) if (v->load_addr)
release_progmem(v); release_progmem(v->load_addr);
kfree(v); kfree(v);
} }
......
...@@ -33,6 +33,7 @@ endif ...@@ -33,6 +33,7 @@ endif
cflags-vdso := $(ccflags-vdso) \ cflags-vdso := $(ccflags-vdso) \
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
-O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \ -O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
-mrelax-pic-calls $(call cc-option, -mexplicit-relocs) \
-fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \
$(call cc-option, -fno-asynchronous-unwind-tables) \ $(call cc-option, -fno-asynchronous-unwind-tables) \
$(call cc-option, -fno-stack-protector) $(call cc-option, -fno-stack-protector)
...@@ -51,6 +52,8 @@ endif ...@@ -51,6 +52,8 @@ endif
CFLAGS_REMOVE_vgettimeofday.o = -pg CFLAGS_REMOVE_vgettimeofday.o = -pg
DISABLE_VDSO := n
# #
# For the pre-R6 code in arch/mips/vdso/vdso.h for locating # For the pre-R6 code in arch/mips/vdso/vdso.h for locating
# the base address of VDSO, the linker will emit a R_MIPS_PC32 # the base address of VDSO, the linker will emit a R_MIPS_PC32
...@@ -64,11 +67,24 @@ CFLAGS_REMOVE_vgettimeofday.o = -pg ...@@ -64,11 +67,24 @@ CFLAGS_REMOVE_vgettimeofday.o = -pg
ifndef CONFIG_CPU_MIPSR6 ifndef CONFIG_CPU_MIPSR6
ifeq ($(call ld-ifversion, -lt, 225000000, y),y) ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
$(warning MIPS VDSO requires binutils >= 2.25) $(warning MIPS VDSO requires binutils >= 2.25)
obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y)) DISABLE_VDSO := y
ccflags-vdso += -DDISABLE_MIPS_VDSO
endif endif
endif endif
#
# GCC (at least up to version 9.2) appears to emit function calls that make use
# of the GOT when targeting microMIPS, which we can't use in the VDSO due to
# the lack of relocations. As such, we disable the VDSO for microMIPS builds.
#
ifdef CONFIG_CPU_MICROMIPS
DISABLE_VDSO := y
endif
ifeq ($(DISABLE_VDSO),y)
obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y))
ccflags-vdso += -DDISABLE_MIPS_VDSO
endif
# VDSO linker flags. # VDSO linker flags.
VDSO_LDFLAGS := \ VDSO_LDFLAGS := \
-Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 \ -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 \
...@@ -81,12 +97,18 @@ GCOV_PROFILE := n ...@@ -81,12 +97,18 @@ GCOV_PROFILE := n
UBSAN_SANITIZE := n UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n KCOV_INSTRUMENT := n
# Check that we don't have PIC 'jalr t9' calls left
quiet_cmd_vdso_mips_check = VDSOCHK $@
cmd_vdso_mips_check = if $(OBJDUMP) --disassemble $@ | egrep -h "jalr.*t9" > /dev/null; \
then (echo >&2 "$@: PIC 'jalr t9' calls are not supported"; \
rm -f $@; /bin/false); fi
# #
# Shared build commands. # Shared build commands.
# #
quiet_cmd_vdsold_and_vdso_check = LD $@ quiet_cmd_vdsold_and_vdso_check = LD $@
cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check) cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check); $(cmd_vdso_mips_check)
quiet_cmd_vdsold = VDSO $@ quiet_cmd_vdsold = VDSO $@
cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \ cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment