powerpc/vdso: Simplify __get_datapage()
The VDSO datapage and the text pages are always located immediately next to each other, so it can be hardcoded without an indirection through __kernel_datapage_offset Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/b08f5ef99d64cfc38f79b7ad5310d9b4d2479eeb.1601197618.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
511157ab64
commit
591857b635
|
@ -105,10 +105,12 @@ extern struct vdso_arch_data *vdso_data;
|
||||||
|
|
||||||
.macro get_datapage ptr, tmp
|
.macro get_datapage ptr, tmp
|
||||||
bcl 20, 31, .+4
|
bcl 20, 31, .+4
|
||||||
|
999:
|
||||||
mflr \ptr
|
mflr \ptr
|
||||||
addi \ptr, \ptr, (__kernel_datapage_offset - (.-4))@l
|
#if CONFIG_PPC_PAGE_SHIFT > 14
|
||||||
lwz \tmp, 0(\ptr)
|
addis \ptr, \ptr, (_vdso_datapage - 999b)@ha
|
||||||
add \ptr, \tmp, \ptr
|
#endif
|
||||||
|
addi \ptr, \ptr, (_vdso_datapage - 999b)@l
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
* library
|
* library
|
||||||
*/
|
*/
|
||||||
#include <asm/vdso.h>
|
#include <asm/vdso.h>
|
||||||
|
#include <asm/page.h>
|
||||||
|
|
||||||
#ifdef __LITTLE_ENDIAN__
|
#ifdef __LITTLE_ENDIAN__
|
||||||
OUTPUT_FORMAT("elf32-powerpcle", "elf32-powerpcle", "elf32-powerpcle")
|
OUTPUT_FORMAT("elf32-powerpcle", "elf32-powerpcle", "elf32-powerpcle")
|
||||||
|
@ -15,6 +16,7 @@ ENTRY(_start)
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
PROVIDE(_vdso_datapage = . - PAGE_SIZE);
|
||||||
. = VDSO32_LBASE + SIZEOF_HEADERS;
|
. = VDSO32_LBASE + SIZEOF_HEADERS;
|
||||||
|
|
||||||
.hash : { *(.hash) } :text
|
.hash : { *(.hash) } :text
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
* library
|
* library
|
||||||
*/
|
*/
|
||||||
#include <asm/vdso.h>
|
#include <asm/vdso.h>
|
||||||
|
#include <asm/page.h>
|
||||||
|
|
||||||
#ifdef __LITTLE_ENDIAN__
|
#ifdef __LITTLE_ENDIAN__
|
||||||
OUTPUT_FORMAT("elf64-powerpcle", "elf64-powerpcle", "elf64-powerpcle")
|
OUTPUT_FORMAT("elf64-powerpcle", "elf64-powerpcle", "elf64-powerpcle")
|
||||||
|
@ -15,6 +16,7 @@ ENTRY(_start)
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
PROVIDE(_vdso_datapage = . - PAGE_SIZE);
|
||||||
. = VDSO64_LBASE + SIZEOF_HEADERS;
|
. = VDSO64_LBASE + SIZEOF_HEADERS;
|
||||||
|
|
||||||
.hash : { *(.hash) } :text
|
.hash : { *(.hash) } :text
|
||||||
|
|
Loading…
Reference in New Issue