Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f002fdd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MIPS updates from James Hogan:
 "Here's the main MIPS pull request for 4.11.

  It contains a few new features such as IRQ stacks, cacheinfo support,
  and KASLR for Octeon CPUs, and a variety of smaller improvements and
  fixes including devicetree additions, kexec cleanups, microMIPS stack
  unwinding fixes, and a bunch of build fixes to clean up continuous
  integration builds.

  Its all been in linux-next for at least a couple of days, most of it
  far longer.

  Miscellaneous:
   - Add IRQ stacks
   - Add cacheinfo support
   - Add "uzImage.bin" zboot target
   - Unify performance counter definitions
   - Export various (mainly assembly) symbols alongside their
     definitions
   - Audit and remove unnecessary uses of module.h

  kexec & kdump:
   - Lots of improvements and fixes
   - Add correct copy_regs implementations
   - Add debug logging of new kernel information

  Security:
   - Use Makefile.postlink to insert relocations into vmlinux
   - Provide plat_post_relocation hook (used for Octeon KASLR)
   - Add support for tuning mmap randomisation
   - Relocate DTB

  microMIPS:
   - A load of unwind fixes
   - Add some missing .insn to fix link errors

  MIPSr6:
   - Fix MULTU/MADDU/MSUBU sign extension in r2 emulation
   - Remove r2_emul_return and use ERETNC unconditionally on MIPSr6
   - Allow pre-r6 emulation on SMP MIPSr6 kernels

  Cache management:
   - Treat physically indexed dcache as non-aliasing
   - Add return errors to protected cache ops for KVM
   - CM3: Ensure L1 & L2 cache ECC checking matches
   - CM3: Indicate inclusive caches
   - I6400: Treat dcache as physically indexed

  Memory management:
   - Ensure bootmem doesn't corrupt reserved memory
   - Export some TLB exception generation functions for KVM

  OF:
   - NULL check initial_boot_params before use in of_scan_flat_dt()
   - Fix unaligned access in of_alias_scan()

  SMP:
   - CPS: Don't BUG if a CPU fails to start

  Other fixes:
   - Fix longstanding 64-bit IP checksum carry bug
   - Fix KERN_CONT fallout in cpu-bugs64.c and sync-r4k.c
   - Update defconfigs for NF_CT_PROTO_DCCP, DPLITE,
     CPU_FREQ_STAT,SCSI_DH changes
   - Disable certain builtin compiler options, stack-check (whole
     kernel), asynchronous-unwind-tables (VDSO).
   - A bunch of build fixes from kernelci.org testing
   - Various other minor cleanups & corrections

  BMIPS:
   - Migrate interrupts during bmips_cpu_disable
   - BCM47xx: Add Luxul devices
   - BCM47xx: Fix Asus WL-500W button inversion
   - BCM7xxx: Add SPI device nodes

  Generic (multiplatform):
   - Add kexec DTB passing
   - Fix big endian
   - Add cpp_its_S in ksym_dep_filter to silence build warning

  IP22:
   - Reformat inline assembler code to modern standards
   - Fix binutils 2.25 build error

  IP27:
   - Fix duplicate CAC_BASE definition build error
   - Disable qlge driver to workaround broken compiler

  Lantiq:
   - Refresh defconfig and activate more drivers
   - Lock DMA register access
   - Fix cascading IRQ setup
   - Fix build of VPE loader
   - xway: Fix ethernet packet header corruption over reboot

  Loongson1
   - Add watchdog support
   - 1B: Reduce DEFAULT_MEMSIZE to 64MB
   - 1B: Change OSC clock name to match rest of kernel
   - 1C: Remove ARCH_WANT_OPTIONAL_GPIOLIB

  Octeon:
   - Add KASLR support
   - Support Octeon III USB controller
   - Fix large copy_from_user corner case
   - Enable devtmpfs in defconfig

  Netlogic:
   - Fix non-default XLR build error due to netlogic,xlp-pic code
   - Fix assembler warning from smpboot.S

  pic32mzda:
   - Fix linker error when early printk is disabled

  Pistachio:
   - Add base device tree
   - Add Ci40 "Marduk" device tree

  Ralink:
   - Support raw appended DTB
   - Add missing I2C & I2S clocks
   - Add missing pinmux and fix pinmux function name typo
   - Add missing clk_round_rate()
   - Clean up prom_init()
   - MT7621: Set SoC type
   - MT7621: Support highmem

  TXx9:
   - Modernize printing of kernel messages and resolve KERN_CONT fallout
   - 7segled: use permission-specific DEVICE_ATTR variants

  XilFPGA:
   - Add IRQ controller and UART IRQ
   - Add AXI I2C and emaclite to DT & defconfig"

