Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e8ad43e authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds
Browse files

[PATCH] x86-64: Prevent gcc 4 from optimizing away vsyscalls



They were previously static.

Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c1a71a1e
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -107,7 +107,7 @@ static force_inline long time_syscall(long *t)
	return secs;
	return secs;
}
}


static int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz)
int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz)
{
{
	if (unlikely(!__sysctl_vsyscall))
	if (unlikely(!__sysctl_vsyscall))
		return gettimeofday(tv,tz);
		return gettimeofday(tv,tz);
@@ -120,7 +120,7 @@ static int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz


/* This will break when the xtime seconds get inaccurate, but that is
/* This will break when the xtime seconds get inaccurate, but that is
 * unlikely */
 * unlikely */
static time_t __vsyscall(1) vtime(time_t *t)
time_t __vsyscall(1) vtime(time_t *t)
{
{
	if (unlikely(!__sysctl_vsyscall))
	if (unlikely(!__sysctl_vsyscall))
		return time_syscall(t);
		return time_syscall(t);
@@ -129,12 +129,12 @@ static time_t __vsyscall(1) vtime(time_t *t)
	return __xtime.tv_sec;
	return __xtime.tv_sec;
}
}


static long __vsyscall(2) venosys_0(void)
long __vsyscall(2) venosys_0(void)
{
{
	return -ENOSYS;
	return -ENOSYS;
}
}


static long __vsyscall(3) venosys_1(void)
long __vsyscall(3) venosys_1(void)
{
{
	return -ENOSYS;
	return -ENOSYS;
}
}