]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/vdso: remove deprecated VDS64_HAS_DESCRIPTORS references
authorJoe Lawrence <joe.lawrence@redhat.com>
Mon, 24 Feb 2020 21:18:48 +0000 (16:18 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 13 Mar 2020 10:13:06 +0000 (21:13 +1100)
The original 2005 patch that introduced the powerpc vdso, pre-git
("ppc64: Implement a vDSO and use it for signal trampoline") notes that:

  ... symbols exposed by the vDSO aren't "normal" function symbols, apps
  can't be expected to link against them directly, the vDSO's are both
  seen as if they were linked at 0 and the symbols just contain offsets
  to the various functions.  This is done on purpose to avoid a
  relocation step (ppc64 functions normally have descriptors with abs
  addresses in them).  When glibc uses those functions, it's expected to
  use it's own trampolines that know how to reach them.

Despite that explanation, there remains dead #ifdef
VDS64_HAS_DESCRIPTORS code-blocks that provide alternate function
definitions that setup function descriptors.

Since VDS64_HAS_DESCRIPTORS has been unused for all these years, we
might as well finally remove it from the codebase.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200224211848.26087-1-joe.lawrence@redhat.com
arch/powerpc/include/asm/vdso.h
arch/powerpc/kernel/vdso.c

index b5e1f8f8a05c247abb12eb2fc9d3c229e1e12126..2ff884853f975c1bee43471d11d2fb6e5c748c9a 100644 (file)
@@ -13,9 +13,6 @@
 
 #define VDSO_VERSION_STRING    LINUX_2.6.15
 
-/* Define if 64 bits VDSO has procedure descriptors */
-#undef VDS64_HAS_DESCRIPTORS
-
 #ifndef __ASSEMBLY__
 
 /* Offsets relative to thread->vdso_base */
@@ -28,25 +25,6 @@ int vdso_getcpu_init(void);
 #else /* __ASSEMBLY__ */
 
 #ifdef __VDSO64__
-#ifdef VDS64_HAS_DESCRIPTORS
-#define V_FUNCTION_BEGIN(name)         \
-       .globl name;                    \
-        .section ".opd","a";           \
-        .align 3;                      \
-       name:                           \
-       .quad .name,.TOC.@tocbase,0;    \
-       .previous;                      \
-       .globl .name;                   \
-       .type .name,@function;          \
-       .name:                          \
-
-#define V_FUNCTION_END(name)           \
-       .size .name,.-.name;
-
-#define V_LOCAL_FUNC(name) (.name)
-
-#else /* VDS64_HAS_DESCRIPTORS */
-
 #define V_FUNCTION_BEGIN(name)         \
        .globl name;                    \
        name:                           \
@@ -55,8 +33,6 @@ int vdso_getcpu_init(void);
        .size name,.-name;
 
 #define V_LOCAL_FUNC(name) (name)
-
-#endif /* VDS64_HAS_DESCRIPTORS */
 #endif /* __VDSO64__ */
 
 #ifdef __VDSO32__
index b9a108411c0d015d5e72833d7023d27c4f2d4a2d..d3b77c15f9ce22c95c2ff3db662937f797fac7f1 100644 (file)
@@ -391,12 +391,7 @@ static unsigned long __init find_function64(struct lib64_elfinfo *lib,
                       symname);
                return 0;
        }
-#ifdef VDS64_HAS_DESCRIPTORS
-       return *((u64 *)(vdso64_kbase + sym->st_value - VDSO64_LBASE)) -
-               VDSO64_LBASE;
-#else
        return sym->st_value - VDSO64_LBASE;
-#endif
 }
 
 static int __init vdso_do_func_patch64(struct lib32_elfinfo *v32,