mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 15:14:18 +08:00
7eb6369d7a
The RISC-V port supports the rv32i and rv64i base ISAs, but provides no mechanism to run 32-bit userspace on 64-bit systems. This adds that support, via the COMPAT framework. As the RISC-V ISAs (and uABIs) were developed concurrently, the resulting compat support is mostly generic. This includes a handful of cleanups to the generic compat infrastructure to more cleanly support RISC-V, followed by the RISC-V implementation. * palmer/riscv-compat: riscv: compat: Add COMPAT Kbuild skeletal support riscv: compat: ptrace: Add compat_arch_ptrace implement riscv: compat: signal: Add rt_frame implementation riscv: compat: vdso: Add setup additional pages implementation riscv: compat: vdso: Add COMPAT_VDSO base code implementation riscv: compat: Add hw capability check for elf riscv: compat: Add elf.h implementation riscv: compat: process: Add UXL_32 support in start_thread riscv: compat: syscall: Add entry.S implementation riscv: compat: syscall: Add compat_sys_call_table implementation riscv: compat: Support TASK_SIZE for compat mode riscv: compat: Add basic compat data type implementation riscv: Fixup difference with defconfig syscalls: compat: Fix the missing part for __SYSCALL_COMPAT asm-generic: compat: Cleanup duplicate definitions fs: stat: compat: Add __ARCH_WANT_COMPAT_STAT arch: Add SYSVIPC_COMPAT for all architectures compat: consolidate the compat_flock{,64} definition uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h uapi: simplify __ARCH_FLOCK{,64}_PAD a little
90 lines
2.3 KiB
Makefile
90 lines
2.3 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Makefile for the RISC-V Linux kernel
|
|
#
|
|
|
|
ifdef CONFIG_FTRACE
|
|
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,)
|
|
|
|
ifdef CONFIG_KEXEC
|
|
AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
|
|
endif
|
|
|
|
# cmodel=medany and notrace when patching early
|
|
ifdef CONFIG_RISCV_ALTERNATIVE_EARLY
|
|
CFLAGS_alternative.o := -mcmodel=medany
|
|
CFLAGS_cpufeature.o := -mcmodel=medany
|
|
ifdef CONFIG_FTRACE
|
|
CFLAGS_REMOVE_alternative.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_cpufeature.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
ifdef CONFIG_KASAN
|
|
KASAN_SANITIZE_alternative.o := n
|
|
KASAN_SANITIZE_cpufeature.o := n
|
|
endif
|
|
endif
|
|
|
|
extra-y += head.o
|
|
extra-y += vmlinux.lds
|
|
|
|
obj-y += soc.o
|
|
obj-$(CONFIG_RISCV_ALTERNATIVE) += alternative.o
|
|
obj-y += cpu.o
|
|
obj-y += cpufeature.o
|
|
obj-y += entry.o
|
|
obj-y += irq.o
|
|
obj-y += process.o
|
|
obj-y += ptrace.o
|
|
obj-y += reset.o
|
|
obj-y += setup.o
|
|
obj-y += signal.o
|
|
obj-y += syscall_table.o
|
|
obj-y += sys_riscv.o
|
|
obj-y += time.o
|
|
obj-y += traps.o
|
|
obj-y += riscv_ksyms.o
|
|
obj-y += stacktrace.o
|
|
obj-y += cacheinfo.o
|
|
obj-y += patch.o
|
|
obj-y += probes/
|
|
obj-$(CONFIG_MMU) += vdso.o vdso/
|
|
|
|
obj-$(CONFIG_RISCV_M_MODE) += traps_misaligned.o
|
|
obj-$(CONFIG_FPU) += fpu.o
|
|
obj-$(CONFIG_SMP) += smpboot.o
|
|
obj-$(CONFIG_SMP) += smp.o
|
|
obj-$(CONFIG_SMP) += cpu_ops.o
|
|
|
|
obj-$(CONFIG_RISCV_BOOT_SPINWAIT) += cpu_ops_spinwait.o
|
|
obj-$(CONFIG_MODULES) += module.o
|
|
obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o
|
|
|
|
obj-$(CONFIG_CPU_PM) += suspend_entry.o suspend.o
|
|
|
|
obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
|
|
obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o
|
|
|
|
obj-$(CONFIG_TRACE_IRQFLAGS) += trace_irq.o
|
|
|
|
obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o
|
|
obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
|
|
obj-$(CONFIG_RISCV_SBI) += sbi.o
|
|
ifeq ($(CONFIG_RISCV_SBI), y)
|
|
obj-$(CONFIG_SMP) += cpu_ops_sbi.o
|
|
endif
|
|
obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o
|
|
obj-$(CONFIG_KGDB) += kgdb.o
|
|
obj-$(CONFIG_KEXEC) += kexec_relocate.o crash_save_regs.o machine_kexec.o
|
|
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
|
|
|
obj-$(CONFIG_JUMP_LABEL) += jump_label.o
|
|
|
|
obj-$(CONFIG_EFI) += efi.o
|
|
obj-$(CONFIG_COMPAT) += compat_syscall_table.o
|
|
obj-$(CONFIG_COMPAT) += compat_signal.o
|
|
obj-$(CONFIG_COMPAT) += compat_vdso/
|