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=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 1F26DC433E6 for ; Wed, 13 Jan 2021 10:08:04 +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 B76EF23370 for ; Wed, 13 Jan 2021 10:08:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B76EF23370 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sOnlgpRdF5UZ6zQsNsWU7MZ5w79xQTj7xPo8XKFJ0h8=; b=kQbXda9p5KCLMqN/+H/0z3NQB /XF35TlvX8syzXvPYcESpjWhWZfehAJF0ih4bd4zb1uGdOJNJsrgO8B1xrh+bsOJDmFfUxZhhldMC GLoMESUcLm9PLLCoYVJwW+IMaUL5p49hHtEe+vrDUeeoM7i/kUFkN7zA7mkF0cpFMSTpWiLcXXy8z 3vT4G6Ex1aCU0xpBxHaFrjPkTgVMGLZ3GcYzZNkLTwaPONhOs/RFP5yf0TfcHJ9/ZD9/a3Z1O6Q2+ anuuXxGmxfeI2/g/B6n8SxnWuN63fVSLKtWGkN6HeUzd3kCAq4tgxDaCtXMZDA6ZA+L44iZIA43NA ifIx1FqdA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzd33-0004i7-3G; Wed, 13 Jan 2021 10:06:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzd30-0004hA-PZ for linux-arm-kernel@lists.infradead.org; Wed, 13 Jan 2021 10:06:39 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 96CC923359; Wed, 13 Jan 2021 10:06:37 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kzd2x-007Ddo-2m; Wed, 13 Jan 2021 10:06:35 +0000 MIME-Version: 1.0 Date: Wed, 13 Jan 2021 10:06:34 +0000 From: Marc Zyngier To: Chanho Park Subject: Re: [PATCH] clocksource/drivers/arm_arch_timer: export arch_timer_get_rate In-Reply-To: <00ba01d6e992$611fa850$235ef8f0$@samsung.com> References: <20210112013140.35979-1-chanho61.park@samsung.com> <20210112101247.GA34326@C02TD0UTHF1T.local> <7123dff576287de381c93abb88d9e283@kernel.org> <00ba01d6e992$611fa850$235ef8f0$@samsung.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <5621b8a1fd75c4aaecd91663bda67fe6@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: chanho61.park@samsung.com, parkch98@gmail.com, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, daniel.lezcano@linaro.org, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210113_050638_920535_F9CACD80 X-CRM114-Status: GOOD ( 20.32 ) 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: 'Mark Rutland' , 'Thomas Gleixner' , 'Daniel Lezcano' , linux-arm-kernel@lists.infradead.org, 'Chanho Park' Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-01-13 09:56, Chanho Park wrote: > Hi Marc, [...] >> Well, you can compare the raw counter values, and do the conversion in >> a >> single place. Also, if your system is correctly configured, you have >> access to CNTFRQ_EL0, which contains the same thing as >> arch_timer_get_rate(). > > To convert the value in the single place, we may need to use inter-VM > communication so that it makes quite complex design/implementation for > me. > Regarding CNTFRQ_EL0, I already tried to read it by > arch_timer_get_cntfrq > but I got '0'. It looks like different according to the system. That's a bug in your firmware that you should consider fixing. The architecture and the arm64 boot protocol are pretty explicit that CNTFRQ_EL0 must contain the frequency of the timer, and be initialised on all CPUs. You are probably using some DT property to advertise the frequency, which is very much discouraged. >> >> >> So this symbol is probably used by a module *inside* the VMs, and >> >> Mark's question still stands. >> >> >> > >> > Yes. Actually, we use this timestamp for our internal module which is >> > not yet upstreamed. >> >> If the module code is not upstream, I don't see the point in exporting >> this symbol. I suggest you post both as a series so that we can decide >> whether that is a good idea or not. > > Well, I'm not sure the module can be upstream because it's definitely > necessary only to analyze a panic in my hypervisor system. Let me find > a > better way to expose this. If your module doesn't make sense in the upstream kernel, then exporting the symbol doesn't make much sense either. M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel