From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878AbdJ0WZi (ORCPT ); Fri, 27 Oct 2017 18:25:38 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:48182 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbdJ0WZh (ORCPT ); Fri, 27 Oct 2017 18:25:37 -0400 X-Google-Smtp-Source: ABhQp+SzskokutAwQqS9TFMbe87GALFt2CCKwoYTahOqBdYjGMFMynwIxHAoRt2txTT7NAaptu0gxw== From: Mark Salyzyn To: linux-kernel@vger.kernel.org Cc: Mark Salyzyn , James Morse , Russell King , Catalin Marinas , Will Deacon , Andy Lutomirski , Dmitry Safonov , John Stultz , Mark Rutland , Laura Abbott , Kees Cook , Ard Biesheuvel , Andy Gross , Kevin Brodsky , Andrew Pinski , linux-arm-kernel@lists.infradead.org, Mark Salyzyn Subject: [PATCH v3 04/12] arm: vdso: enforce monotonic and realtime as inline Date: Fri, 27 Oct 2017 15:25:28 -0700 Message-Id: <20171027222531.57223-1-salyzyn@android.com> X-Mailer: git-send-email 2.15.0.rc2.357.g7e34df9404-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ensure monotonic and realtime are inline, small price to pay for high volume common request. Signed-off-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura Abbott Cc: Kees Cook Cc: Ard Biesheuvel Cc: Andy Gross Cc: Kevin Brodsky Cc: Andrew Pinski Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org v2: - split first CL into 4 of 7 pieces v3: - rebase (unchanged) --- arch/arm/vdso/vgettimeofday.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c index 5f596911bd53..71003a1997c4 100644 --- a/arch/arm/vdso/vgettimeofday.c +++ b/arch/arm/vdso/vgettimeofday.c @@ -99,7 +99,7 @@ static notrace int do_monotonic_coarse(const struct vdso_data *vd, #ifdef CONFIG_ARM_ARCH_TIMER -static notrace u64 get_ns(const struct vdso_data *vd) +static __always_inline notrace u64 get_ns(const struct vdso_data *vd) { u64 cycle_delta; u64 cycle_now; @@ -115,7 +115,9 @@ static notrace u64 get_ns(const struct vdso_data *vd) return nsec; } -static notrace int do_realtime(const struct vdso_data *vd, struct timespec *ts) +/* Code size doesn't matter (vdso is 4k/16k/64k anyway) and this is faster. */ +static __always_inline notrace int do_realtime(const struct vdso_data *vd, + struct timespec *ts) { u64 nsecs; u32 seq; @@ -137,7 +139,8 @@ static notrace int do_realtime(const struct vdso_data *vd, struct timespec *ts) return 0; } -static notrace int do_monotonic(const struct vdso_data *vd, struct timespec *ts) +static __always_inline notrace int do_monotonic(const struct vdso_data *vd, + struct timespec *ts) { struct timespec tomono; u64 nsecs; -- 2.15.0.rc2.357.g7e34df9404-goog