* tag 'mips_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (148 commits)
  MIPS: VDSO: Explicitly use -fno-asynchronous-unwind-tables
  MIPS: BCM47XX: Fix button inversion for Asus WL-500W
  MIPS: DTS: Add img directory to Makefile
  MIPS: ip27: Disable qlge driver in defconfig
  MIPS: pic32mzda: Fix linker error for pic32_get_pbclk()
  MIPS: Lantiq: Keep ethernet enabled during boot
  MIPS: OCTEON: Fix copy_from_user fault handling for large buffers
  MIPS: Fix special case in 64 bit IP checksumming.
  MIPS: OCTEON: Enable DEVTMPFS
  MIPS: lantiq: Set physical_memsize
  MIPS: sysmips: Remove duplicated include from syscall.c
  Kbuild: Add cpp_its_S in ksym_dep_filter
  MIPS: Audit and remove any unnecessary uses of module.h
  MIPS: Unify perf counter register definitions
  MIPS: Disable stack checks on MIPS kernels
  MIPS: OCTEON: Platform support for OCTEON III USB controller
  MIPS: Lantiq: Fix cascaded IRQ setup
  MIPS: sync-r4k: Fix KERN_CONT fallout
  MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
  MIPS: Fix distclean with Makefile.postlink
  ...
parents 252b95c0 cfd75c2d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
Imagination Technologies' Pistachio SoC based Marduk Board
==========================================================

Compatible string must be "img,pistachio-marduk", "img,pistachio"

Hardware and other related documentation is available at
https://docs.creatordev.io/ci40/

It is also known as Creator Ci40. Marduk is legacy name and will
be there for decades.
+7 −1
Original line number Diff line number Diff line
@@ -7707,6 +7707,12 @@ W: http://www.kernel.org/doc/man-pages
L:	linux-man@vger.kernel.org
S:	Maintained

MARDUK (CREATOR CI40) DEVICE TREE SUPPORT
M:	Rahul Bedarkar <rahul.bedarkar@imgtec.com>
L:	linux-mips@linux-mips.org
S:	Maintained
F:	arch/mips/boot/dts/img/pistachio_marduk.dts

MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER
M:	Andrew Lunn <andrew@lunn.ch>
M:	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
@@ -9795,7 +9801,7 @@ L: linux-mips@linux-mips.org
S:      Maintained
F:      arch/mips/pistachio/
F:      arch/mips/include/asm/mach-pistachio/
F:      arch/mips/boot/dts/pistachio/
F:      arch/mips/boot/dts/img/pistachio*
F:      arch/mips/configs/pistachio*_defconfig

PKTCDVD DRIVER
+29 −12
Original line number Diff line number Diff line
@@ -9,10 +9,13 @@ config MIPS
	select HAVE_CONTEXT_TRACKING
	select HAVE_GENERIC_DMA_COHERENT
	select HAVE_IDE
	select HAVE_IRQ_EXIT_ON_IRQ_STACK
	select HAVE_OPROFILE
	select HAVE_PERF_EVENTS
	select PERF_USE_VMALLOC
	select HAVE_ARCH_KGDB
	select HAVE_ARCH_MMAP_RND_BITS if MMU
	select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT
	select HAVE_ARCH_SECCOMP_FILTER
	select HAVE_ARCH_TRACEHOOK
	select HAVE_CBPF_JIT if !CPU_MICROMIPS
