Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754604AbaB0BCc (ORCPT ); Wed, 26 Feb 2014 20:02:32 -0500 Received: from mail-pb0-f50.google.com ([209.85.160.50]:56253 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607AbaB0BC2 (ORCPT ); Wed, 26 Feb 2014 20:02:28 -0500 From: Andy Lutomirski To: Stefani Seibold , X86 ML , "H. Peter Anvin" Cc: Greg KH , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , Andi Kleen , Andrea Arcangeli , John Stultz , Pavel Emelyanov , Cyrill Gorcunov , andriy.shevchenko@linux.intel.com, Martin.Runge@rohde-schwarz.com, Andreas.Brief@rohde-schwarz.com, Andy Lutomirski Subject: [PATCH 1/2] x86: Mark __vdso entries as asmlinkage Date: Wed, 26 Feb 2014 17:02:13 -0800 Message-Id: X-Mailer: git-send-email 1.8.5.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This makes no difference for 64-bit, bit it's critical for 32-bit code: these functions are called from outside the kernel, so they need to comply with the ABI. Signed-off-by: Andy Lutomirski --- arch/x86/vdso/vclock_gettime.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index 828888e..260a422 100644 --- a/arch/x86/vdso/vclock_gettime.c +++ b/arch/x86/vdso/vclock_gettime.c @@ -25,9 +25,9 @@ #define gtod (&VVAR(vsyscall_gtod_data)) -extern int __vdso_clock_gettime(clockid_t clock, struct timespec *ts); -extern int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz); -extern time_t __vdso_time(time_t *t); +extern asmlinkage int __vdso_clock_gettime(clockid_t clock, struct timespec *ts); +extern asmlinkage int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz); +extern asmlinkage time_t __vdso_time(time_t *t); #ifdef CONFIG_HPET_TIMER static inline u32 read_hpet_counter(const volatile void *addr) @@ -304,7 +304,7 @@ notrace static void do_monotonic_coarse(struct timespec *ts) } while (unlikely(gtod_read_retry(gtod, seq))); } -notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts) +notrace asmlinkage int __vdso_clock_gettime(clockid_t clock, struct timespec *ts) { switch (clock) { case CLOCK_REALTIME: @@ -332,7 +332,7 @@ fallback: int clock_gettime(clockid_t, struct timespec *) __attribute__((weak, alias("__vdso_clock_gettime"))); -notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) +notrace asmlinkage int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) { if (likely(tv != NULL)) { if (unlikely(do_realtime((struct timespec *)tv) == VCLOCK_NONE)) @@ -353,7 +353,7 @@ int gettimeofday(struct timeval *, struct timezone *) * This will break when the xtime seconds get inaccurate, but that is * unlikely */ -notrace time_t __vdso_time(time_t *t) +notrace asmlinkage time_t __vdso_time(time_t *t) { /* This is atomic on x86 so we don't need any locks. */ time_t result = ACCESS_ONCE(gtod->wall_time_sec); -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/