From: Mark Salyzyn <salyzyn@android.com>
To: linux-kernel@vger.kernel.org
Cc: Mark Salyzyn <salyzyn@android.com>,
James Morse <james.morse@arm.com>,
Russell King <linux@armlinux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Andy Lutomirski <luto@amacapital.net>,
Dmitry Safonov <dsafonov@virtuozzo.com>,
John Stultz <john.stultz@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Laura Abbott <labbott@redhat.com>,
Kees Cook <keescook@chromium.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Andy Gross <andy.gross@linaro.org>,
Kevin Brodsky <kevin.brodsky@arm.com>,
Andrew Pinski <apinski@cavium.com>,
linux-arm-kernel@lists.infradead.org,
Mark Salyzyn <salyzyn@google.com>
Subject: [PATCH v3 04/12] arm: vdso: enforce monotonic and realtime as inline
Date: Fri, 27 Oct 2017 15:25:28 -0700 [thread overview]
Message-ID: <20171027222531.57223-1-salyzyn@android.com> (raw)
Ensure monotonic and realtime are inline, small price to pay for
high volume common request.
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: James Morse <james.morse@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Andrew Pinski <apinski@cavium.com>
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
next reply other threads:[~2017-10-27 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 22:25 Mark Salyzyn [this message]
2017-10-30 14:10 ` [PATCH v3 04/12] arm: vdso: enforce monotonic and realtime as inline Mark Rutland
2017-10-30 15:59 ` Russell King - ARM Linux
2017-10-31 15:28 ` Mark Salyzyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171027222531.57223-1-salyzyn@android.com \
--to=salyzyn@android.com \
--cc=andy.gross@linaro.org \
--cc=apinski@cavium.com \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=dsafonov@virtuozzo.com \
--cc=james.morse@arm.com \
--cc=john.stultz@linaro.org \
--cc=keescook@chromium.org \
--cc=kevin.brodsky@arm.com \
--cc=labbott@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luto@amacapital.net \
--cc=mark.rutland@arm.com \
--cc=salyzyn@google.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).