From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94464C433DB for ; Tue, 12 Jan 2021 10:14:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C0E922CBE for ; Tue, 12 Jan 2021 10:14:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C0E922CBE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mKuG2X/G9cbdJulIvJL2fmzCH0ii/tpmZdgLsQtTU4c=; b=2PhZO3oqofLxtJdbDwwGQj9kx urBqZb6dxDPItTctknfAZmTIVlOXxkM9yxnd27ramOcANZqcjQSsYlDChDxGwfSRsvWqnG8tzneBE q7PEaqOLOTHKHrsiFDeKqUMmuEdZ+n49vqV2xUxMyiO8hR4hRYwrrz2MdZkhGvEEpvEct/oxs9UAF bIj2Z046Nsnfyv7jrr8PV+Jzqs+YSBqUa7Eep9EXXry/vQCqBnwxwCh/SGynCA8RAUM4+kh7WUvY9 +2gZ58OlohDoRIDGgchy1sY0wUzXf866jfmiIvhfAIs0sWd4mdzd/SoPeTKJBGFI280jad2OB+9pH zBr4x1kBQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGfe-0007hr-Vn; Tue, 12 Jan 2021 10:13:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGfb-0007gU-Q7 for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 10:13:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 94D4C31B; Tue, 12 Jan 2021 02:12:57 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.57.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E9EAB3F719; Tue, 12 Jan 2021 02:12:55 -0800 (PST) Date: Tue, 12 Jan 2021 10:12:47 +0000 From: Mark Rutland To: Chanho Park Subject: Re: [PATCH] clocksource/drivers/arm_arch_timer: export arch_timer_get_rate Message-ID: <20210112101247.GA34326@C02TD0UTHF1T.local> References: <20210112013140.35979-1-chanho61.park@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210112013140.35979-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_051259_925111_124600AA X-CRM114-Status: GOOD ( 20.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maz@kernel.org, Chanho Park , Daniel Lezcano , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 12, 2021 at 10:31:40AM +0900, Chanho Park wrote: > This patch adds to export arch_timer_get_rate function for calculating > absolute timestamp which is based on arch timer like below. > arch_timer_read_counter was already exported but arch_timer_get_rate > wasn't. Thus, this patch tries to export this to use this function from > loadable kernel module. Can you please explain /where/ this would be used? i.e. which module? Generally we try to avoid drivers depending on the specific clocksource, so I think there needs to be stronger rationale for exposing this. Thanks, Mark. > > u32 rate = arch_timer_get_rate() / (1000 * 1000); > u64 abs_ns = arch_timer_read_counter() * 1000 / rate; > > Cc: Mark Rutland > Cc: Marc Zyngier > Cc: Daniel Lezcano > Cc: Thomas Gleixner > Signed-off-by: Chanho Park > --- > drivers/clocksource/arm_arch_timer.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index d0177824c518..f3f49d96dbe9 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -961,6 +961,7 @@ u32 arch_timer_get_rate(void) > { > return arch_timer_rate; > } > +EXPORT_SYMBOL_GPL(arch_timer_get_rate); > > bool arch_timer_evtstrm_available(void) > { > -- > 2.23.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel