Commit c420ddda authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MIPS fixes from Paul Burton:
 "A collection of MIPS fixes:

   - Fill the struct cacheinfo shared_cpu_map field with sensible
     values, notably avoiding issues with perf which was unhappy in the
     absence of these values.

   - A boot fix for Loongson 2E & 2F machines which was fallout from
     some refactoring performed this cycle.

   - A Kconfig dependency fix for the Loongson CPU HWMon driver.

   - A couple of VDSO fixes, ensuring gettimeofday() behaves
     appropriately for kernel configurations that don't include support
     for a clocksource the VDSO can use & fixing the calling convention
     for the n32 & n64 VDSOs which would previously clobber the $gp/$28
     register.

   - A build fix for vmlinuz compressed images which were
     inappropriately building with -fsanitize-coverage despite not being
     part of the kernel proper, then failing to link due to the missing
     __sanitizer_cov_trace_pc() function.

   - A couple of eBPF JIT fixes, including disabling it for MIPS32 due
     to a large number of issues with the code generated there &
     reflecting ISA dependencies in Kconfig to enforce that systems
     which don't support the JIT must include the interpreter"

* tag 'mips_fixes_5.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: Avoid VDSO ABI breakage due to global register variable
  MIPS: BPF: eBPF JIT: check for MIPS ISA compliance in Kconfig
  MIPS: BPF: Disable MIPS32 eBPF JIT
  MIPS: Prevent link failure with kcov instrumentation
  MIPS: Kconfig: Use correct form for 'depends on'
  mips: Fix gettimeofday() in the vdso library
  MIPS: Fix boot on Fuloong2 systems
  mips: cacheinfo: report shared CPU map
parents 5613970a bbcc5672
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ config MIPS
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
	select HAVE_ASM_MODVERSIONS
	select HAVE_EBPF_JIT if (!CPU_MICROMIPS)
	select HAVE_EBPF_JIT if 64BIT && !CPU_MICROMIPS && TARGET_ISA_REV >= 2
	select HAVE_CONTEXT_TRACKING
	select HAVE_COPY_THREAD_TLS
	select HAVE_C_RECORDMCOUNT
+3 −0
Original line number Diff line number Diff line
@@ -29,6 +29,9 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
	-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)

# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT		:= n

# decompressor objects (linked with vmlinuz)
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o

+2 −1
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@
static inline int __pure __get_cpu_type(const int cpu_type)
{
	switch (cpu_type) {
#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)
#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
    defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)
	case CPU_LOONGSON2EF:
#endif

+19 −1
Original line number Diff line number Diff line
@@ -49,8 +49,26 @@ struct thread_info {
	.addr_limit	= KERNEL_DS,		\
}

/* How to get the thread information struct from C.  */
/*
 * A pointer to the struct thread_info for the currently executing thread is
 * held in register $28/$gp.
 *
 * We declare __current_thread_info as a global register variable rather than a
 * local register variable within current_thread_info() because clang doesn't
 * support explicit local register variables.
 *
 * When building the VDSO we take care not to declare the global register
 * variable because this causes GCC to not preserve the value of $28/$gp in
 * functions that change its value (which is common in the PIC VDSO when
 * accessing the GOT). Since the VDSO shouldn't be accessing
 * __current_thread_info anyway we declare it extern in order to cause a link
 * failure if it's referenced.
 */
#ifdef __VDSO__
extern struct thread_info *__current_thread_info;
#else
register struct thread_info *__current_thread_info __asm__("$28");
#endif

static inline struct thread_info *current_thread_info(void)
{
+0 −13
Original line number Diff line number Diff line
@@ -26,8 +26,6 @@

#define __VDSO_USE_SYSCALL		ULLONG_MAX

#ifdef CONFIG_MIPS_CLOCK_VSYSCALL

static __always_inline long gettimeofday_fallback(
				struct __kernel_old_timeval *_tv,
				struct timezone *_tz)
@@ -48,17 +46,6 @@ static __always_inline long gettimeofday_fallback(
	return error ? -ret : ret;
}

#else

static __always_inline long gettimeofday_fallback(
				struct __kernel_old_timeval *_tv,
				struct timezone *_tz)
{
	return -1;
}

#endif

static __always_inline long clock_gettime_fallback(
					clockid_t _clkid,
					struct __kernel_timespec *_ts)
Loading