Commit 0d3b051a authored by Guo Ren's avatar Guo Ren
Browse files

csky: Add VDSO with GENERIC_GETTIMEOFDAY, GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO



It could help to reduce the latency of the time-related functions
in user space.

We have referenced arm's and riscv's implementation for the patch.

Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
Cc: Vincent Chen <vincent.chen@sifive.com>
Cc: Arnd Bergmann <arnd@arndb.de>
parent 8dcbc611
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ config CSKY
	select GENERIC_IRQ_MULTI_HANDLER
	select GENERIC_SCHED_CLOCK
	select GENERIC_SMP_IDLE_THREAD
	select GENERIC_TIME_VSYSCALL
	select GENERIC_VDSO_32
	select GENERIC_GETTIMEOFDAY
	select GX6605S_TIMER if CPU_CK610
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_AUDITSYSCALL
@@ -46,6 +49,7 @@ config CSKY
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DYNAMIC_FTRACE
	select HAVE_DYNAMIC_FTRACE_WITH_REGS
	select HAVE_GENERIC_VDSO
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_ERROR_INJECTION
+5 −0
Original line number Diff line number Diff line
@@ -4,7 +4,12 @@
#ifndef __ASM_CSKY_REGDEF_H
#define __ASM_CSKY_REGDEF_H

#ifdef __ASSEMBLY__
#define syscallid	r1
#else
#define syscallid	"r1"
#endif

#define regs_syscallid(regs) regs->regs[9]
#define regs_fp(regs) regs->regs[2]

+5 −0
Original line number Diff line number Diff line
@@ -4,7 +4,12 @@
#ifndef __ASM_CSKY_REGDEF_H
#define __ASM_CSKY_REGDEF_H

#ifdef __ASSEMBLY__
#define syscallid	r7
#else
#define syscallid	"r7"
#endif

#define regs_syscallid(regs) regs->regs[3]
#define regs_fp(regs) regs->regs[4]

+8 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef __ASM_VDSO_CSKY_CLOCKSOURCE_H
#define __ASM_VDSO_CSKY_CLOCKSOURCE_H

#include <asm/vdso/clocksource.h>

#endif
+2 −0
Original line number Diff line number Diff line
@@ -5,8 +5,10 @@

#include <linux/types.h>

#ifndef GENERIC_TIME_VSYSCALL
struct vdso_data {
};
#endif

/*
 * The VDSO symbols are mapped into Linux so we can just use regular symbol
Loading