Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mips_fixes_5.6.1' into mips-next

Pull in mips-fixes avoiding conflicts with more CI20 DT changes.

A few MIPS fixes:

- DT fixes for CI20

- Fix command line handling

- Correct patchwork URL

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

+87 -47
+5
CREDITS
··· 567 567 S: Orlando, Florida 568 568 S: USA 569 569 570 + N: Paul Burton 571 + E: paulburton@kernel.org 572 + W: https://pburton.com 573 + D: MIPS maintainer 2018-2020 574 + 570 575 N: Lennert Buytenhek 571 576 E: kernel@wantstofly.org 572 577 D: Original (2.4) rewrite of the ethernet bridging code
+3 -5
MAINTAINERS
··· 11114 11114 F: drivers/usb/image/microtek.* 11115 11115 11116 11116 MIPS 11117 - M: Ralf Baechle <ralf@linux-mips.org> 11118 - M: Paul Burton <paulburton@kernel.org> 11117 + M: Thomas Bogendoerfer <tsbogend@alpha.franken.de> 11119 11118 L: linux-mips@vger.kernel.org 11120 11119 W: http://www.linux-mips.org/ 11121 - T: git git://git.linux-mips.org/pub/scm/ralf/linux.git 11122 11120 T: git git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git 11123 - Q: http://patchwork.linux-mips.org/project/linux-mips/list/ 11124 - S: Supported 11121 + Q: https://patchwork.kernel.org/project/linux-mips/list/ 11122 + S: Maintained 11125 11123 F: Documentation/devicetree/bindings/mips/ 11126 11124 F: Documentation/mips/ 11127 11125 F: arch/mips/
+28 -16
arch/mips/boot/dts/ingenic/ci20.dts
··· 4 4 #include "jz4780.dtsi" 5 5 #include <dt-bindings/clock/ingenic,tcu.h> 6 6 #include <dt-bindings/gpio/gpio.h> 7 + #include <dt-bindings/interrupt-controller/irq.h> 8 + #include <dt-bindings/regulator/active-semi,8865-regulator.h> 7 9 8 10 / { 9 11 compatible = "img,ci20", "ingenic,jz4780"; ··· 165 163 166 164 regulators { 167 165 vddcore: SUDCDC1 { 168 - regulator-name = "VDDCORE"; 166 + regulator-name = "DCDC_REG1"; 169 167 regulator-min-microvolt = <1100000>; 170 168 regulator-max-microvolt = <1100000>; 171 169 regulator-always-on; 172 170 }; 173 171 vddmem: SUDCDC2 { 174 - regulator-name = "VDDMEM"; 172 + regulator-name = "DCDC_REG2"; 175 173 regulator-min-microvolt = <1500000>; 176 174 regulator-max-microvolt = <1500000>; 177 175 regulator-always-on; 178 176 }; 179 177 vcc_33: SUDCDC3 { 180 - regulator-name = "VCC33"; 178 + regulator-name = "DCDC_REG3"; 181 179 regulator-min-microvolt = <3300000>; 182 180 regulator-max-microvolt = <3300000>; 183 181 regulator-always-on; 184 182 }; 185 183 vcc_50: SUDCDC4 { 186 - regulator-name = "VCC50"; 184 + regulator-name = "SUDCDC_REG4"; 187 185 regulator-min-microvolt = <5000000>; 188 186 regulator-max-microvolt = <5000000>; 189 187 regulator-always-on; 190 188 }; 191 189 vcc_25: LDO_REG5 { 192 - regulator-name = "VCC25"; 190 + regulator-name = "LDO_REG5"; 193 191 regulator-min-microvolt = <2500000>; 194 192 regulator-max-microvolt = <2500000>; 195 193 regulator-always-on; 196 194 }; 197 195 wifi_io: LDO_REG6 { 198 - regulator-name = "WIFIIO"; 196 + regulator-name = "LDO_REG6"; 199 197 regulator-min-microvolt = <2500000>; 200 198 regulator-max-microvolt = <2500000>; 201 199 regulator-always-on; 202 200 }; 203 201 vcc_28: LDO_REG7 { 204 - regulator-name = "VCC28"; 202 + regulator-name = "LDO_REG7"; 205 203 regulator-min-microvolt = <2800000>; 206 204 regulator-max-microvolt = <2800000>; 207 205 regulator-always-on; 208 206 }; 209 207 vcc_15: LDO_REG8 { 210 - regulator-name = "VCC15"; 208 + regulator-name = "LDO_REG8"; 211 209 regulator-min-microvolt = <1500000>; 212 210 regulator-max-microvolt = <1500000>; 213 211 regulator-always-on; 214 212 }; 215 - vcc_18: LDO_REG9 { 216 - regulator-name = "VCC18"; 217 - regulator-min-microvolt = <1800000>; 218 - regulator-max-microvolt = <1800000>; 213 + vrtc_18: LDO_REG9 { 214 + regulator-name = "LDO_REG9"; 215 + /* Despite the datasheet stating 3.3V 216 + * for REG9 and the driver expecting that, 217 + * REG9 outputs 1.8V. 218 + * Likely the CI20 uses a proprietary 219 + * factory programmed chip variant. 220 + * Since this is a simple on/off LDO the 221 + * exact values do not matter. 222 + */ 223 + regulator-min-microvolt = <3300000>; 224 + regulator-max-microvolt = <3300000>; 219 225 regulator-always-on; 220 226 }; 221 227 vcc_11: LDO_REG10 { 222 - regulator-name = "VCC11"; 223 - regulator-min-microvolt = <1100000>; 224 - regulator-max-microvolt = <1100000>; 228 + regulator-name = "LDO_REG10"; 229 + regulator-min-microvolt = <1200000>; 230 + regulator-max-microvolt = <1200000>; 225 231 regulator-always-on; 226 232 }; 227 233 }; ··· 271 261 rtc@51 { 272 262 compatible = "nxp,pcf8563"; 273 263 reg = <0x51>; 274 - interrupts = <110>; 264 + 265 + interrupt-parent = <&gpf>; 266 + interrupts = <30 IRQ_TYPE_LEVEL_LOW>; 275 267 }; 276 268 }; 277 269
+9 -8
arch/mips/boot/dts/ingenic/jz4740.dtsi
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <dt-bindings/clock/jz4740-cgu.h> 3 + #include <dt-bindings/clock/ingenic,tcu.h> 3 4 4 5 / { 5 6 #address-cells = <1>; ··· 46 45 #clock-cells = <1>; 47 46 }; 48 47 49 - watchdog: watchdog@10002000 { 50 - compatible = "ingenic,jz4740-watchdog"; 51 - reg = <0x10002000 0x10>; 52 - 53 - clocks = <&cgu JZ4740_CLK_RTC>; 54 - clock-names = "rtc"; 55 - }; 56 - 57 48 tcu: timer@10002000 { 58 49 compatible = "ingenic,jz4740-tcu", "simple-mfd"; 59 50 reg = <0x10002000 0x1000>; ··· 66 73 67 74 interrupt-parent = <&intc>; 68 75 interrupts = <23 22 21>; 76 + 77 + watchdog: watchdog@0 { 78 + compatible = "ingenic,jz4740-watchdog"; 79 + reg = <0x0 0xc>; 80 + 81 + clocks = <&tcu TCU_CLK_WDT>; 82 + clock-names = "wdt"; 83 + }; 69 84 }; 70 85 71 86 rtc_dev: rtc@10003000 {
+9 -8
arch/mips/boot/dts/ingenic/jz4780.dtsi
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <dt-bindings/clock/jz4780-cgu.h> 3 + #include <dt-bindings/clock/ingenic,tcu.h> 3 4 #include <dt-bindings/dma/jz4780-dma.h> 4 5 5 6 / { ··· 68 67 69 68 interrupt-parent = <&intc>; 70 69 interrupts = <27 26 25>; 70 + 71 + watchdog: watchdog@0 { 72 + compatible = "ingenic,jz4780-watchdog"; 73 + reg = <0x0 0xc>; 74 + 75 + clocks = <&tcu TCU_CLK_WDT>; 76 + clock-names = "wdt"; 77 + }; 71 78 }; 72 79 73 80 rtc_dev: rtc@10003000 { ··· 355 346 pinctrl-0 = <&pins_i2c4_data>; 356 347 357 348 status = "disabled"; 358 - }; 359 - 360 - watchdog: watchdog@10002000 { 361 - compatible = "ingenic,jz4780-watchdog"; 362 - reg = <0x10002000 0x10>; 363 - 364 - clocks = <&cgu JZ4780_CLK_RTCLK>; 365 - clock-names = "rtc"; 366 349 }; 367 350 368 351 nemc: nemc@13410000 {
+2 -4
arch/mips/boot/dts/ingenic/x1000.dtsi
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #include <dt-bindings/clock/ingenic,tcu.h> 2 3 #include <dt-bindings/clock/x1000-cgu.h> 3 4 #include <dt-bindings/dma/x1000-dma.h> 4 5 ··· 73 72 compatible = "ingenic,x1000-watchdog", "ingenic,jz4780-watchdog"; 74 73 reg = <0x0 0x10>; 75 74 76 - clocks = <&cgu X1000_CLK_RTCLK>; 75 + clocks = <&tcu TCU_CLK_WDT>; 77 76 clock-names = "wdt"; 78 77 }; 79 78 }; ··· 159 158 i2c0: i2c-controller@10050000 { 160 159 compatible = "ingenic,x1000-i2c"; 161 160 reg = <0x10050000 0x1000>; 162 - 163 161 #address-cells = <1>; 164 162 #size-cells = <0>; 165 163 ··· 173 173 i2c1: i2c-controller@10051000 { 174 174 compatible = "ingenic,x1000-i2c"; 175 175 reg = <0x10051000 0x1000>; 176 - 177 176 #address-cells = <1>; 178 177 #size-cells = <0>; 179 178 ··· 187 188 i2c2: i2c-controller@10052000 { 188 189 compatible = "ingenic,x1000-i2c"; 189 190 reg = <0x10052000 0x1000>; 190 - 191 191 #address-cells = <1>; 192 192 #size-cells = <0>; 193 193
+3 -1
arch/mips/include/asm/sync.h
··· 155 155 * effective barrier as noted by commit 6b07d38aaa52 ("MIPS: Octeon: Use 156 156 * optimized memory barrier primitives."). Here we specify that the affected 157 157 * sync instructions should be emitted twice. 158 + * Note that this expression is evaluated by the assembler (not the compiler), 159 + * and that the assembler evaluates '==' as 0 or -1, not 0 or 1. 158 160 */ 159 161 #ifdef CONFIG_CPU_CAVIUM_OCTEON 160 - # define __SYNC_rpt(type) (1 + (type == __SYNC_wmb)) 162 + # define __SYNC_rpt(type) (1 - (type == __SYNC_wmb)) 161 163 #else 162 164 # define __SYNC_rpt(type) 1 163 165 #endif
+2 -1
arch/mips/kernel/setup.c
··· 605 605 * If we're configured to take boot arguments from DT, look for those 606 606 * now. 607 607 */ 608 - if (IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB)) 608 + if (IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB) || 609 + IS_ENABLED(CONFIG_MIPS_CMDLINE_DTB_EXTEND)) 609 610 of_scan_flat_dt(bootcmdline_scan_chosen, &dt_bootargs); 610 611 #endif 611 612
+1 -1
arch/mips/kernel/vpe.c
··· 134 134 { 135 135 list_del(&v->list); 136 136 if (v->load_addr) 137 - release_progmem(v); 137 + release_progmem(v->load_addr); 138 138 kfree(v); 139 139 } 140 140
+25 -3
arch/mips/vdso/Makefile
··· 33 33 cflags-vdso := $(ccflags-vdso) \ 34 34 $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ 35 35 -O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \ 36 + -mrelax-pic-calls $(call cc-option, -mexplicit-relocs) \ 36 37 -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ 37 38 $(call cc-option, -fno-asynchronous-unwind-tables) \ 38 39 $(call cc-option, -fno-stack-protector) ··· 52 51 53 52 CFLAGS_REMOVE_vgettimeofday.o = -pg 54 53 54 + DISABLE_VDSO := n 55 + 55 56 # 56 57 # For the pre-R6 code in arch/mips/vdso/vdso.h for locating 57 58 # the base address of VDSO, the linker will emit a R_MIPS_PC32 ··· 67 64 ifndef CONFIG_CPU_MIPSR6 68 65 ifeq ($(call ld-ifversion, -lt, 225000000, y),y) 69 66 $(warning MIPS VDSO requires binutils >= 2.25) 70 - obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y)) 71 - ccflags-vdso += -DDISABLE_MIPS_VDSO 67 + DISABLE_VDSO := y 72 68 endif 69 + endif 70 + 71 + # 72 + # GCC (at least up to version 9.2) appears to emit function calls that make use 73 + # of the GOT when targeting microMIPS, which we can't use in the VDSO due to 74 + # the lack of relocations. As such, we disable the VDSO for microMIPS builds. 75 + # 76 + ifdef CONFIG_CPU_MICROMIPS 77 + DISABLE_VDSO := y 78 + endif 79 + 80 + ifeq ($(DISABLE_VDSO),y) 81 + obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y)) 82 + ccflags-vdso += -DDISABLE_MIPS_VDSO 73 83 endif 74 84 75 85 # VDSO linker flags. ··· 97 81 UBSAN_SANITIZE := n 98 82 KCOV_INSTRUMENT := n 99 83 84 + # Check that we don't have PIC 'jalr t9' calls left 85 + quiet_cmd_vdso_mips_check = VDSOCHK $@ 86 + cmd_vdso_mips_check = if $(OBJDUMP) --disassemble $@ | egrep -h "jalr.*t9" > /dev/null; \ 87 + then (echo >&2 "$@: PIC 'jalr t9' calls are not supported"; \ 88 + rm -f $@; /bin/false); fi 89 + 100 90 # 101 91 # Shared build commands. 102 92 # 103 93 104 94 quiet_cmd_vdsold_and_vdso_check = LD $@ 105 - cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check) 95 + cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check); $(cmd_vdso_mips_check) 106 96 107 97 quiet_cmd_vdsold = VDSO $@ 108 98 cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \