kernel_optimize_test/arch/riscv/kernel
Jisheng Zhang 3c23e23c7a riscv: vdso: fix and clean-up Makefile
[ Upstream commit 772d7891e8b3b0baae7bb88a294d61fd07ba6d15 ]

Running "make" on an already compiled kernel tree will rebuild the
kernel even without any modifications:

  CALL    linux/scripts/checksyscalls.sh
  CALL    linux/scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  SO2S    arch/riscv/kernel/vdso/vdso-syms.S
  AS      arch/riscv/kernel/vdso/vdso-syms.o
  AR      arch/riscv/kernel/vdso/built-in.a
  AR      arch/riscv/kernel/built-in.a
  AR      arch/riscv/built-in.a
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  AR      init/built-in.a
  LD      vmlinux.o

The reason is "Any target that utilizes if_changed must be listed in
$(targets), otherwise the command line check will fail, and the target
will always be built" as explained by Documentation/kbuild/makefiles.rst

Fix this build bug by adding vdso-syms.S to $(targets)

At the same time, there are two trivial clean up modifications:

- the vdso-dummy.o is not needed any more after so remove it.

- vdso.lds is a generated file, so it should be prefixed with
  $(obj)/ instead of $(src)/

Fixes: c2c81bb2f6 ("RISC-V: Fix the VDSO symbol generaton for binutils-2.35+")
Cc: stable@vger.kernel.org
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-10 13:39:22 +02:00
..
vdso riscv: vdso: fix and clean-up Makefile 2021-06-10 13:39:22 +02:00
.gitignore
asm-offsets.c
cacheinfo.c riscv: cacheinfo: Fix using smp_processor_id() in preemptible 2021-01-27 11:55:00 +01:00
cpu_ops_sbi.c
cpu_ops_spinwait.c
cpu_ops.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
cpu-hotplug.c
cpu.c
cpufeature.c
efi-header.S
efi.c
entry.S riscv,entry: fix misaligned base for excp_vect_table 2021-04-16 11:43:21 +02:00
fpu.S
ftrace.c risc-v: kernel: ftrace: Fixes improper SPDX comment style 2020-11-04 13:28:20 -08:00
head.h
head.S riscv: Set text_offset correctly for M-Mode 2020-11-05 17:32:27 -08:00
image-vars.h
irq.c
jump_label.c
kgdb.c
Makefile
mcount-dyn.S
mcount.S riscv: Workaround mcount name prior to clang-13 2021-05-22 11:40:53 +02:00
module-sections.c
module.c
patch.c
perf_callchain.c
perf_event.c
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
process.c sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
ptrace.c
reset.c
riscv_ksyms.c
sbi.c
setup.c RISC-V: Add missing jump label initialization 2020-11-25 09:44:25 -08:00
signal.c
smp.c RISC-V: Fix error code returned by riscv_hartid_to_cpuid() 2021-05-19 10:13:06 +02:00
smpboot.c
soc.c
stacktrace.c
sys_riscv.c
syscall_table.c
time.c riscv: Fix kernel time_init() 2021-01-27 11:54:59 +01:00
traps_misaligned.c
traps.c
vdso.c riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL 2021-01-19 18:27:20 +01:00
vmlinux.lds.S