Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -11064,8 +11064,8 @@ M: Vincenzo Frascino <vincenzo.frascino@arm.com>
L: linux-kernel@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
F: include/asm-generic/vdso/vsyscall.h
F: include/linux/vdso_datastore.h
F: include/linux/vdso_time.h
F: include/vdso/
F: kernel/time/namespace_vdso.c
F: kernel/time/vsyscall.c
Expand Down
7 changes: 0 additions & 7 deletions arch/arm/include/asm/vdso/vsyscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#ifndef __ASM_VDSO_VSYSCALL_H
#define __ASM_VDSO_VSYSCALL_H

#ifndef __ASSEMBLY__

#include <vdso/datapage.h>
#include <asm/cacheflush.h>

Expand All @@ -14,9 +12,4 @@ void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)
}
#define __arch_sync_vdso_time_data __arch_sync_vdso_time_data

/* The asm-generic header needs to be included after the definitions above */
#include <asm-generic/vdso/vsyscall.h>

#endif /* !__ASSEMBLY__ */

#endif /* __ASM_VDSO_VSYSCALL_H */
1 change: 0 additions & 1 deletion arch/arm/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <asm/vdso.h>
#include <clocksource/arm_arch_timer.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>

#define MAX_SYMNAME 64

Expand Down
1 change: 0 additions & 1 deletion arch/arm64/include/asm/vdso/getrandom.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef __ASSEMBLER__

#include <asm/unistd.h>
#include <asm/vdso/vsyscall.h>
#include <vdso/datapage.h>

/**
Expand Down
7 changes: 0 additions & 7 deletions arch/arm64/include/asm/vdso/vsyscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#ifndef __ASM_VDSO_VSYSCALL_H
#define __ASM_VDSO_VSYSCALL_H

#ifndef __ASSEMBLER__

#include <vdso/datapage.h>

#define VDSO_PRECISION_MASK ~(0xFF00ULL<<48)
Expand All @@ -19,9 +17,4 @@ void __arch_update_vdso_clock(struct vdso_clock *vc)
}
#define __arch_update_vdso_clock __arch_update_vdso_clock

/* The asm-generic header needs to be included after the definitions above */
#include <asm-generic/vdso/vsyscall.h>

#endif /* !__ASSEMBLER__ */

#endif /* __ASM_VDSO_VSYSCALL_H */
1 change: 0 additions & 1 deletion arch/arm64/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/vmalloc.h>
#include <vdso/datapage.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>

#include <asm/cacheflush.h>
#include <asm/signal32.h>
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/kernel/vdso/vdso.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <linux/const.h>
#include <asm/page.h>
#include <asm/vdso.h>
#include <asm/vdso/vsyscall.h>
#include <asm-generic/vmlinux.lds.h>
#include <vdso/datapage.h>

Expand Down
14 changes: 0 additions & 14 deletions arch/loongarch/include/asm/vdso/vsyscall.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/loongarch/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <asm/vdso.h>
#include <asm/vdso/vdso.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
#include <vdso/datapage.h>
#include <generated/vdso-offsets.h>

Expand Down
16 changes: 0 additions & 16 deletions arch/mips/include/asm/vdso/vsyscall.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/mips/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <asm/vdso.h>
#include <asm/vdso/vdso.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>

static_assert(VDSO_NR_PAGES == __VDSO_PAGES);

Expand Down
14 changes: 0 additions & 14 deletions arch/powerpc/include/asm/vdso/vsyscall.h

This file was deleted.

14 changes: 0 additions & 14 deletions arch/riscv/include/asm/vdso/vsyscall.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/riscv/kernel/sys_hwprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <asm/vendor_extensions/mips_hwprobe.h>
#include <asm/vendor_extensions/sifive_hwprobe.h>
#include <asm/vendor_extensions/thead_hwprobe.h>
#include <vdso/vsyscall.h>
#include <vdso/datapage.h>


#define EXT_KEY(isa_arg, ext, pv, missing) \
Expand Down
1 change: 0 additions & 1 deletion arch/riscv/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <asm/vdso.h>
#include <linux/vdso_datastore.h>
#include <vdso/datapage.h>
#include <vdso/vsyscall.h>

#define VVAR_SIZE (VDSO_NR_PAGES << PAGE_SHIFT)

Expand Down
1 change: 0 additions & 1 deletion arch/s390/include/asm/vdso/getrandom.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef __ASSEMBLER__

#include <vdso/datapage.h>
#include <asm/vdso/vsyscall.h>
#include <asm/syscall.h>
#include <asm/unistd.h>
#include <asm/page.h>
Expand Down
16 changes: 0 additions & 16 deletions arch/s390/include/asm/vdso/vsyscall.h

This file was deleted.

