aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/vdso64
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-01-21 16:30:27 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2022-02-12 22:47:43 +1100
commitfd1feade75fb1a9275c39d76c5ccdbbbe6b37aa3 (patch)
tree6f34bdf2144d5a3ea59ee140bac7ac29fb3adde3 /arch/powerpc/kernel/vdso64
parentd88378d8d2c776154c6b606f2a423a81d7795f6f (diff)
powerpc/vdso: Merge vdso64 and vdso32 into a single directory
merge vdso64 into vdso32 and rename it vdso. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/4dbe05cc130f6a0858d09ac72e436c373cb08b70.1642782130.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/vdso64')
-rw-r--r--arch/powerpc/kernel/vdso64/.gitignore3
-rw-r--r--arch/powerpc/kernel/vdso64/Makefile56
-rw-r--r--arch/powerpc/kernel/vdso64/cacheflush.S75
-rw-r--r--arch/powerpc/kernel/vdso64/datapage.S59
-rwxr-xr-xarch/powerpc/kernel/vdso64/gen_vdso_offsets.sh16
-rw-r--r--arch/powerpc/kernel/vdso64/getcpu.S33
-rw-r--r--arch/powerpc/kernel/vdso64/gettimeofday.S58
-rw-r--r--arch/powerpc/kernel/vdso64/note.S1
-rw-r--r--arch/powerpc/kernel/vdso64/sigtramp.S313
-rw-r--r--arch/powerpc/kernel/vdso64/vdso64.lds.S134
-rw-r--r--arch/powerpc/kernel/vdso64/vgettimeofday.c29
11 files changed, 0 insertions, 777 deletions
diff --git a/arch/powerpc/kernel/vdso64/.gitignore b/arch/powerpc/kernel/vdso64/.gitignore
deleted file mode 100644
index 84151a7ba31d..000000000000
--- a/arch/powerpc/kernel/vdso64/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-vdso64.lds
-vdso64.so.dbg
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
deleted file mode 100644
index 3c5baaa6f1e7..000000000000
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-# List of files in the vdso, has to be asm only for now
-
-ARCH_REL_TYPE_ABS := R_PPC_JUMP_SLOT|R_PPC_GLOB_DAT|R_PPC_ADDR32|R_PPC_ADDR24|R_PPC_ADDR16|R_PPC_ADDR16_LO|R_PPC_ADDR16_HI|R_PPC_ADDR16_HA|R_PPC_ADDR14|R_PPC_ADDR14_BRTAKEN|R_PPC_ADDR14_BRNTAKEN|R_PPC_REL24
-include $(srctree)/lib/vdso/Makefile
-
-obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o
-
-ifneq ($(c-gettimeofday-y),)
- CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
- CFLAGS_vgettimeofday.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
- CFLAGS_vgettimeofday.o += $(call cc-option, -fno-stack-protector)
- CFLAGS_vgettimeofday.o += -DDISABLE_BRANCH_PROFILING
- CFLAGS_vgettimeofday.o += -ffreestanding -fasynchronous-unwind-tables
- CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
-endif
-
-# Build rules
-
-targets := $(obj-vdso64) vdso64.so.dbg vgettimeofday.o
-obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
-
-GCOV_PROFILE := n
-KCOV_INSTRUMENT := n
-UBSAN_SANITIZE := n
-KASAN_SANITIZE := n
-
-ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
- -Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both
-
-# Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code. That used to be true
-# by accident when the VDSO was hand-written asm code, but may not be now that the VDSO is
-# compiler generated. To avoid breaking Go tell GCC not to use r30. Impact on code
-# generation is minimal, it will just use r29 instead.
-ccflags-y += $(call cc-option, -ffixed-r30)
-
-asflags-y := -D__VDSO64__ -s
-
-targets += vdso64.lds
-CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
-
-# link rule for the .so file, .lds has to be first
-$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday.o FORCE
- $(call if_changed,vdso64ld_and_check)
-
-# Generate VDSO offsets using helper script
-gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
-quiet_cmd_vdsosym = VDSOSYM $@
- cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
-
-include/generated/vdso64-offsets.h: $(obj)/vdso64.so.dbg FORCE
- $(call if_changed,vdsosym)
-
-# actual build commands
-quiet_cmd_vdso64ld_and_check = VDSO64L $@
- cmd_vdso64ld_and_check = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^); $(cmd_vdso_check)
diff --git a/arch/powerpc/kernel/vdso64/cacheflush.S b/arch/powerpc/kernel/vdso64/cacheflush.S
deleted file mode 100644
index 76c3c8cf8ece..000000000000
--- a/arch/powerpc/kernel/vdso64/cacheflush.S
+++ /dev/null
@@ -1,75 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * vDSO provided cache flush routines
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
- * IBM Corp.
- */
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/vdso.h>
-#include <asm/vdso_datapage.h>
-#include <asm/asm-offsets.h>
-
- .text
-
-/*
- * Default "generic" version of __kernel_sync_dicache.
- *
- * void __kernel_sync_dicache(unsigned long start, unsigned long end)
- *
- * Flushes the data cache & invalidate the instruction cache for the
- * provided range [start, end[
- */
-V_FUNCTION_BEGIN(__kernel_sync_dicache)
- .cfi_startproc
-BEGIN_FTR_SECTION
- b 3f
-END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
- mflr r12
- .cfi_register lr,r12
- get_datapage r10
- mtlr r12
- .cfi_restore lr
-
- lwz r7,CFG_DCACHE_BLOCKSZ(r10)
- addi r5,r7,-1
- andc r6,r3,r5 /* round low to line bdy */
- subf r8,r6,r4 /* compute length */
- add r8,r8,r5 /* ensure we get enough */
- lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10)
- srd. r8,r8,r9 /* compute line count */
- crclr cr0*4+so
- beqlr /* nothing to do? */
- mtctr r8
-1: dcbst 0,r6
- add r6,r6,r7
- bdnz 1b
- sync
-
-/* Now invalidate the instruction cache */
-
- lwz r7,CFG_ICACHE_BLOCKSZ(r10)
- addi r5,r7,-1
- andc r6,r3,r5 /* round low to line bdy */
- subf r8,r6,r4 /* compute length */
- add r8,r8,r5
- lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10)
- srd. r8,r8,r9 /* compute line count */
- crclr cr0*4+so
- beqlr /* nothing to do? */
- mtctr r8
-2: icbi 0,r6
- add r6,r6,r7
- bdnz 2b
- isync
- li r3,0
- blr
-3:
- crclr cr0*4+so
- sync
- isync
- li r3,0
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_sync_dicache)
diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
deleted file mode 100644
index 00760dc69d68..000000000000
--- a/arch/powerpc/kernel/vdso64/datapage.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Access to the shared data page by the vDSO & syscall map
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
- */
-
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/asm-offsets.h>
-#include <asm/unistd.h>
-#include <asm/vdso.h>
-#include <asm/vdso_datapage.h>
-
- .text
-
-/*
- * void *__kernel_get_syscall_map(unsigned int *syscall_count) ;
- *
- * returns a pointer to the syscall map. the map is agnostic to the
- * size of "long", unlike kernel bitops, it stores bits from top to
- * bottom so that memory actually contains a linear bitmap
- * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of
- * 32 bits int at N >> 5.
- */
-V_FUNCTION_BEGIN(__kernel_get_syscall_map)
- .cfi_startproc
- mflr r12
- .cfi_register lr,r12
- mr r4,r3
- get_datapage r3
- mtlr r12
- addi r3,r3,CFG_SYSCALL_MAP64
- cmpldi cr0,r4,0
- crclr cr0*4+so
- beqlr
- li r0,NR_syscalls
- stw r0,0(r4)
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_get_syscall_map)
-
-
-/*
- * void unsigned long __kernel_get_tbfreq(void);
- *
- * returns the timebase frequency in HZ
- */
-V_FUNCTION_BEGIN(__kernel_get_tbfreq)
- .cfi_startproc
- mflr r12
- .cfi_register lr,r12
- get_datapage r3
- ld r3,CFG_TB_TICKS_PER_SEC(r3)
- mtlr r12
- crclr cr0*4+so
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_get_tbfreq)
diff --git a/arch/powerpc/kernel/vdso64/gen_vdso_offsets.sh b/arch/powerpc/kernel/vdso64/gen_vdso_offsets.sh
deleted file mode 100755
index 4bf15ffd5933..000000000000
--- a/arch/powerpc/kernel/vdso64/gen_vdso_offsets.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
-
-#
-# Match symbols in the DSO that look like VDSO_*; produce a header file
-# of constant offsets into the shared object.
-#
-# Doing this inside the Makefile will break the $(filter-out) function,
-# causing Kbuild to rebuild the vdso-offsets header file every time.
-#
-# Author: Will Deacon <will.deacon@arm.com
-#
-
-LC_ALL=C
-sed -n -e 's/^00*/0/' -e \
-'s/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso64_offset_\2\t0x\1/p'
diff --git a/arch/powerpc/kernel/vdso64/getcpu.S b/arch/powerpc/kernel/vdso64/getcpu.S
deleted file mode 100644
index 12bbf236cdc4..000000000000
--- a/arch/powerpc/kernel/vdso64/getcpu.S
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- *
- * Copyright (C) IBM Corporation, 2012
- *
- * Author: Anton Blanchard <anton@au.ibm.com>
- */
-#include <asm/ppc_asm.h>
-#include <asm/vdso.h>
-
- .text
-/*
- * Exact prototype of getcpu
- *
- * int __kernel_getcpu(unsigned *cpu, unsigned *node);
- *
- */
-V_FUNCTION_BEGIN(__kernel_getcpu)
- .cfi_startproc
- mfspr r5,SPRN_SPRG_VDSO_READ
- cmpdi cr0,r3,0
- cmpdi cr1,r4,0
- clrlwi r6,r5,16
- rlwinm r7,r5,16,31-15,31-0
- beq cr0,1f
- stw r6,0(r3)
-1: beq cr1,2f
- stw r7,0(r4)
-2: crclr cr0*4+so
- li r3,0 /* always success */
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_getcpu)
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
deleted file mode 100644
index d7a7bfb51081..000000000000
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Userland implementation of gettimeofday() for 64 bits processes in a
- * ppc64 kernel for use in the vDSO
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
- * IBM Corp.
- */
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/vdso.h>
-#include <asm/vdso_datapage.h>
-#include <asm/asm-offsets.h>
-#include <asm/unistd.h>
-#include <asm/vdso/gettimeofday.h>
-
- .text
-/*
- * Exact prototype of gettimeofday
- *
- * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
- *
- */
-V_FUNCTION_BEGIN(__kernel_gettimeofday)
- cvdso_call __c_kernel_gettimeofday
-V_FUNCTION_END(__kernel_gettimeofday)
-
-
-/*
- * Exact prototype of clock_gettime()
- *
- * int __kernel_clock_gettime(clockid_t clock_id, struct timespec *tp);
- *
- */
-V_FUNCTION_BEGIN(__kernel_clock_gettime)
- cvdso_call __c_kernel_clock_gettime
-V_FUNCTION_END(__kernel_clock_gettime)
-
-
-/*
- * Exact prototype of clock_getres()
- *
- * int __kernel_clock_getres(clockid_t clock_id, struct timespec *res);
- *
- */
-V_FUNCTION_BEGIN(__kernel_clock_getres)
- cvdso_call __c_kernel_clock_getres
-V_FUNCTION_END(__kernel_clock_getres)
-
-/*
- * Exact prototype of time()
- *
- * time_t time(time *t);
- *
- */
-V_FUNCTION_BEGIN(__kernel_time)
- cvdso_call_time __c_kernel_time
-V_FUNCTION_END(__kernel_time)
diff --git a/arch/powerpc/kernel/vdso64/note.S b/arch/powerpc/kernel/vdso64/note.S
deleted file mode 100644
index dc2a509f7e8a..000000000000
--- a/arch/powerpc/kernel/vdso64/note.S
+++ /dev/null
@@ -1 +0,0 @@
-#include "../vdso32/note.S"
diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S
deleted file mode 100644
index 2d4067561293..000000000000
--- a/arch/powerpc/kernel/vdso64/sigtramp.S
+++ /dev/null
@@ -1,313 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Signal trampoline for 64 bits processes in a ppc64 kernel for
- * use in the vDSO
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
- * Copyright (C) 2004 Alan Modra (amodra@au.ibm.com)), IBM Corp.
- */
-#include <asm/cache.h> /* IFETCH_ALIGN_BYTES */
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/unistd.h>
-#include <asm/vdso.h>
-#include <asm/ptrace.h> /* XXX for __SIGNAL_FRAMESIZE */
-
- .text
-
-/*
- * __kernel_start_sigtramp_rt64 and __kernel_sigtramp_rt64 together
- * are one function split in two parts. The kernel jumps to the former
- * and the signal handler indirectly (by blr) returns to the latter.
- * __kernel_sigtramp_rt64 needs to point to the return address so
- * glibc can correctly identify the trampoline stack frame.
- */
- .balign 8
- .balign IFETCH_ALIGN_BYTES
-V_FUNCTION_BEGIN(__kernel_start_sigtramp_rt64)
-.Lsigrt_start:
- bctrl /* call the handler */
-V_FUNCTION_END(__kernel_start_sigtramp_rt64)
-V_FUNCTION_BEGIN(__kernel_sigtramp_rt64)
- addi r1, r1, __SIGNAL_FRAMESIZE
- li r0,__NR_rt_sigreturn
- sc
-.Lsigrt_end:
-V_FUNCTION_END(__kernel_sigtramp_rt64)
-/* The .balign 8 above and the following zeros mimic the old stack
- trampoline layout. The last magic value is the ucontext pointer,
- chosen in such a way that older libgcc unwind code returns a zero
- for a sigcontext pointer. */
- .long 0,0,0
- .quad 0,-21*8
-
-/* Register r1 can be found at offset 8 of a pt_regs structure.
- A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */
-#define cfa_save \
- .byte 0x0f; /* DW_CFA_def_cfa_expression */ \
- .uleb128 9f - 1f; /* length */ \
-1: \
- .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \
- .byte 0x06; /* DW_OP_deref */ \
- .byte 0x23; .uleb128 RSIZE; /* DW_OP_plus_uconst */ \
- .byte 0x06; /* DW_OP_deref */ \
-9:
-
-/* Register REGNO can be found at offset OFS of a pt_regs structure.
- A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */
-#define rsave(regno, ofs) \
- .byte 0x10; /* DW_CFA_expression */ \
- .uleb128 regno; /* regno */ \
- .uleb128 9f - 1f; /* length */ \
-1: \
- .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \
- .byte 0x06; /* DW_OP_deref */ \
- .ifne ofs; \
- .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \
- .endif; \
-9:
-
-/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16
- of the VMX reg struct. A pointer to the VMX reg struct is at VREGS in
- the pt_regs struct. This macro is for REGNO == 0, and contains
- 'subroutines' that the other macros jump to. */
-#define vsave_msr0(regno) \
- .byte 0x10; /* DW_CFA_expression */ \
- .uleb128 regno + 77; /* regno */ \
- .uleb128 9f - 1f; /* length */ \
-1: \
- .byte 0x30 + regno; /* DW_OP_lit0 */ \
-2: \
- .byte 0x40; /* DW_OP_lit16 */ \
- .byte 0x1e; /* DW_OP_mul */ \
-3: \
- .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \
- .byte 0x06; /* DW_OP_deref */ \
- .byte 0x12; /* DW_OP_dup */ \
- .byte 0x23; /* DW_OP_plus_uconst */ \
- .uleb128 33*RSIZE; /* msr offset */ \
- .byte 0x06; /* DW_OP_deref */ \
- .byte 0x0c; .long 1 << 25; /* DW_OP_const4u */ \
- .byte 0x1a; /* DW_OP_and */ \
- .byte 0x12; /* DW_OP_dup, ret 0 if bra taken */ \
- .byte 0x30; /* DW_OP_lit0 */ \
- .byte 0x29; /* DW_OP_eq */ \
- .byte 0x28; .short 0x7fff; /* DW_OP_bra to end */ \
- .byte 0x13; /* DW_OP_drop, pop the 0 */ \
- .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \
- .byte 0x06; /* DW_OP_deref */ \
- .byte 0x22; /* DW_OP_plus */ \
- .byte 0x2f; .short 0x7fff; /* DW_OP_skip to end */ \
-9:
-
-/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16
- of the VMX reg struct. REGNO is 1 thru 31. */
-#define vsave_msr1(regno) \
- .byte 0x10; /* DW_CFA_expression */ \
- .uleb128 regno + 77; /* regno */ \
- .uleb128 9f - 1f; /* length */ \
-1: \
- .byte 0x30 + regno; /* DW_OP_lit n */ \
- .byte 0x2f; .short 2b - 9f; /* DW_OP_skip */ \
-9:
-
-/* If msr bit 1<<25 is set, then VMX register REGNO is at offset OFS of
- the VMX save block. */
-#define vsave_msr2(regno, ofs) \
- .byte 0x10; /* DW_CFA_expression */ \
- .uleb128 regno + 77; /* regno */ \
- .uleb128 9f - 1f; /* length */ \
-1: \
- .byte 0x0a; .short ofs; /* DW_OP_const2u */ \
- .byte 0x2f; .short 3b - 9f; /* DW_OP_skip */ \
-9:
-
-/* VMX register REGNO is at offset OFS of the VMX save area. */
-#define vsave(regno, ofs) \
- .byte 0x10; /* DW_CFA_expression */ \
- .uleb128 regno + 77; /* regno */ \
- .uleb128 9f - 1f; /* length */ \
-1: \
- .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \
- .byte 0x06; /* DW_OP_deref */ \
- .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \
- .byte 0x06; /* DW_OP_deref */ \
- .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \
-9:
-
-/* This is where the pt_regs pointer can be found on the stack. */
-#define PTREGS 128+168+56
-
-/* Size of regs. */
-#define RSIZE 8
-
-/* Size of CR reg in DWARF unwind info. */
-#define CRSIZE 4
-
-/* Offset of CR reg within a full word. */
-#ifdef __LITTLE_ENDIAN__
-#define CROFF 0
-#else
-#define CROFF (RSIZE - CRSIZE)
-#endif
-
-/* This is the offset of the VMX reg pointer. */
-#define VREGS 48*RSIZE+33*8
-
-/* Describe where general purpose regs are saved. */
-#define EH_FRAME_GEN \
- cfa_save; \
- rsave ( 0, 0*RSIZE); \
- rsave ( 2, 2*RSIZE); \
- rsave ( 3, 3*RSIZE); \
- rsave ( 4, 4*RSIZE); \
- rsave ( 5, 5*RSIZE); \
- rsave ( 6, 6*RSIZE); \
- rsave ( 7, 7*RSIZE); \
- rsave ( 8, 8*RSIZE); \
- rsave ( 9, 9*RSIZE); \
- rsave (10, 10*RSIZE); \
- rsave (11, 11*RSIZE); \
- rsave (12, 12*RSIZE); \
- rsave (13, 13*RSIZE); \
- rsave (14, 14*RSIZE); \
- rsave (15, 15*RSIZE); \
- rsave (16, 16*RSIZE); \
- rsave (17, 17*RSIZE); \
- rsave (18, 18*RSIZE); \
- rsave (19, 19*RSIZE); \
- rsave (20, 20*RSIZE); \
- rsave (21, 21*RSIZE); \
- rsave (22, 22*RSIZE); \
- rsave (23, 23*RSIZE); \
- rsave (24, 24*RSIZE); \
- rsave (25, 25*RSIZE); \
- rsave (26, 26*RSIZE); \
- rsave (27, 27*RSIZE); \
- rsave (28, 28*RSIZE); \
- rsave (29, 29*RSIZE); \
- rsave (30, 30*RSIZE); \
- rsave (31, 31*RSIZE); \
- rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \
- rsave (65, 36*RSIZE); /* lr */ \
- rsave (68, 38*RSIZE + CROFF); /* cr fields */ \
- rsave (69, 38*RSIZE + CROFF); \
- rsave (70, 38*RSIZE + CROFF); \
- rsave (71, 38*RSIZE + CROFF); \
- rsave (72, 38*RSIZE + CROFF); \
- rsave (73, 38*RSIZE + CROFF); \
- rsave (74, 38*RSIZE + CROFF); \
- rsave (75, 38*RSIZE + CROFF)
-
-/* Describe where the FP regs are saved. */
-#define EH_FRAME_FP \
- rsave (32, 48*RSIZE + 0*8); \
- rsave (33, 48*RSIZE + 1*8); \
- rsave (34, 48*RSIZE + 2*8); \
- rsave (35, 48*RSIZE + 3*8); \
- rsave (36, 48*RSIZE + 4*8); \
- rsave (37, 48*RSIZE + 5*8); \
- rsave (38, 48*RSIZE + 6*8); \
- rsave (39, 48*RSIZE + 7*8); \
- rsave (40, 48*RSIZE + 8*8); \
- rsave (41, 48*RSIZE + 9*8); \
- rsave (42, 48*RSIZE + 10*8); \
- rsave (43, 48*RSIZE + 11*8); \
- rsave (44, 48*RSIZE + 12*8); \
- rsave (45, 48*RSIZE + 13*8); \
- rsave (46, 48*RSIZE + 14*8); \
- rsave (47, 48*RSIZE + 15*8); \
- rsave (48, 48*RSIZE + 16*8); \
- rsave (49, 48*RSIZE + 17*8); \
- rsave (50, 48*RSIZE + 18*8); \
- rsave (51, 48*RSIZE + 19*8); \
- rsave (52, 48*RSIZE + 20*8); \
- rsave (53, 48*RSIZE + 21*8); \
- rsave (54, 48*RSIZE + 22*8); \
- rsave (55, 48*RSIZE + 23*8); \
- rsave (56, 48*RSIZE + 24*8); \
- rsave (57, 48*RSIZE + 25*8); \
- rsave (58, 48*RSIZE + 26*8); \
- rsave (59, 48*RSIZE + 27*8); \
- rsave (60, 48*RSIZE + 28*8); \
- rsave (61, 48*RSIZE + 29*8); \
- rsave (62, 48*RSIZE + 30*8); \
- rsave (63, 48*RSIZE + 31*8)
-
-/* Describe where the VMX regs are saved. */
-#ifdef CONFIG_ALTIVEC
-#define EH_FRAME_VMX \
- vsave_msr0 ( 0); \
- vsave_msr1 ( 1); \
- vsave_msr1 ( 2); \
- vsave_msr1 ( 3); \
- vsave_msr1 ( 4); \
- vsave_msr1 ( 5); \
- vsave_msr1 ( 6); \
- vsave_msr1 ( 7); \
- vsave_msr1 ( 8); \
- vsave_msr1 ( 9); \
- vsave_msr1 (10); \
- vsave_msr1 (11); \
- vsave_msr1 (12); \
- vsave_msr1 (13); \
- vsave_msr1 (14); \
- vsave_msr1 (15); \
- vsave_msr1 (16); \
- vsave_msr1 (17); \
- vsave_msr1 (18); \
- vsave_msr1 (19); \
- vsave_msr1 (20); \
- vsave_msr1 (21); \
- vsave_msr1 (22); \
- vsave_msr1 (23); \
- vsave_msr1 (24); \
- vsave_msr1 (25); \
- vsave_msr1 (26); \
- vsave_msr1 (27); \
- vsave_msr1 (28); \
- vsave_msr1 (29); \
- vsave_msr1 (30); \
- vsave_msr1 (31); \
- vsave_msr2 (33, 32*16+12); \
- vsave (32, 33*16)
-#else
-#define EH_FRAME_VMX
-#endif
-
- .section .eh_frame,"a",@progbits
-.Lcie:
- .long .Lcie_end - .Lcie_start
-.Lcie_start:
- .long 0 /* CIE ID */
- .byte 1 /* Version number */
- .string "zRS" /* NUL-terminated augmentation string */
- .uleb128 4 /* Code alignment factor */
- .sleb128 -8 /* Data alignment factor */
- .byte 67 /* Return address register column, ap */
- .uleb128 1 /* Augmentation value length */
- .byte 0x14 /* DW_EH_PE_pcrel | DW_EH_PE_udata8. */
- .byte 0x0c,1,0 /* DW_CFA_def_cfa: r1 ofs 0 */
- .balign 8
-.Lcie_end:
-
- .long .Lfde0_end - .Lfde0_start
-.Lfde0_start:
- .long .Lfde0_start - .Lcie /* CIE pointer. */
- .quad .Lsigrt_start - . /* PC start, length */
- .quad .Lsigrt_end - .Lsigrt_start
- .uleb128 0 /* Augmentation */
- EH_FRAME_GEN
- EH_FRAME_FP
- EH_FRAME_VMX
-# Do we really need to describe the frame at this point? ie. will
-# we ever have some call chain that returns somewhere past the addi?
-# I don't think so, since gcc doesn't support async signals.
-# .byte 0x41 /* DW_CFA_advance_loc 1*4 */
-#undef PTREGS
-#define PTREGS 168+56
-# EH_FRAME_GEN
-# EH_FRAME_FP
-# EH_FRAME_VMX
- .balign 8
-.Lfde0_end:
diff --git a/arch/powerpc/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S
deleted file mode 100644
index 0288cad428b0..000000000000
--- a/arch/powerpc/kernel/vdso64/vdso64.lds.S
+++ /dev/null
@@ -1,134 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * This is the infamous ld script for the 64 bits vdso
- * library
- */
-#include <asm/vdso.h>
-#include <asm/page.h>
-#include <asm-generic/vmlinux.lds.h>
-
-#ifdef __LITTLE_ENDIAN__
-OUTPUT_FORMAT("elf64-powerpcle", "elf64-powerpcle", "elf64-powerpcle")
-#else
-OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc")
-#endif
-OUTPUT_ARCH(powerpc:common64)
-ENTRY(_start)
-
-SECTIONS
-{
- PROVIDE(_vdso_datapage = . - 2 * PAGE_SIZE);
- . = SIZEOF_HEADERS;
-
- .hash : { *(.hash) } :text
- .gnu.hash : { *(.gnu.hash) }
- .dynsym : { *(.dynsym) }
- .dynstr : { *(.dynstr) }
- .gnu.version : { *(.gnu.version) }
- .gnu.version_d : { *(.gnu.version_d) }
- .gnu.version_r : { *(.gnu.version_r) }
-
- .note : { *(.note.*) } :text :note
-
- . = ALIGN(16);
- .text : {
- *(.text .stub .text.* .gnu.linkonce.t.* __ftr_alt_*)
- *(.sfpr .glink)
- } :text
- PROVIDE(__etext = .);
- PROVIDE(_etext = .);
- PROVIDE(etext = .);
-
- . = ALIGN(8);
- VDSO_ftr_fixup_start = .;
- __ftr_fixup : { *(__ftr_fixup) }
- VDSO_ftr_fixup_end = .;
-
- . = ALIGN(8);
- VDSO_mmu_ftr_fixup_start = .;
- __mmu_ftr_fixup : { *(__mmu_ftr_fixup) }
- VDSO_mmu_ftr_fixup_end = .;
-
- . = ALIGN(8);
- VDSO_lwsync_fixup_start = .;
- __lwsync_fixup : { *(__lwsync_fixup) }
- VDSO_lwsync_fixup_end = .;
-
- . = ALIGN(8);
- VDSO_fw_ftr_fixup_start = .;
- __fw_ftr_fixup : { *(__fw_ftr_fixup) }
- VDSO_fw_ftr_fixup_end = .;
-
- /*
- * Other stuff is appended to the text segment:
- */
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
- .rodata1 : { *(.rodata1) }
-
- .dynamic : { *(.dynamic) } :text :dynamic
-
- .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
- .eh_frame : { KEEP (*(.eh_frame)) } :text
- .gcc_except_table : { *(.gcc_except_table) }
- .rela.dyn ALIGN(8) : { *(.rela.dyn) }
-
- .got ALIGN(8) : { *(.got .toc) }
-
- _end = .;
- PROVIDE(end = .);
-
- STABS_DEBUG
- DWARF_DEBUG
- ELF_DETAILS
-
- /DISCARD/ : {
- *(.note.GNU-stack)
- *(.branch_lt)
- *(.data .data.* .gnu.linkonce.d.* .sdata*)
- *(.bss .sbss .dynbss .dynsbss)
- *(.opd)
- }
-}
-
-/*
- * Very old versions of ld do not recognize this name token; use the constant.
- */
-#define PT_GNU_EH_FRAME 0x6474e550
-
-/*
- * We must supply the ELF program headers explicitly to get just one
- * PT_LOAD segment, and set the flags explicitly to make segments read-only.
- */
-PHDRS
-{
- text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
- dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
- note PT_NOTE FLAGS(4); /* PF_R */
- eh_frame_hdr PT_GNU_EH_FRAME;
-}
-
-/*
- * This controls what symbols we export from the DSO.
- */
-VERSION
-{
- VDSO_VERSION_STRING {
- global:
- __kernel_get_syscall_map;
- __kernel_gettimeofday;
- __kernel_clock_gettime;
- __kernel_clock_getres;
- __kernel_get_tbfreq;
- __kernel_sync_dicache;
- __kernel_sigtramp_rt64;
- __kernel_getcpu;
- __kernel_time;
-
- local: *;
- };
-}
-
-/*
- * Make the sigreturn code visible to the kernel.
- */
-VDSO_sigtramp_rt64 = __kernel_start_sigtramp_rt64;
diff --git a/arch/powerpc/kernel/vdso64/vgettimeofday.c b/arch/powerpc/kernel/vdso64/vgettimeofday.c
deleted file mode 100644
index 5b5500058344..000000000000
--- a/arch/powerpc/kernel/vdso64/vgettimeofday.c
+++ /dev/null
@@ -1,29 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Powerpc userspace implementations of gettimeofday() and similar.
- */
-#include <linux/time.h>
-#include <linux/types.h>
-
-int __c_kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts,
- const struct vdso_data *vd)
-{
- return __cvdso_clock_gettime_data(vd, clock, ts);
-}
-
-int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,
- const struct vdso_data *vd)
-{
- return __cvdso_gettimeofday_data(vd, tv, tz);
-}
-
-int __c_kernel_clock_getres(clockid_t clock_id, struct __kernel_timespec *res,
- const struct vdso_data *vd)
-{
- return __cvdso_clock_getres_data(vd, clock_id, res);
-}
-
-__kernel_old_time_t __c_kernel_time(__kernel_old_time_t *time, const struct vdso_data *vd)
-{
- return __cvdso_time_data(vd, time);
-}