Skip to content

Commit 2bb7947

Browse files
t-8chKAGA-KOKO
authored andcommitted
ARM: vdso: Remove assembly for datapage access
vdso/datapage.h provides a hidden declaration for _vdso_data. When using it the compiler will automatically generate PC-relative accesses which avoids the need for a custom assembly-based accessor. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent d34b607 commit 2bb7947

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

arch/arm/include/asm/vdso/gettimeofday.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
#define VDSO_HAS_CLOCK_GETRES 1
1717

18-
extern struct vdso_data *__get_datapage(void);
19-
2018
static __always_inline int gettimeofday_fallback(
2119
struct __kernel_old_timeval *_tv,
2220
struct timezone *_tz)
@@ -139,7 +137,7 @@ static __always_inline u64 __arch_get_hw_counter(int clock_mode,
139137

140138
static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
141139
{
142-
return __get_datapage();
140+
return _vdso_data;
143141
}
144142

145143
#endif /* !__ASSEMBLY__ */

arch/arm/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include $(srctree)/lib/vdso/Makefile
55

66
hostprogs := vdsomunge
77

8-
obj-vdso := vgettimeofday.o datapage.o note.o
8+
obj-vdso := vgettimeofday.o note.o
99

1010
# Build rules
1111
targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.so.raw vdso.lds

arch/arm/vdso/datapage.S

Lines changed: 0 additions & 16 deletions
This file was deleted.

arch/arm/vdso/vdso.lds.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/const.h>
14+
#include <asm/asm-offsets.h>
1415
#include <asm/page.h>
1516
#include <asm/vdso.h>
1617

@@ -19,7 +20,7 @@ OUTPUT_ARCH(arm)
1920

2021
SECTIONS
2122
{
22-
PROVIDE(_start = .);
23+
PROVIDE(_vdso_data = . - VDSO_DATA_SIZE);
2324

2425
. = SIZEOF_HEADERS;
2526

0 commit comments

Comments
 (0)