@@ -94,6 +97,7 @@ config MIPS_GENERIC
	select PCI_DRIVERS_GENERIC
	select PINCTRL
	select SMP_UP if SMP
	select SWAP_IO_SPACE
	select SYS_HAS_CPU_MIPS32_R1
	select SYS_HAS_CPU_MIPS32_R2
	select SYS_HAS_CPU_MIPS32_R6
@@ -478,6 +482,7 @@ config MACH_XILFPGA
	select SYS_SUPPORTS_ZBOOT_UART16550
	select USE_OF
	select USE_GENERIC_EARLY_PRINTK_8250
	select XILINX_INTC
	help
	  This enables support for the IMG University Program MIPSfpga platform.

@@ -909,6 +914,7 @@ config CAVIUM_OCTEON_SOC
	select NR_CPUS_DEFAULT_16
	select BUILTIN_DTB
	select MTD_COMPLEX_MAPPINGS
	select SYS_SUPPORTS_RELOCATABLE
	help
	  This option supports all of the Octeon reference boards from Cavium
	  Networks. It builds a kernel that dynamically determines the Octeon
@@ -1427,7 +1433,6 @@ config CPU_LOONGSON1C
	bool "Loongson 1C"
	depends on SYS_HAS_CPU_LOONGSON1C
	select CPU_LOONGSON1
	select ARCH_WANT_OPTIONAL_GPIOLIB
	select LEDS_GPIO_REGISTER
	help
	  The Loongson 1C is a 32-bit SoC, which implements the MIPS32
@@ -2288,7 +2293,7 @@ config MIPS_MT_FPAFF

config MIPSR2_TO_R6_EMULATOR
	bool "MIPS R2-to-R6 emulator"
	depends on CPU_MIPSR6 && !SMP
	depends on CPU_MIPSR6
	default y
	help
	  Choose this option if you want to run non-R6 MIPS userland code.
@@ -2296,8 +2301,6 @@ config MIPSR2_TO_R6_EMULATOR
	  default. You can enable it using the 'mipsr2emu' kernel option.
	  The only reason this is a build-time option is to save ~14K from the
	  final kernel image.
comment "MIPS R2-to-R6 emulator is only available for UP kernels"
	depends on SMP && CPU_MIPSR6

config MIPS_VPE_LOADER
	bool "VPE loader support."
@@ -2572,7 +2575,7 @@ config SYS_SUPPORTS_NUMA

config RELOCATABLE
	bool "Relocatable kernel"
	depends on SYS_SUPPORTS_RELOCATABLE && (CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_MIPS32_R6 || CPU_MIPS64_R6)
	depends on SYS_SUPPORTS_RELOCATABLE && (CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_MIPS32_R6 || CPU_MIPS64_R6 || CAVIUM_OCTEON_SOC)
	help
	  This builds a kernel image that retains relocation information
	  so it can be loaded someplace besides the default 1MB.
@@ -3075,6 +3078,20 @@ config MMU
	bool
	default y

config ARCH_MMAP_RND_BITS_MIN
	default 12 if 64BIT
	default 8

config ARCH_MMAP_RND_BITS_MAX
	default 18 if 64BIT
	default 15

config ARCH_MMAP_RND_COMPAT_BITS_MIN
       default 8

config ARCH_MMAP_RND_COMPAT_BITS_MAX
       default 15

config I8253
	bool
	select CLKSRC_I8253
+21 −14
Original line number Diff line number Diff line
@@ -131,6 +131,21 @@ cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.

cflags-$(CONFIG_SB1XXX_CORELIS)	+= $(call cc-option,-mno-sched-prolog) \
				   -fno-omit-frame-pointer