6 changes: 3 additions & 3 deletions arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <linux/gfp.h>
#include <linux/kprobes.h>
#include <linux/uaccess.h>
#include <vdso/vsyscall.h>
#include <linux/vdso_time.h>
#include <vdso/clocksource.h>
#include <vdso/helpers.h>
#include <asm/facility.h>
Expand Down Expand Up @@ -527,7 +527,7 @@ static int stp_sync_clock(void *data)
cpu_relax();
rc = 0;
if (stp_info.todoff || stp_info.tmd != 2) {
flags = vdso_update_begin();
flags = vdso_time_update_begin();
rc = chsc_sstpc(stp_page, STP_OP_SYNC, 0,
&clock_delta);
if (rc == 0) {
Expand All @@ -537,7 +537,7 @@ static int stp_sync_clock(void *data)
if (rc == 0 && stp_info.tmd != 2)
rc = -EAGAIN;
}
vdso_update_end(flags);
vdso_time_update_end(flags);
}
sync->in_sync = rc ? -EAGAIN : 1;
xchg(&first, 0);
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/random.h>
#include <linux/vdso_datastore.h>
#include <vdso/datapage.h>
#include <asm/vdso/vsyscall.h>
#include <asm/alternative.h>
#include <asm/vdso.h>

Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/vdso/vdso.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* library
*/

#include <asm/vdso/vsyscall.h>
#include <asm/page.h>
#include <asm/vdso.h>
#include <asm-generic/vmlinux.lds.h>
Expand Down
6 changes: 6 additions & 0 deletions arch/sparc/include/asm/vdso.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#ifndef _ASM_SPARC_VDSO_H
#define _ASM_SPARC_VDSO_H

#define __VDSO_PAGES 4

#ifndef __ASSEMBLER__

struct vdso_image {
void *data;
unsigned long size; /* Always a multiple of PAGE_SIZE */
Expand All @@ -17,4 +21,6 @@ extern const struct vdso_image vdso_image_64_builtin;
extern const struct vdso_image vdso_image_32_builtin;
#endif

#endif /* __ASSEMBLER__ */

#endif /* _ASM_SPARC_VDSO_H */
10 changes: 0 additions & 10 deletions arch/sparc/include/asm/vdso/vsyscall.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/sparc/vdso/vdso-layout.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <vdso/datapage.h>
#include <vdso/page.h>
#include <asm/vdso/vsyscall.h>
#include <asm/vdso.h>

SECTIONS
{
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/vdso/vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <asm/page.h>

#include <vdso/datapage.h>
#include <asm/vdso/vsyscall.h>

unsigned int __read_mostly vdso_enabled = 1;

Expand Down
1 change: 0 additions & 1 deletion arch/x86/entry/vdso/common/vdso-layout.lds.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <asm/vdso.h>
#include <asm/vdso/vsyscall.h>
#include <vdso/datapage.h>

/*
Expand Down
1 change: 0 additions & 1 deletion arch/x86/entry/vdso/vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <asm/page.h>
#include <asm/desc.h>
#include <asm/cpufeature.h>
#include <asm/vdso/vsyscall.h>
#include <clocksource/hyperv_timer.h>

static_assert(VDSO_NR_PAGES + VDSO_NR_VCLOCK_PAGES == __VDSO_PAGES);
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/include/asm/vdso.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
#include <linux/linkage.h>
#include <linux/init.h>

#define __VDSO_PAGES 6

#define VDSO_NR_VCLOCK_PAGES 2
#define VDSO_VCLOCK_PAGES_START(_b) ((_b) + (__VDSO_PAGES - VDSO_NR_VCLOCK_PAGES) * PAGE_SIZE)
#define VDSO_PAGE_PVCLOCK_OFFSET 0
#define VDSO_PAGE_HVCLOCK_OFFSET 1

#ifndef __ASSEMBLER__

#include <linux/mm_types.h>
Expand Down
22 changes: 0 additions & 22 deletions arch/x86/include/asm/vdso/vsyscall.h

This file was deleted.

1 change: 1 addition & 0 deletions include/asm-generic/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ mandatory-y += trace_clock.h
mandatory-y += uaccess.h
mandatory-y += unwind_user.h
mandatory-y += vdso/clocksource.h
mandatory-y += vdso/vsyscall.h
mandatory-y += vermagic.h
mandatory-y += vga.h
mandatory-y += video.h
Expand Down
35 changes: 0 additions & 35 deletions include/asm-generic/vdso/vsyscall.h
Original file line number Diff line number Diff line change
@@ -1,35 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_GENERIC_VSYSCALL_H
#define __ASM_GENERIC_VSYSCALL_H

#ifndef __ASSEMBLER__

#ifndef __arch_get_vdso_u_time_data
static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
{
return &vdso_u_time_data;
}
#endif

#ifndef __arch_get_vdso_u_rng_data
static __always_inline const struct vdso_rng_data *__arch_get_vdso_u_rng_data(void)
{
return &vdso_u_rng_data;
}
#endif

#ifndef __arch_update_vdso_clock
static __always_inline void __arch_update_vdso_clock(struct vdso_clock *vc)
{
}
#endif /* __arch_update_vdso_clock */

#ifndef __arch_sync_vdso_time_data
static __always_inline void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)
{
}
#endif /* __arch_sync_vdso_time_data */

#endif /* !__ASSEMBLER__ */

#endif /* __ASM_GENERIC_VSYSCALL_H */
8 changes: 8 additions & 0 deletions include/linux/vdso_time.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_VDSO_TIME_H
#define _LINUX_VDSO_TIME_H

unsigned long vdso_time_update_begin(void);
void vdso_time_update_end(unsigned long flags);

#endif /* _LINUX_VDSO_TIME_H */
Loading
Loading