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

Commit 977674c0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MIPS fixes from Ralf Baechle:
 "Lantiq:
    - Fix adding xbar resoures causing a panic

  Loongson3:
    - Some Loongson 3A don't identify themselves as having an FTLB so
      hardwire that knowledge into CPU probing.
    - Handle Loongson 3 TLB peculiarities in the fast path of the RDHWR
      emulation.
    - Fix invalid FTLB entries with huge page on VTLB+FTLB platforms
    - Add missing calculation of S-cache and V-cache cache-way size

  Ralink:
    - Fix typos in rt3883 pinctrl data

  Generic:
    - Force o32 fp64 support on 32bit MIPS64r6 kernels
    - Yet another build fix after the linux/sched.h changes
    - Wire up statx system call
    - Fix stack unwinding after introduction of IRQ stack
    - Fix spinlock code to build even for microMIPS with recent binutils

  SMP-CPS:
    - Fix retrieval of VPE mask on big endian CPUs"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: IRQ Stack: Unwind IRQ stack onto task stack
  MIPS: c-r4k: Fix Loongson-3's vcache/scache waysize calculation
  MIPS: Flush wrong invalid FTLB entry for huge page
  MIPS: Check TLB before handle_ri_rdhwr() for Loongson-3
  MIPS: Add MIPS_CPU_FTLB for Loongson-3A R2
  MIPS: Lantiq: fix missing xbar kernel panic
  MIPS: smp-cps: Fix retrieval of VPE mask on big endian CPUs
  MIPS: Wire up statx system call
  MIPS: Include asm/ptrace.h now linux/sched.h doesn't
  MIPS: ralink: Fix typos in rt3883 pinctrl
  MIPS: End spinlocks with .insn
  MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels
parents 4691f4a6 db8466c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1531,7 +1531,7 @@ config CPU_MIPS64_R6
	select CPU_SUPPORTS_HIGHMEM
	select CPU_SUPPORTS_MSA
	select GENERIC_CSUM
	select MIPS_O32_FP64_SUPPORT if MIPS32_O32
	select MIPS_O32_FP64_SUPPORT if 32BIT || MIPS32_O32
	select HAVE_KVM
	help
	  Choose this option to build a kernel for release 6 or later of the
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <asm/cpu-features.h>
#include <asm/fpu_emulator.h>
#include <asm/hazards.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
#include <asm/current.h>
#include <asm/msa.h>
+15 −0
Original line number Diff line number Diff line
@@ -18,9 +18,24 @@
#include <irq.h>

#define IRQ_STACK_SIZE			THREAD_SIZE
#define IRQ_STACK_START			(IRQ_STACK_SIZE - sizeof(unsigned long))

extern void *irq_stack[NR_CPUS];

/*
 * The highest address on the IRQ stack contains a dummy frame put down in
 * genex.S (handle_int & except_vec_vi_handler) which is structured as follows:
 *
 *   top ------------
 *       | task sp  | <- irq_stack[cpu] + IRQ_STACK_START
 *       ------------
 *       |          | <- First frame of IRQ context
 *       ------------
 *
 * task sp holds a copy of the task stack pointer where the struct pt_regs
 * from exception entry can be found.
 */

static inline bool on_irq_stack(int cpu, unsigned long sp)
{
	unsigned long low = (unsigned long)irq_stack[cpu];
+4 −4
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
		"	andi	%[ticket], %[ticket], 0xffff		\n"
		"	bne	%[ticket], %[my_ticket], 4f		\n"
		"	 subu	%[ticket], %[my_ticket], %[ticket]	\n"
		"2:							\n"
		"2:	.insn						\n"
		"	.subsection 2					\n"
		"4:	andi	%[ticket], %[ticket], 0xffff		\n"
		"	sll	%[ticket], 5				\n"
@@ -202,7 +202,7 @@ static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock)
		"	sc	%[ticket], %[ticket_ptr]		\n"
		"	beqz	%[ticket], 1b				\n"
		"	 li	%[ticket], 1				\n"
		"2:							\n"
		"2:	.insn						\n"
		"	.subsection 2					\n"
		"3:	b	2b					\n"
		"	 li	%[ticket], 0				\n"
@@ -382,7 +382,7 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)
		"	.set	reorder					\n"
		__WEAK_LLSC_MB
		"	li	%2, 1					\n"
		"2:							\n"
		"2:	.insn						\n"
		: "=" GCC_OFF_SMALL_ASM() (rw->lock), "=&r" (tmp), "=&r" (ret)
		: GCC_OFF_SMALL_ASM() (rw->lock)
		: "memory");
@@ -422,7 +422,7 @@ static inline int arch_write_trylock(arch_rwlock_t *rw)
			"	lui	%1, 0x8000			\n"
			"	sc	%1, %0				\n"
			"	li	%2, 1				\n"
			"2:						\n"
			"2:	.insn					\n"
			: "=" GCC_OFF_SMALL_ASM() (rw->lock), "=&r" (tmp),
			  "=&r" (ret)
			: GCC_OFF_SMALL_ASM() (rw->lock)
+9 −6
Original line number Diff line number Diff line
@@ -386,17 +386,18 @@
#define __NR_pkey_mprotect		(__NR_Linux + 363)
#define __NR_pkey_alloc			(__NR_Linux + 364)
#define __NR_pkey_free			(__NR_Linux + 365)
#define __NR_statx			(__NR_Linux + 366)


/*
 * Offset of the last Linux o32 flavoured syscall
 */
#define __NR_Linux_syscalls		365
#define __NR_Linux_syscalls		366

#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */

#define __NR_O32_Linux			4000
#define __NR_O32_Linux_syscalls		365
#define __NR_O32_Linux_syscalls		366

#if _MIPS_SIM == _MIPS_SIM_ABI64

@@ -730,16 +731,17 @@
#define __NR_pkey_mprotect		(__NR_Linux + 323)
#define __NR_pkey_alloc			(__NR_Linux + 324)
#define __NR_pkey_free			(__NR_Linux + 325)
#define __NR_statx			(__NR_Linux + 326)

/*
 * Offset of the last Linux 64-bit flavoured syscall
 */
#define __NR_Linux_syscalls		325
#define __NR_Linux_syscalls		326

#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */

#define __NR_64_Linux			5000
#define __NR_64_Linux_syscalls		325
#define __NR_64_Linux_syscalls		326

#if _MIPS_SIM == _MIPS_SIM_NABI32

@@ -1077,15 +1079,16 @@
#define __NR_pkey_mprotect		(__NR_Linux + 327)
#define __NR_pkey_alloc			(__NR_Linux + 328)
#define __NR_pkey_free			(__NR_Linux + 329)
#define __NR_statx			(__NR_Linux + 330)

/*
 * Offset of the last N32 flavoured syscall
 */
#define __NR_Linux_syscalls		329
#define __NR_Linux_syscalls		330

#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */

#define __NR_N32_Linux			6000
#define __NR_N32_Linux_syscalls		329
#define __NR_N32_Linux_syscalls		330

#endif /* _UAPI_ASM_UNISTD_H */
Loading