# Some distribution-specific toolchains might pass the -fstack-check
# option during the build, which adds a simple stack-probe at the beginning
# of every function.  This stack probe is to ensure that there is enough
# stack space, else a SEGV is generated.  This is not desirable for MIPS
# as kernel stacks are small, placed in unmapped virtual memory, and do not
# grow when overflowed.  Especially on SGI IP27 platforms, this check will
# lead to a NULL pointer dereference in _raw_spin_lock_irq.
#
# In disassembly, this stack probe appears at the top of a function as:
#    sd		zero,<offset>(sp)
# Where <offset> is a negative value.
#
cflags-y += -fno-stack-check

#
# CPU-dependent compiler/assembler options for optimization.
#
@@ -320,6 +335,9 @@ bootz-y := vmlinuz
bootz-y			+= vmlinuz.bin
bootz-y			+= vmlinuz.ecoff
bootz-y			+= vmlinuz.srec
ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0)
bootz-y			+= uzImage.bin
endif

ifdef CONFIG_LASAT
rom.bin rom.sw: vmlinux
@@ -327,10 +345,6 @@ rom.bin rom.sw: vmlinux
		$(bootvars-y) $@
endif

CMD_RELOCS = arch/mips/boot/tools/relocs
quiet_cmd_relocs = RELOCS  $<
      cmd_relocs = $(CMD_RELOCS) $<

#
# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
@@ -339,11 +353,6 @@ quiet_cmd_relocs = RELOCS $<
quiet_cmd_32 = OBJCOPY $@
	cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
vmlinux.32: vmlinux
ifeq ($(CONFIG_RELOCATABLE)$(CONFIG_64BIT),yy)
# Currently, objcopy fails to handle the relocations in the elf64
# So the relocs tool must be run here to remove them first
	$(call cmd,relocs)
endif
	$(call cmd,32)

#
@@ -359,9 +368,6 @@ all: $(all-y)

# boot
$(boot-y): $(vmlinux-32) FORCE
ifeq ($(CONFIG_RELOCATABLE)$(CONFIG_32BIT),yy)
	$(call cmd,relocs)
endif
	$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \
		$(bootvars-y) arch/mips/boot/$@

@@ -395,11 +401,11 @@ dtbs_install:

archprepare:
ifdef CONFIG_MIPS32_N32
	@echo '  Checking missing-syscalls for N32'
	@$(kecho) '  Checking missing-syscalls for N32'
	$(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=n32"
endif
ifdef CONFIG_MIPS32_O32
	@echo '  Checking missing-syscalls for O32'
	@$(kecho) '  Checking missing-syscalls for O32'
	$(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=32"
endif

@@ -433,6 +439,7 @@ define archhelp
	echo '  uImage.gz            - U-Boot image (gzip)'
	echo '  uImage.lzma          - U-Boot image (lzma)'
	echo '  uImage.lzo           - U-Boot image (lzo)'
	echo '  uzImage.bin          - U-Boot image (self-extracting)'
	echo '  dtbs                 - Device-tree blobs for enabled boards'
	echo '  dtbs_install         - Install dtbs to $(INSTALL_DTBS_PATH)'
	echo
+35 −0
Original line number Diff line number Diff line
# ===========================================================================
# Post-link MIPS pass
# ===========================================================================
#
# 1. Insert relocations into vmlinux

PHONY := __archpost
__archpost:

-include include/config/auto.conf
include scripts/Kbuild.include

CMD_RELOCS = arch/mips/boot/tools/relocs
quiet_cmd_relocs = RELOCS $@
      cmd_relocs = $(CMD_RELOCS) $@

# `@true` prevents complaint when there is nothing to be done

vmlinux: FORCE
	@true
ifeq ($(CONFIG_RELOCATABLE),y)
	$(call if_changed,relocs)
endif

%.ko: FORCE
	@true

clean:
	@true

PHONY += FORCE clean

FORCE:

.PHONY: $(PHONY)
Loading