summaryrefslogtreecommitdiff
path: root/arch/ppc64
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-11-11 10:15:21 (GMT)
committerPaul Mackerras <paulus@samba.org>2005-11-11 11:25:39 (GMT)
commita7f290dad32ee34d931561b7943c858fe2aae503 (patch)
tree850f04ed9ffba8aef6e151fa9c9e8a0c667bb795 /arch/ppc64
parent6761c4a07378e19e3710bb69cea65795774529b1 (diff)
downloadlinux-fsl-qoriq-a7f290dad32ee34d931561b7943c858fe2aae503.tar.xz
[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel
This patch moves the vdso's to arch/powerpc, adds support for the 32 bits vdso to the 32 bits kernel, rename systemcfg (finally !), and adds some new (still untested) routines to both vdso's: clock_gettime() with support for CLOCK_REALTIME and CLOCK_MONOTONIC, clock_getres() (same clocks) and get_tbfreq() for glibc to retreive the timebase frequency. Tom,Steve: The implementation of get_tbfreq() I've done for 32 bits returns a long long (r3, r4) not a long. This is such that if we ever add support for >4Ghz timebases on ppc32, the userland interface won't have to change. I have tested gettimeofday() using some glibc patches in both ppc32 and ppc64 kernels using 32 bits userland (I haven't had a chance to test a 64 bits userland yet, but the implementation didn't change and was tested earlier). I haven't tested yet the new functions. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/Makefile3
-rw-r--r--arch/ppc64/kernel/vdso32/Makefile36
-rw-r--r--arch/ppc64/kernel/vdso32/cacheflush.S67
-rw-r--r--arch/ppc64/kernel/vdso32/datapage.S68
-rw-r--r--arch/ppc64/kernel/vdso32/gettimeofday.S140
-rw-r--r--arch/ppc64/kernel/vdso32/note.S25
-rw-r--r--arch/ppc64/kernel/vdso32/sigtramp.S300
-rw-r--r--arch/ppc64/kernel/vdso32/vdso32.lds.S114
-rw-r--r--arch/ppc64/kernel/vdso32/vdso32_wrapper.S13
-rw-r--r--arch/ppc64/kernel/vdso64/Makefile35
-rw-r--r--arch/ppc64/kernel/vdso64/cacheflush.S66
-rw-r--r--arch/ppc64/kernel/vdso64/datapage.S68
-rw-r--r--arch/ppc64/kernel/vdso64/gettimeofday.S91
-rw-r--r--arch/ppc64/kernel/vdso64/note.S1
-rw-r--r--arch/ppc64/kernel/vdso64/sigtramp.S295
-rw-r--r--arch/ppc64/kernel/vdso64/vdso64.lds.S113
-rw-r--r--arch/ppc64/kernel/vdso64/vdso64_wrapper.S13
17 files changed, 1 insertions, 1447 deletions
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
index 7bf1a6f..dac4cc2 100644
--- a/arch/ppc64/kernel/Makefile
+++ b/arch/ppc64/kernel/Makefile
@@ -14,8 +14,7 @@ endif
obj-y += idle.o dma.o \
align.o \
rtc.o \
- iommu.o vdso.o
-obj-y += vdso32/ vdso64/
+ iommu.o
pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
diff --git a/arch/ppc64/kernel/vdso32/Makefile b/arch/ppc64/kernel/vdso32/Makefile
deleted file mode 100644
index 0b1b0df..0000000
--- a/arch/ppc64/kernel/vdso32/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-
-# List of files in the vdso, has to be asm only for now
-
-obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o
-
-# Build rules
-
-targets := $(obj-vdso32) vdso32.so
-obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
-
-
-EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin
-EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1
-EXTRA_AFLAGS := -D__VDSO32__ -s
-
-obj-y += vdso32_wrapper.o
-extra-y += vdso32.lds
-CPPFLAGS_vdso32.lds += -P -C -U$(ARCH)
-
-# Force dependency (incbin is bad)
-$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
-
-# link rule for the .so file, .lds has to be first
-$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32)
- $(call if_changed,vdso32ld)
-
-# assembly rules for the .S files
-$(obj-vdso32): %.o: %.S
- $(call if_changed_dep,vdso32as)
-
-# actual build commands
-quiet_cmd_vdso32ld = VDSO32L $@
- cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@
-quiet_cmd_vdso32as = VDSO32A $@
- cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
-
diff --git a/arch/ppc64/kernel/vdso32/cacheflush.S b/arch/ppc64/kernel/vdso32/cacheflush.S
deleted file mode 100644
index c8db993..0000000
--- a/arch/ppc64/kernel/vdso32/cacheflush.S
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * vDSO provided cache flush routines
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
- * IBM Corp.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/vdso.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[
- *
- * Note: all CPUs supported by this kernel have a 128 bytes cache
- * line size so we don't have to peek that info from the datapage
- */
-V_FUNCTION_BEGIN(__kernel_sync_dicache)
- .cfi_startproc
- li r5,127
- andc r6,r3,r5 /* round low to line bdy */
- subf r8,r6,r4 /* compute length */
- add r8,r8,r5 /* ensure we get enough */
- srwi. r8,r8,7 /* compute line count */
- beqlr /* nothing to do? */
- mtctr r8
- mr r3,r6
-1: dcbst 0,r3
- addi r3,r3,128
- bdnz 1b
- sync
- mtctr r8
-1: icbi 0,r6
- addi r6,r6,128
- bdnz 1b
- isync
- li r3,0
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_sync_dicache)
-
-
-/*
- * POWER5 version of __kernel_sync_dicache
- */
-V_FUNCTION_BEGIN(__kernel_sync_dicache_p5)
- .cfi_startproc
- sync
- isync
- li r3,0
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_sync_dicache_p5)
-
diff --git a/arch/ppc64/kernel/vdso32/datapage.S b/arch/ppc64/kernel/vdso32/datapage.S
deleted file mode 100644
index 4f4eb0b..0000000
--- a/arch/ppc64/kernel/vdso32/datapage.S
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Access to the shared data page by the vDSO & syscall map
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/asm-offsets.h>
-#include <asm/unistd.h>
-#include <asm/vdso.h>
-
- .text
-V_FUNCTION_BEGIN(__get_datapage)
- .cfi_startproc
- /* We don't want that exposed or overridable as we want other objects
- * to be able to bl directly to here
- */
- .protected __get_datapage
- .hidden __get_datapage
-
- mflr r0
- .cfi_register lr,r0
-
- bcl 20,31,1f
- .global __kernel_datapage_offset;
-__kernel_datapage_offset:
- .long 0
-1:
- mflr r3
- mtlr r0
- lwz r0,0(r3)
- add r3,r0,r3
- blr
- .cfi_endproc
-V_FUNCTION_END(__get_datapage)
-
-/*
- * 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
- bl __get_datapage@local
- mtlr r12
- addi r3,r3,CFG_SYSCALL_MAP32
- cmpli cr0,r4,0
- beqlr
- li r0,__NR_syscalls
- stw r0,0(r4)
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_get_syscall_map)
diff --git a/arch/ppc64/kernel/vdso32/gettimeofday.S b/arch/ppc64/kernel/vdso32/gettimeofday.S
deleted file mode 100644
index e243c1d..0000000
--- a/arch/ppc64/kernel/vdso32/gettimeofday.S
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Userland implementation of gettimeofday() for 32 bits processes in a
- * ppc64 kernel for use in the vDSO
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/vdso.h>
-#include <asm/asm-offsets.h>
-#include <asm/unistd.h>
-
- .text
-/*
- * Exact prototype of gettimeofday
- *
- * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
- *
- */
-V_FUNCTION_BEGIN(__kernel_gettimeofday)
- .cfi_startproc
- mflr r12
- .cfi_register lr,r12
-
- mr r10,r3 /* r10 saves tv */
- mr r11,r4 /* r11 saves tz */
- bl __get_datapage@local /* get data page */
- mr r9, r3 /* datapage ptr in r9 */
- bl __do_get_xsec@local /* get xsec from tb & kernel */
- bne- 2f /* out of line -> do syscall */
-
- /* seconds are xsec >> 20 */
- rlwinm r5,r4,12,20,31
- rlwimi r5,r3,12,0,19
- stw r5,TVAL32_TV_SEC(r10)
-
- /* get remaining xsec and convert to usec. we scale
- * up remaining xsec by 12 bits and get the top 32 bits
- * of the multiplication
- */
- rlwinm r5,r4,12,0,19
- lis r6,1000000@h
- ori r6,r6,1000000@l
- mulhwu r5,r5,r6
- stw r5,TVAL32_TV_USEC(r10)
-
- cmpli cr0,r11,0 /* check if tz is NULL */
- beq 1f
- lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */
- lwz r5,CFG_TZ_DSTTIME(r9)
- stw r4,TZONE_TZ_MINWEST(r11)
- stw r5,TZONE_TZ_DSTTIME(r11)
-
-1: mtlr r12
- li r3,0
- blr
-
-2: mr r3,r10
- mr r4,r11
- li r0,__NR_gettimeofday
- sc
- b 1b
- .cfi_endproc
-V_FUNCTION_END(__kernel_gettimeofday)
-
-/*
- * This is the core of gettimeofday(), it returns the xsec
- * value in r3 & r4 and expects the datapage ptr (non clobbered)
- * in r9. clobbers r0,r4,r5,r6,r7,r8
-*/
-__do_get_xsec:
- .cfi_startproc
- /* Check for update count & load values. We use the low
- * order 32 bits of the update count
- */
-1: lwz r8,(CFG_TB_UPDATE_COUNT+4)(r9)
- andi. r0,r8,1 /* pending update ? loop */
- bne- 1b
- xor r0,r8,r8 /* create dependency */
- add r9,r9,r0
-
- /* Load orig stamp (offset to TB) */
- lwz r5,CFG_TB_ORIG_STAMP(r9)
- lwz r6,(CFG_TB_ORIG_STAMP+4)(r9)
-
- /* Get a stable TB value */
-2: mftbu r3
- mftbl r4
- mftbu r0
- cmpl cr0,r3,r0
- bne- 2b
-
- /* Substract tb orig stamp. If the high part is non-zero, we jump to the
- * slow path which call the syscall. If it's ok, then we have our 32 bits
- * tb_ticks value in r7
- */
- subfc r7,r6,r4
- subfe. r0,r5,r3
- bne- 3f
-
- /* Load scale factor & do multiplication */
- lwz r5,CFG_TB_TO_XS(r9) /* load values */
- lwz r6,(CFG_TB_TO_XS+4)(r9)
- mulhwu r4,r7,r5
- mulhwu r6,r7,r6
- mullw r0,r7,r5
- addc r6,r6,r0
-
- /* At this point, we have the scaled xsec value in r4 + XER:CA
- * we load & add the stamp since epoch
- */
- lwz r5,CFG_STAMP_XSEC(r9)
- lwz r6,(CFG_STAMP_XSEC+4)(r9)
- adde r4,r4,r6
- addze r3,r5
-
- /* We now have our result in r3,r4. We create a fake dependency
- * on that result and re-check the counter
- */
- xor r0,r4,r4
- add r9,r9,r0
- lwz r0,(CFG_TB_UPDATE_COUNT+4)(r9)
- cmpl cr0,r8,r0 /* check if updated */
- bne- 1b
-
- /* Warning ! The caller expects CR:EQ to be set to indicate a
- * successful calculation (so it won't fallback to the syscall
- * method). We have overriden that CR bit in the counter check,
- * but fortunately, the loop exit condition _is_ CR:EQ set, so
- * we can exit safely here. If you change this code, be careful
- * of that side effect.
- */
-3: blr
- .cfi_endproc
diff --git a/arch/ppc64/kernel/vdso32/note.S b/arch/ppc64/kernel/vdso32/note.S
deleted file mode 100644
index d4b5be4..0000000
--- a/arch/ppc64/kernel/vdso32/note.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
- * Here we can supply some information useful to userland.
- */
-
-#include <linux/uts.h>
-#include <linux/version.h>
-
-#define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type) \
- .section name, flags; \
- .balign 4; \
- .long 1f - 0f; /* name length */ \
- .long 3f - 2f; /* data length */ \
- .long type; /* note type */ \
-0: .asciz vendor; /* vendor name */ \
-1: .balign 4; \
-2:
-
-#define ASM_ELF_NOTE_END \
-3: .balign 4; /* pad out section */ \
- .previous
-
- ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0)
- .long LINUX_VERSION_CODE
- ASM_ELF_NOTE_END
diff --git a/arch/ppc64/kernel/vdso32/sigtramp.S b/arch/ppc64/kernel/vdso32/sigtramp.S
deleted file mode 100644
index e046427..0000000
--- a/arch/ppc64/kernel/vdso32/sigtramp.S
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Signal trampolines for 32 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.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/unistd.h>
-#include <asm/vdso.h>
-
- .text
-
-/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from
- the return address to get an address in the middle of the presumed
- call instruction. Since we don't have a call here, we artifically
- extend the range covered by the unwind info by adding a nop before
- the real start. */
- nop
-V_FUNCTION_BEGIN(__kernel_sigtramp32)
-.Lsig_start = . - 4
- li r0,__NR_sigreturn
- sc
-.Lsig_end:
-V_FUNCTION_END(__kernel_sigtramp32)
-
-.Lsigrt_start:
- nop
-V_FUNCTION_BEGIN(__kernel_sigtramp_rt32)
- li r0,__NR_rt_sigreturn
- sc
-.Lsigrt_end:
-V_FUNCTION_END(__kernel_sigtramp_rt32)
-
- .section .eh_frame,"a",@progbits
-
-/* Register r1 can be found at offset 4 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. The VMX reg struct is at offset VREGS of
- 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 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 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \
-9:
-
-/* This is where the pt_regs pointer can be found on the stack. */
-#define PTREGS 64+28
-
-/* Size of regs. */
-#define RSIZE 4
-
-/* This is the offset of the VMX regs. */
-#define VREGS 48*RSIZE+34*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 (70, 38*RSIZE) /* cr */
-
-/* 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, 32*16)
-#else
-#define EH_FRAME_VMX
-#endif
-
-.Lcie:
- .long .Lcie_end - .Lcie_start
-.Lcie_start:
- .long 0 /* CIE ID */
- .byte 1 /* Version number */
- .string "zR" /* NUL-terminated augmentation string */
- .uleb128 4 /* Code alignment factor */
- .sleb128 -4 /* Data alignment factor */
- .byte 67 /* Return address register column, ap */
- .uleb128 1 /* Augmentation value length */
- .byte 0x1b /* DW_EH_PE_pcrel | DW_EH_PE_sdata4. */
- .byte 0x0c,1,0 /* DW_CFA_def_cfa: r1 ofs 0 */
- .balign 4
-.Lcie_end:
-
- .long .Lfde0_end - .Lfde0_start
-.Lfde0_start:
- .long .Lfde0_start - .Lcie /* CIE pointer. */
- .long .Lsig_start - . /* PC start, length */
- .long .Lsig_end - .Lsig_start
- .uleb128 0 /* Augmentation */
- EH_FRAME_GEN
- EH_FRAME_FP
- EH_FRAME_VMX
- .balign 4
-.Lfde0_end:
-
-/* We have a different stack layout for rt_sigreturn. */
-#undef PTREGS
-#define PTREGS 64+16+128+20+28
-
- .long .Lfde1_end - .Lfde1_start
-.Lfde1_start:
- .long .Lfde1_start - .Lcie /* CIE pointer. */
- .long .Lsigrt_start - . /* PC start, length */
- .long .Lsigrt_end - .Lsigrt_start
- .uleb128 0 /* Augmentation */
- EH_FRAME_GEN
- EH_FRAME_FP
- EH_FRAME_VMX
- .balign 4
-.Lfde1_end:
diff --git a/arch/ppc64/kernel/vdso32/vdso32.lds.S b/arch/ppc64/kernel/vdso32/vdso32.lds.S
deleted file mode 100644
index 6f87a91..0000000
--- a/arch/ppc64/kernel/vdso32/vdso32.lds.S
+++ /dev/null
@@ -1,114 +0,0 @@
-
-/*
- * This is the infamous ld script for the 32 bits vdso
- * library
- */
-#include <asm/vdso.h>
-
-/* Default link addresses for the vDSOs */
-OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
-OUTPUT_ARCH(powerpc:common)
-ENTRY(_start)
-
-SECTIONS
-{
- . = VDSO32_LBASE + SIZEOF_HEADERS;
- .hash : { *(.hash) } :text
- .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.*)
- }
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
-
- /* Other stuff is appended to the text segment: */
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
- .rodata1 : { *(.rodata1) }
-
- .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
- .eh_frame : { KEEP (*(.eh_frame)) } :text
- .gcc_except_table : { *(.gcc_except_table) }
- .fixup : { *(.fixup) }
-
- .dynamic : { *(.dynamic) } :text :dynamic
- .got : { *(.got) }
- .plt : { *(.plt) }
-
- _end = .;
- __end = .;
- PROVIDE (end = .);
-
-
- /* Stabs debugging sections are here too
- */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
-
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
-
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
-
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
-
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-
- /DISCARD/ : { *(.note.GNU-stack) }
- /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) }
- /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
-}
-
-
-PHDRS
-{
- text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
- note PT_NOTE FLAGS(4); /* PF_R */
- dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
- eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
-}
-
-
-/*
- * This controls what symbols we export from the DSO.
- */
-VERSION
-{
- VDSO_VERSION_STRING {
- global:
- __kernel_datapage_offset; /* Has to be there for the kernel to find it */
- __kernel_get_syscall_map;
- __kernel_gettimeofday;
- __kernel_sync_dicache;
- __kernel_sync_dicache_p5;
- __kernel_sigtramp32;
- __kernel_sigtramp_rt32;
- local: *;
- };
-}
diff --git a/arch/ppc64/kernel/vdso32/vdso32_wrapper.S b/arch/ppc64/kernel/vdso32/vdso32_wrapper.S
deleted file mode 100644
index 76ca28e..0000000
--- a/arch/ppc64/kernel/vdso32/vdso32_wrapper.S
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <linux/init.h>
-#include <asm/page.h>
-
- .section ".data.page_aligned"
-
- .globl vdso32_start, vdso32_end
- .balign PAGE_SIZE
-vdso32_start:
- .incbin "arch/ppc64/kernel/vdso32/vdso32.so"
- .balign PAGE_SIZE
-vdso32_end:
-
- .previous
diff --git a/arch/ppc64/kernel/vdso64/Makefile b/arch/ppc64/kernel/vdso64/Makefile
deleted file mode 100644
index ab39988..0000000
--- a/arch/ppc64/kernel/vdso64/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# List of files in the vdso, has to be asm only for now
-
-obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o
-
-# Build rules
-
-targets := $(obj-vdso64) vdso64.so
-obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
-
-EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin
-EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1
-EXTRA_AFLAGS := -D__VDSO64__ -s
-
-obj-y += vdso64_wrapper.o
-extra-y += vdso64.lds
-CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
-
-# Force dependency (incbin is bad)
-$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
-
-# link rule for the .so file, .lds has to be first
-$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64)
- $(call if_changed,vdso64ld)
-
-# assembly rules for the .S files
-$(obj-vdso64): %.o: %.S
- $(call if_changed_dep,vdso64as)
-
-# actual build commands
-quiet_cmd_vdso64ld = VDSO64L $@
- cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
-quiet_cmd_vdso64as = VDSO64A $@
- cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
-
-
diff --git a/arch/ppc64/kernel/vdso64/cacheflush.S b/arch/ppc64/kernel/vdso64/cacheflush.S
deleted file mode 100644
index d4a0ad2..0000000
--- a/arch/ppc64/kernel/vdso64/cacheflush.S
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * vDSO provided cache flush routines
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
- * IBM Corp.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/vdso.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[
- *
- * Note: all CPUs supported by this kernel have a 128 bytes cache
- * line size so we don't have to peek that info from the datapage
- */
-V_FUNCTION_BEGIN(__kernel_sync_dicache)
- .cfi_startproc
- li r5,127
- andc r6,r3,r5 /* round low to line bdy */
- subf r8,r6,r4 /* compute length */
- add r8,r8,r5 /* ensure we get enough */
- srwi. r8,r8,7 /* compute line count */
- beqlr /* nothing to do? */
- mtctr r8
- mr r3,r6
-1: dcbst 0,r3
- addi r3,r3,128
- bdnz 1b
- sync
- mtctr r8
-1: icbi 0,r6
- addi r6,r6,128
- bdnz 1b
- isync
- li r3,0
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_sync_dicache)
-
-
-/*
- * POWER5 version of __kernel_sync_dicache
- */
-V_FUNCTION_BEGIN(__kernel_sync_dicache_p5)
- .cfi_startproc
- sync
- isync
- li r3,0
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_sync_dicache_p5)
diff --git a/arch/ppc64/kernel/vdso64/datapage.S b/arch/ppc64/kernel/vdso64/datapage.S
deleted file mode 100644
index ed6e599..0000000
--- a/arch/ppc64/kernel/vdso64/datapage.S
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Access to the shared data page by the vDSO & syscall map
- *
- * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/asm-offsets.h>
-#include <asm/unistd.h>
-#include <asm/vdso.h>
-
- .text
-V_FUNCTION_BEGIN(__get_datapage)
- .cfi_startproc
- /* We don't want that exposed or overridable as we want other objects
- * to be able to bl directly to here
- */
- .protected __get_datapage
- .hidden __get_datapage
-
- mflr r0
- .cfi_register lr,r0
-
- bcl 20,31,1f
- .global __kernel_datapage_offset;
-__kernel_datapage_offset:
- .long 0
-1:
- mflr r3
- mtlr r0
- lwz r0,0(r3)
- add r3,r0,r3
- blr
- .cfi_endproc
-V_FUNCTION_END(__get_datapage)
-
-/*
- * 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
- bl V_LOCAL_FUNC(__get_datapage)
- mtlr r12
- addi r3,r3,CFG_SYSCALL_MAP64
- cmpli cr0,r4,0
- beqlr
- li r0,__NR_syscalls
- stw r0,0(r4)
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_get_syscall_map)
diff --git a/arch/ppc64/kernel/vdso64/gettimeofday.S b/arch/ppc64/kernel/vdso64/gettimeofday.S
deleted file mode 100644
index f6df802..0000000
--- a/arch/ppc64/kernel/vdso64/gettimeofday.S
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ppc_asm.h>
-#include <asm/vdso.h>
-#include <asm/asm-offsets.h>
-
- .text
-/*
- * Exact prototype of gettimeofday
- *
- * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
- *
- */
-V_FUNCTION_BEGIN(__kernel_gettimeofday)
- .cfi_startproc
- mflr r12
- .cfi_register lr,r12
-
- mr r11,r3 /* r11 holds tv */
- mr r10,r4 /* r10 holds tz */
- bl V_LOCAL_FUNC(__get_datapage) /* get data page */
- bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
- lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */
- ori r7,r7,16960
- rldicl r5,r4,44,20 /* r5 = sec = xsec / XSEC_PER_SEC */
- rldicr r6,r5,20,43 /* r6 = sec * XSEC_PER_SEC */
- std r5,TVAL64_TV_SEC(r11) /* store sec in tv */
- subf r0,r6,r4 /* r0 = xsec = (xsec - r6) */
- mulld r0,r0,r7 /* usec = (xsec * USEC_PER_SEC) / XSEC_PER_SEC */
- rldicl r0,r0,44,20
- cmpldi cr0,r10,0 /* check if tz is NULL */
- std r0,TVAL64_TV_USEC(r11) /* store usec in tv */
- beq 1f
- lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */
- lwz r5,CFG_TZ_DSTTIME(r3)
- stw r4,TZONE_TZ_MINWEST(r10)
- stw r5,TZONE_TZ_DSTTIME(r10)
-1: mtlr r12
- li r3,0 /* always success */
- blr
- .cfi_endproc
-V_FUNCTION_END(__kernel_gettimeofday)
-
-
-/*
- * This is the core of gettimeofday(), it returns the xsec
- * value in r4 and expects the datapage ptr (non clobbered)
- * in r3. clobbers r0,r4,r5,r6,r7,r8
-*/
-V_FUNCTION_BEGIN(__do_get_xsec)
- .cfi_startproc
- /* check for update count & load values */
-1: ld r7,CFG_TB_UPDATE_COUNT(r3)
- andi. r0,r4,1 /* pending update ? loop */
- bne- 1b
- xor r0,r4,r4 /* create dependency */
- add r3,r3,r0
-
- /* Get TB & offset it */
- mftb r8
- ld r9,CFG_TB_ORIG_STAMP(r3)
- subf r8,r9,r8
-
- /* Scale result */
- ld r5,CFG_TB_TO_XS(r3)
- mulhdu r8,r8,r5
-
- /* Add stamp since epoch */
- ld r6,CFG_STAMP_XSEC(r3)
- add r4,r6,r8
-
- xor r0,r4,r4
- add r3,r3,r0
- ld r0,CFG_TB_UPDATE_COUNT(r3)
- cmpld cr0,r0,r7 /* check if updated */
- bne- 1b
- blr
- .cfi_endproc
-V_FUNCTION_END(__do_get_xsec)
diff --git a/arch/ppc64/kernel/vdso64/note.S b/arch/ppc64/kernel/vdso64/note.S
deleted file mode 100644
index dc2a509..0000000
--- a/arch/ppc64/kernel/vdso64/note.S
+++ /dev/null
@@ -1 +0,0 @@
-#include "../vdso32/note.S"
diff --git a/arch/ppc64/kernel/vdso64/sigtramp.S b/arch/ppc64/kernel/vdso64/sigtramp.S
deleted file mode 100644
index 31b604a..0000000
--- a/arch/ppc64/kernel/vdso64/sigtramp.S
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * 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.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#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
-
-/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from
- the return address to get an address in the middle of the presumed
- call instruction. Since we don't have a call here, we artifically
- extend the range covered by the unwind info by padding before the
- real start. */
- nop
- .balign 8
-V_FUNCTION_BEGIN(__kernel_sigtramp_rt64)
-.Lsigrt_start = . - 4
- 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
-
-/* 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 (70, 38*RSIZE) /* cr */
-
-/* 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 "zR" /* 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/ppc64/kernel/vdso64/vdso64.lds.S b/arch/ppc64/kernel/vdso64/vdso64.lds.S
deleted file mode 100644
index 9cb2818..0000000
--- a/arch/ppc64/kernel/vdso64/vdso64.lds.S
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * This is the infamous ld script for the 64 bits vdso
- * library
- */
-#include <asm/vdso.h>
-
-OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc")
-OUTPUT_ARCH(powerpc:common64)
-ENTRY(_start)
-
-SECTIONS
-{
- . = VDSO64_LBASE + SIZEOF_HEADERS;
- .hash : { *(.hash) } :text
- .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.*)
- *(.sfpr .glink)
- } :text
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
-
- /* Other stuff is appended to the text segment: */
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
- .rodata1 : { *(.rodata1) }
- .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
- .eh_frame : { KEEP (*(.eh_frame)) } :text
- .gcc_except_table : { *(.gcc_except_table) }
-
- .opd ALIGN(8) : { KEEP (*(.opd)) }
- .got ALIGN(8) : { *(.got .toc) }
- .rela.dyn ALIGN(8) : { *(.rela.dyn) }
-
- .dynamic : { *(.dynamic) } :text :dynamic
-
- _end = .;
- PROVIDE (end = .);
-
- /* Stabs debugging sections are here too
- */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sectio/ns.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-
- /DISCARD/ : { *(.note.GNU-stack) }
- /DISCARD/ : { *(.branch_lt) }
- /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) }
- /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
-}
-
-PHDRS
-{
- text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
- note PT_NOTE FLAGS(4); /* PF_R */
- dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
- eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
-}
-
-/*
- * This controls what symbols we export from the DSO.
- */
-VERSION
-{
- VDSO_VERSION_STRING {
- global:
- __kernel_datapage_offset; /* Has to be there for the kernel to find it */
- __kernel_get_syscall_map;
- __kernel_gettimeofday;
- __kernel_sync_dicache;
- __kernel_sync_dicache_p5;
- __kernel_sigtramp_rt64;
- local: *;
- };
-}
diff --git a/arch/ppc64/kernel/vdso64/vdso64_wrapper.S b/arch/ppc64/kernel/vdso64/vdso64_wrapper.S
deleted file mode 100644
index 771c274..0000000
--- a/arch/ppc64/kernel/vdso64/vdso64_wrapper.S
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <linux/init.h>
-#include <asm/page.h>
-
- .section ".data.page_aligned"
-
- .globl vdso64_start, vdso64_end
- .balign PAGE_SIZE
-vdso64_start:
- .incbin "arch/ppc64/kernel/vdso64/vdso64.so"
- .balign PAGE_SIZE
-vdso64_end:
-
- .previous