From patchwork Mon Feb 13 18:26:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 56439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2503275wrn; Mon, 13 Feb 2023 10:31:26 -0800 (PST) X-Google-Smtp-Source: AK7set+49phLKAWNXEMAmpB7SxA8UFNqk9mcyX1kF99UsaqTB4E0MoC64jPHVHlcz9bUAIaC8bvY X-Received: by 2002:a17:906:6a1b:b0:8af:b63:b4bf with SMTP id qw27-20020a1709066a1b00b008af0b63b4bfmr24012419ejc.27.1676313086028; Mon, 13 Feb 2023 10:31:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676313086; cv=none; d=google.com; s=arc-20160816; b=AaVdXe+JNQ0UIq+wn/q9650t4KjF62wQRCJ1WUMr98cMfElZVeTp1AMf+bQLFPKyUf kA8pfZJOjdMPmamrTcAupLWTZGEHOyFU7+NnNCFmHOqTYvdl0TsrX640mDLURScNFczB EddSnPyo2pmQKUDvPt++hdJwpNpSPFsG3EPVRN9bueQ2Rzwy9AkkF0wXbeK7KVPYG2Y7 ualzc9wNkl6jDLRv281k6SlMypoqSYCpSYYzeOB1kAgoNtUrvjdcSkpqsOMmFXq0VRTr xZ4fhu29VsSkYp6E8HNiXpodp7toj6mLnOkIiQLQOaICnd+AezuerhxO5JKeu60CufEw IcTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=R19Sizvsj0tF7RIZZbwYMnxHMhZAMPMsli2XLiDUCXM=; b=gblEqu1BPkqEotO3IbJQ1bpWZQo/Jd9H5rkwH1jDqib/KnfhoL8jg8KGT71UZc0k1U uhQ7Y4+4fQllqCfp7jksYfj1ZU5MRV/idpNUWPhNLCjkTkdb1Qzcy8EzAdL9dkmQ2tVR VnbkLictUoQ7pCHmnqJvnhESQGvyK3s6sZLhQTVT4fIGy0Z1/1AG21AiMNELJhe/4+O2 YXD6j8nTTS+bgBN/5tM28O7HjLgP29O9mYeDAynLZ0hj0PhOuBut869r8K6crOcYmCZB 6ChBw5z0yd6XEjQYDYTmD930adEF99E18KMcnpFK9+lrCYItFm/XCtt3d5j6GI5NsWfJ 4LSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0u33PN8F; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 22-20020a170906015600b008af4b7532e1si14065741ejh.500.2023.02.13.10.31.02; Mon, 13 Feb 2023 10:31:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0u33PN8F; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231358AbjBMS1E (ORCPT + 99 others); Mon, 13 Feb 2023 13:27:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230199AbjBMS03 (ORCPT ); Mon, 13 Feb 2023 13:26:29 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E600A134; Mon, 13 Feb 2023 10:26:27 -0800 (PST) Date: Mon, 13 Feb 2023 18:26:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1676312784; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R19Sizvsj0tF7RIZZbwYMnxHMhZAMPMsli2XLiDUCXM=; b=0u33PN8FuceNGPgBKCzr9YuOuYlrrAZYAYDBlW7Z6VZwZb01YhR9grJnQOWf2YLch3Anoz mUq0K9l8X2pgig2kMBygT5dYYKFjKLfvFiVh/X/3WYGSURUyHp9bNN+8ZLNujm7K/U1FbC aWlPr1NgbJFDXIPMbZoI/9aI0gbVa2UnEFqFztwEM0bS3HH+HcYhQEKZvpUD3L3AicOtVh /TfSBPrZoQXlGL9v33AMJGgMcCfJd/1l1pFBvb55+Jybn23O0rc68bCrCiPkvG03bmTvJ2 CEWLh7WPL80PKvJ/XGSRJMDPSoq8NvDk94TXDEO0/Hzlt3GtQs5lum/ViBxmfg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1676312784; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R19Sizvsj0tF7RIZZbwYMnxHMhZAMPMsli2XLiDUCXM=; b=HdBmxqz+Kcl9EYDktexRDmZcwgNaH5IP1rq4ReY9Jby6yqyFVm6uzTMpMxRqacUJD4ufjv ZdUvbWHisZsn0NDA== From: "tip-bot2 for Samuel Holland" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/riscv: Increase the clock source rating Cc: Samuel Holland , Palmer Dabbelt , Anup Patel , Lad Prabhakar , Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221228004444.61568-1-samuel@sholland.org> References: <20221228004444.61568-1-samuel@sholland.org> MIME-Version: 1.0 Message-ID: <167631278448.4906.3061443798172284718.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753416678341176588?= X-GMAIL-MSGID: =?utf-8?q?1757741670841407666?= 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 AuthorDate: Tue, 27 Dec 2022 18:44:44 -06:00 Committer: Daniel Lezcano 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 Acked-by: Palmer Dabbelt Reviewed-by: Palmer Dabbelt Reviewed-by: Anup Patel Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221228004444.61568-1-samuel@sholland.org Signed-off-by: Daniel Lezcano --- 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,