From: "tip-bot2 for Samuel Holland" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Samuel Holland <samuel@sholland.org>,
Palmer Dabbelt <palmer@rivosinc.com>,
Anup Patel <anup@brainfault.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] clocksource/drivers/riscv: Increase the clock source rating
Date: Mon, 13 Feb 2023 18:26:24 -0000 [thread overview]
Message-ID: <167631278448.4906.3061443798172284718.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20221228004444.61568-1-samuel@sholland.org>
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 674402b0098b66b8ba91fe93c0d27af703256098
Gitweb: https://git.kernel.org/tip/674402b0098b66b8ba91fe93c0d27af703256098
Author: Samuel Holland <samuel@sholland.org>
AuthorDate: Tue, 27 Dec 2022 18:44:44 -06:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 13 Feb 2023 13:10:16 +01:00
clocksource/drivers/riscv: Increase the clock source rating
RISC-V provides an architectural clock source via the time CSR. This
clock source exposes a 64-bit counter synchronized across all CPUs.
Because it is accessed using a CSR, it is much more efficient to read
than MMIO clock sources. For example, on the Allwinner D1, reading the
sun4i timer in a loop takes 131 cycles/iteration, while reading the
RISC-V time CSR takes only 5 cycles/iteration.
Adjust the RISC-V clock source rating so it is preferred over the
various platform-specific MMIO clock sources.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20221228004444.61568-1-samuel@sholland.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
drivers/clocksource/timer-riscv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
index 1b4b36d..adf7f98 100644
--- a/drivers/clocksource/timer-riscv.c
+++ b/drivers/clocksource/timer-riscv.c
@@ -74,7 +74,7 @@ static u64 notrace riscv_sched_clock(void)
static struct clocksource riscv_clocksource = {
.name = "riscv_clocksource",
- .rating = 300,
+ .rating = 400,
.mask = CLOCKSOURCE_MASK(64),
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
.read = riscv_clocksource_rdtime,
prev parent reply other threads:[~2023-02-13 18:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 0:44 [PATCH] " Samuel Holland
2022-12-28 3:58 ` Anup Patel
2022-12-28 23:29 ` Lad, Prabhakar
2022-12-29 16:22 ` Palmer Dabbelt
2022-12-29 17:21 ` Samuel Holland
2023-01-04 22:29 ` Daniel Lezcano
2023-02-13 18:26 ` tip-bot2 for Samuel Holland [this message]
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=167631278448.4906.3061443798172284718.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=anup@brainfault.org \
--cc=daniel.lezcano@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=palmer@rivosinc.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=samuel@sholland.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®