Message ID | 20221229224601.103851-1-prabhakar.mahadev-lad.rj@bp.renesas.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2623083wrt; Thu, 29 Dec 2022 14:51:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXuTQi9Nbdf9T70e3D2oNeb8ypFfc2vaSbn+5szOv4lOHD+rTdOkdr/d+svn5GjLoK9XFc/7 X-Received: by 2002:a17:90b:14b:b0:226:e83:57a4 with SMTP id em11-20020a17090b014b00b002260e8357a4mr10100002pjb.1.1672354289735; Thu, 29 Dec 2022 14:51:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672354289; cv=none; d=google.com; s=arc-20160816; b=LG0yn5Fi5X9G75eaTFbyZh0/WIjGDCvBaox2XQfEXDgMt03/eDVfwGknVcILhkJ288 OerL4wixqtr3ANhrqfFfV+lenrOb/GZcv+5zZCT0RLMw7v43WSUJhjcgBSKw5pWaVn+q bz78CmEbI7tlGbMLSByuD36n1Mq/bb9KwAf0kD5ZwTpmpcoFNUlqqrJtv+a6O3x7oMeb rKDGIAjkxTagf3mvNpI0Y9tVtiwOSEEU2KV5+cdNLf904olGlF+jj+dVhcNhwhnG/wFT UXYIUA1hrJC7bYolTqZeZX8H5QW3gevjNqA6tr6zUrNk0SgPz56H/PkKZRtuNTldm/dC iQHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9pHkqivt6f67irNbuQhpHiA1tWMOcGwgyjN35gn979k=; b=HUACroV+fZ5qM9x44HRC3J+mEcNohR58R7CJNO7vN4lNH+NvFgmcjr8i9TyupAEfRj 6N3hUaqd7XGLfK1nscvqgtdL42AN9G2uigjz+ie4D9SToyMlm4tkB9bwWEiHi8nXQyW1 gB35nUa7xNzBL+wELkzvRmD7+1QvR2Ww9sYVaov2hn7VruyCat6tI/fv90IZ/ZqfTHHw r5c6iCMEiI1QqvE2s5gy4OMyawvPV+P30A8NY/YxJAAfzGZ0LCftRGPqg0Ql3wHft2jO xUnSLCD7qAm6wlL37Ygv8ZCiXleLGjIH40W71G46LeDUBnmMcZ92rt4z+YHNtfZ/DSb2 8jIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Yli7mHNF; 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=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020a17090a8a8100b00212d9534254si19486046pjn.36.2022.12.29.14.51.17; Thu, 29 Dec 2022 14:51:29 -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=@gmail.com header.s=20210112 header.b=Yli7mHNF; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233698AbiL2WuS (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Thu, 29 Dec 2022 17:50:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbiL2WuQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 29 Dec 2022 17:50:16 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B955F42; Thu, 29 Dec 2022 14:50:15 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id bx10so18505723wrb.0; Thu, 29 Dec 2022 14:50:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9pHkqivt6f67irNbuQhpHiA1tWMOcGwgyjN35gn979k=; b=Yli7mHNFzGQhoCn7aw91t3u9/1u5SB02O1NkR7W+efSrpymfrp0zw5IHjDnlN2dYMp uiKSjApGAPXeupU3PEceX0aMiGVx0fxpn8o+LMW7P0ANKAPKhpAGS3yIxWIxi3wZ7SCZ JZ8BB/6V6Cre5SbPEDl5BX9rKf2JBipH+DkmhDku+IjvjW2Q1fC/ogDFAvbGSFPKMVaX JEZtrEuGbhxeJTuuFOM1BB+ggSwhH7Vj1yDCDaXxPyvIRt+hYxEjzbd9OiZouVYIGH7Z J//1hzHm5FznN7yksxVTTSItoUd1YHMl7GN/OKZalmshaujHERrh33pxRATlQFYPyXWY X6OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9pHkqivt6f67irNbuQhpHiA1tWMOcGwgyjN35gn979k=; b=OMwWW02F7iCHNwoH7qycT49XYmn3F8FranMgMt3g67N0wfGCxrtHA7YX/CDOtk4ue7 l0k5bUED+ZyXsfHmcogrwkAkDKpuioKg1PCqCeDDMBvgLaTu+Rj1P5Lf+acbfhFrT7gU YZpZVan/TyCbPjNEzvfxJoPPYPBudvbGY0blJLSDhZcrbR57cDYCSaW3rUu9qyV14tbl jFKS9szmNsW4EX+pnCWDMidK/Glq+ltX4EmlkZAThiq3GR4Kovn/K3WNbq+Wli6dPO9M BAX5pjeXX1mHrDQnDfGoqEytX9wsoexZYYAGHZ9yAQlCbBwCDgMVtmjIv1pyFJwbB3P8 cQnw== X-Gm-Message-State: AFqh2koKvMoOmVmbscpBo/ILXWjh6Ww8Vt57A425J759cT1bY/ZxEpVm x2CM4Z3RUbrCtbOjB4Y2DnU= X-Received: by 2002:a5d:6e0c:0:b0:27d:a1ea:dcfa with SMTP id h12-20020a5d6e0c000000b0027da1eadcfamr9450830wrz.19.1672354213671; Thu, 29 Dec 2022 14:50:13 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2501:c701:88e9:3a08:4328:85c4]) by smtp.gmail.com with ESMTPSA id o2-20020a5d58c2000000b0026a4bb75477sm18497702wrf.28.2022.12.29.14.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 14:50:12 -0800 (PST) From: Prabhakar <prabhakar.csengg@gmail.com> X-Google-Original-From: Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> To: Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Daniel Lezcano <daniel.lezcano@linaro.org>, Thomas Gleixner <tglx@linutronix.de> Cc: linux-riscv@lists.infradead.org, Geert Uytterhoeven <geert@linux-m68k.org>, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar <prabhakar.csengg@gmail.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>, Samuel Holland <samuel@sholland.org> Subject: [PATCH v2] clocksource/drivers/riscv: Get rid of clocksource_arch_init() callback Date: Thu, 29 Dec 2022 22:46:01 +0000 Message-Id: <20221229224601.103851-1-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753590571925376382?= X-GMAIL-MSGID: =?utf-8?q?1753590571925376382?= |
Series |
[v2] clocksource/drivers/riscv: Get rid of clocksource_arch_init() callback
|
|
Commit Message
Lad, Prabhakar
Dec. 29, 2022, 10:46 p.m. UTC
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Having a clocksource_arch_init() callback always sets vdso_clock_mode to VDSO_CLOCKMODE_ARCHTIMER if GENERIC_GETTIMEOFDAY is enabled, this is required for the riscv-timer. This works for platforms where just riscv-timer clocksource is present. On platforms where other clock sources are available we want them to register with vdso_clock_mode set to VDSO_CLOCKMODE_NONE. On the Renesas RZ/Five SoC OSTM block can be used as clocksource [0], to avoid multiple clock sources being registered as VDSO_CLOCKMODE_ARCHTIMER move setting of vdso_clock_mode in the riscv-timer driver instead of doing this in clocksource_arch_init() callback as done similarly for ARM/64 architecture. [0] drivers/clocksource/renesas-ostm.c Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Tested-by: Samuel Holland <samuel@sholland.org> --- RFC -> v2 * Dropped vdso_default static global variable * Used IS_ENABLED() macro * Included Tested-by from Samuel RFC: https://patchwork.kernel.org/project/linux-renesas-soc/patch/20221211215843.24024-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ --- arch/riscv/Kconfig | 1 - arch/riscv/kernel/time.c | 9 --------- drivers/clocksource/timer-riscv.c | 5 +++++ 3 files changed, 5 insertions(+), 10 deletions(-)
Comments
On 12/29/22 16:46, Prabhakar wrote: > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Having a clocksource_arch_init() callback always sets vdso_clock_mode to > VDSO_CLOCKMODE_ARCHTIMER if GENERIC_GETTIMEOFDAY is enabled, this is > required for the riscv-timer. > > This works for platforms where just riscv-timer clocksource is present. > On platforms where other clock sources are available we want them to > register with vdso_clock_mode set to VDSO_CLOCKMODE_NONE. > > On the Renesas RZ/Five SoC OSTM block can be used as clocksource [0], to > avoid multiple clock sources being registered as VDSO_CLOCKMODE_ARCHTIMER > move setting of vdso_clock_mode in the riscv-timer driver instead of doing > this in clocksource_arch_init() callback as done similarly for ARM/64 > architecture. > > [0] drivers/clocksource/renesas-ostm.c > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Tested-by: Samuel Holland <samuel@sholland.org> > --- > RFC -> v2 > * Dropped vdso_default static global variable > * Used IS_ENABLED() macro > * Included Tested-by from Samuel > > RFC: > https://patchwork.kernel.org/project/linux-renesas-soc/patch/20221211215843.24024-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ > --- > arch/riscv/Kconfig | 1 - > arch/riscv/kernel/time.c | 9 --------- > drivers/clocksource/timer-riscv.c | 5 +++++ > 3 files changed, 5 insertions(+), 10 deletions(-) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index e2b656043abf..9c687da7756d 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -12,7 +12,6 @@ config 32BIT > > config RISCV > def_bool y > - select ARCH_CLOCKSOURCE_INIT > select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION > select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2 > select ARCH_HAS_BINFMT_FLAT > diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c > index 8217b0f67c6c..42bee305e997 100644 > --- a/arch/riscv/kernel/time.c > +++ b/arch/riscv/kernel/time.c > @@ -30,12 +30,3 @@ void __init time_init(void) > of_clk_init(NULL); > timer_probe(); > } > - > -void clocksource_arch_init(struct clocksource *cs) > -{ > -#ifdef CONFIG_GENERIC_GETTIMEOFDAY > - cs->vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER; > -#else > - cs->vdso_clock_mode = VDSO_CLOCKMODE_NONE; > -#endif > -} > diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c > index 55dad7965f43..c416e5e934bf 100644 > --- a/drivers/clocksource/timer-riscv.c > +++ b/drivers/clocksource/timer-riscv.c > @@ -77,6 +77,11 @@ static struct clocksource riscv_clocksource = { > .mask = CLOCKSOURCE_MASK(64), > .flags = CLOCK_SOURCE_IS_CONTINUOUS, > .read = riscv_clocksource_rdtime, > +#if IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) > + .vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER, > +#else > + .vdso_clock_mode = VDSO_CLOCKMODE_NONE, The else case isn't strictly necessary because VDSO_CLOCKMODE_NONE is the default. Either way it looks fine to me. Reviewed-by: Samuel Holland <samuel@sholland.org> And I tested v2 as well. Regards, Samuel > +#endif > }; > > static int riscv_timer_starting_cpu(unsigned int cpu)
On Thu, Dec 29, 2022 at 10:50 PM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Having a clocksource_arch_init() callback always sets vdso_clock_mode to > VDSO_CLOCKMODE_ARCHTIMER if GENERIC_GETTIMEOFDAY is enabled, this is > required for the riscv-timer. > > This works for platforms where just riscv-timer clocksource is present. > On platforms where other clock sources are available we want them to > register with vdso_clock_mode set to VDSO_CLOCKMODE_NONE. > > On the Renesas RZ/Five SoC OSTM block can be used as clocksource [0], to > avoid multiple clock sources being registered as VDSO_CLOCKMODE_ARCHTIMER > move setting of vdso_clock_mode in the riscv-timer driver instead of doing > this in clocksource_arch_init() callback as done similarly for ARM/64 > architecture. > > [0] drivers/clocksource/renesas-ostm.c > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Tested-by: Samuel Holland <samuel@sholland.org> > --- > RFC -> v2 > * Dropped vdso_default static global variable > * Used IS_ENABLED() macro > * Included Tested-by from Samuel > > RFC: > https://patchwork.kernel.org/project/linux-renesas-soc/patch/20221211215843.24024-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ > --- > arch/riscv/Kconfig | 1 - > arch/riscv/kernel/time.c | 9 --------- > drivers/clocksource/timer-riscv.c | 5 +++++ > 3 files changed, 5 insertions(+), 10 deletions(-) > Gentle ping. Cheers, Prabhakar > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index e2b656043abf..9c687da7756d 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -12,7 +12,6 @@ config 32BIT > > config RISCV > def_bool y > - select ARCH_CLOCKSOURCE_INIT > select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION > select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2 > select ARCH_HAS_BINFMT_FLAT > diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c > index 8217b0f67c6c..42bee305e997 100644 > --- a/arch/riscv/kernel/time.c > +++ b/arch/riscv/kernel/time.c > @@ -30,12 +30,3 @@ void __init time_init(void) > of_clk_init(NULL); > timer_probe(); > } > - > -void clocksource_arch_init(struct clocksource *cs) > -{ > -#ifdef CONFIG_GENERIC_GETTIMEOFDAY > - cs->vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER; > -#else > - cs->vdso_clock_mode = VDSO_CLOCKMODE_NONE; > -#endif > -} > diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c > index 55dad7965f43..c416e5e934bf 100644 > --- a/drivers/clocksource/timer-riscv.c > +++ b/drivers/clocksource/timer-riscv.c > @@ -77,6 +77,11 @@ static struct clocksource riscv_clocksource = { > .mask = CLOCKSOURCE_MASK(64), > .flags = CLOCK_SOURCE_IS_CONTINUOUS, > .read = riscv_clocksource_rdtime, > +#if IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) > + .vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER, > +#else > + .vdso_clock_mode = VDSO_CLOCKMODE_NONE, > +#endif > }; > > static int riscv_timer_starting_cpu(unsigned int cpu) > -- > 2.25.1 >
On Thu, Dec 29, 2022 at 10:46:01PM +0000, Prabhakar wrote: > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Having a clocksource_arch_init() callback always sets vdso_clock_mode to > VDSO_CLOCKMODE_ARCHTIMER if GENERIC_GETTIMEOFDAY is enabled, this is > required for the riscv-timer. > > This works for platforms where just riscv-timer clocksource is present. > On platforms where other clock sources are available we want them to > register with vdso_clock_mode set to VDSO_CLOCKMODE_NONE. > > On the Renesas RZ/Five SoC OSTM block can be used as clocksource [0], to > avoid multiple clock sources being registered as VDSO_CLOCKMODE_ARCHTIMER > move setting of vdso_clock_mode in the riscv-timer driver instead of doing > this in clocksource_arch_init() callback as done similarly for ARM/64 > architecture. > > [0] drivers/clocksource/renesas-ostm.c > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Tested-by: Samuel Holland <samuel@sholland.org> > --- > RFC -> v2 > * Dropped vdso_default static global variable > * Used IS_ENABLED() macro Not sure it really makes much difference here either way, but increased coverage is always good I suppose. rv32 is the user for the !GENERIC_GETTIMEOFDAY patch IIRC and nothing seemed obviously amiss there to me either. Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
On 29/12/2022 23:46, Prabhakar wrote: > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Having a clocksource_arch_init() callback always sets vdso_clock_mode to > VDSO_CLOCKMODE_ARCHTIMER if GENERIC_GETTIMEOFDAY is enabled, this is > required for the riscv-timer. > > This works for platforms where just riscv-timer clocksource is present. > On platforms where other clock sources are available we want them to > register with vdso_clock_mode set to VDSO_CLOCKMODE_NONE. > > On the Renesas RZ/Five SoC OSTM block can be used as clocksource [0], to > avoid multiple clock sources being registered as VDSO_CLOCKMODE_ARCHTIMER > move setting of vdso_clock_mode in the riscv-timer driver instead of doing > this in clocksource_arch_init() callback as done similarly for ARM/64 > architecture. > > [0] drivers/clocksource/renesas-ostm.c > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Tested-by: Samuel Holland <samuel@sholland.org> > --- Applied, I had a trivial conflict which was fixed. Please have a look on the patch once it is push in the timers/next branch Thanks
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index e2b656043abf..9c687da7756d 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -12,7 +12,6 @@ config 32BIT config RISCV def_bool y - select ARCH_CLOCKSOURCE_INIT select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2 select ARCH_HAS_BINFMT_FLAT diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c index 8217b0f67c6c..42bee305e997 100644 --- a/arch/riscv/kernel/time.c +++ b/arch/riscv/kernel/time.c @@ -30,12 +30,3 @@ void __init time_init(void) of_clk_init(NULL); timer_probe(); } - -void clocksource_arch_init(struct clocksource *cs) -{ -#ifdef CONFIG_GENERIC_GETTIMEOFDAY - cs->vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER; -#else - cs->vdso_clock_mode = VDSO_CLOCKMODE_NONE; -#endif -} diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c index 55dad7965f43..c416e5e934bf 100644 --- a/drivers/clocksource/timer-riscv.c +++ b/drivers/clocksource/timer-riscv.c @@ -77,6 +77,11 @@ static struct clocksource riscv_clocksource = { .mask = CLOCKSOURCE_MASK(64), .flags = CLOCK_SOURCE_IS_CONTINUOUS, .read = riscv_clocksource_rdtime, +#if IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) + .vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER, +#else + .vdso_clock_mode = VDSO_CLOCKMODE_NONE, +#endif }; static int riscv_timer_starting_cpu(unsigned int cpu)