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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 977C3C433DB for ; Wed, 13 Jan 2021 09:58:15 +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 1BA7C2339D for ; Wed, 13 Jan 2021 09:58:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BA7C2339D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.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:References:MIME-Version:Message-ID:Date:Subject: In-Reply-To:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vYjeyBhNDVKKxCpQGS5thvtB5y4UAroaSI+I3XpDlaY=; b=Qh010KlMWjqTp28FpXXlmdix0 wdgNjHiAOUSSQdjYK9R2IAatAPm8cpvgbwutX8R8CeZkn3dO6tNGo9b5Ixb6TrU3nE+qiXvQtKhop 4PQWTtnlCr4L2eVxh+bXQO4lcykAh92y3hEmAOBmUwNDs1Ckbea5WXeJe6Mc6/rO3XPMmrykoJPX8 R+/1zJgfL+MdNk0Gf3Z62CUdSDHvx4kBmubY1Tngv6rgy+Nonuex0MybM87HIyouq2wzENFvsYxy3 Lrf6KdeVS5LPzv762UDLH56VFwvJBdlSKpi5HXI8iWXh/M7gmQMNEYf8/7fTzDKQUmQESGwndMq1N gMSBPM6+Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzctT-0002Ar-0N; Wed, 13 Jan 2021 09:56:47 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzctP-0002AM-2T for linux-arm-kernel@lists.infradead.org; Wed, 13 Jan 2021 09:56:45 +0000 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210113095638epoutp0215fb872d3ba4fc402edc82633440c32a~ZwiNO6Azs0447604476epoutp02L for ; Wed, 13 Jan 2021 09:56:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210113095638epoutp0215fb872d3ba4fc402edc82633440c32a~ZwiNO6Azs0447604476epoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1610531798; bh=NcqRE4SZi3fFjghlAO84/14GZMCNLT2Nvhn7juy+AEA=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=ILv27ZyQwavU9DrjlxzoS2C7DgEhC6VIs7I/Vmxjyggzvf/qMqIuWDlRQN3UgGL/N bZN+CWdxaN5mtEk8YgTaAziukVHRJdxG2ZIMlSfVzCnOptz1nod20HfvfPIgrXhMMY e1rL6ZHnLSKZgr6+ocm33/8x/jjZG0Fzl8VHmgmU= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210113095638epcas2p2333bf504fdb458228cd3608598f7e602~ZwiM1li0b1871518715epcas2p2h; Wed, 13 Jan 2021 09:56:38 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.188]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4DG2sJ2YmSz4x9Q1; Wed, 13 Jan 2021 09:56:36 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 54.80.52511.4D3CEFF5; Wed, 13 Jan 2021 18:56:36 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20210113095635epcas2p10ebf79dfc85a8e96c64987cfdc15338c~ZwiKtNi5T1623916239epcas2p1R; Wed, 13 Jan 2021 09:56:35 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210113095635epsmtrp2b08d5455116d24d4f5918316573a8da5~ZwiKsY4HK1661316613epsmtrp2i; Wed, 13 Jan 2021 09:56:35 +0000 (GMT) X-AuditID: b6c32a48-50fff7000000cd1f-02-5ffec3d4b11e Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 73.BC.08745.3D3CEFF5; Wed, 13 Jan 2021 18:56:35 +0900 (KST) Received: from KORCO039056 (unknown [10.229.8.156]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210113095635epsmtip15df095164838ddf79a2b0196aafcd65b~ZwiKgx02w2789627896epsmtip1B; Wed, 13 Jan 2021 09:56:35 +0000 (GMT) From: "Chanho Park" To: "'Marc Zyngier'" , "'Chanho Park'" In-Reply-To: Subject: RE: [PATCH] clocksource/drivers/arm_arch_timer: export arch_timer_get_rate Date: Wed, 13 Jan 2021 18:56:35 +0900 Message-ID: <00ba01d6e992$611fa850$235ef8f0$@samsung.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQK5ZEGIyaGFcgUOoXPh9p7oJ8CwZQFImrdzAh9YUPcB2YGg3wM2j2M+AgDDlVABR90IkKgBrSEA Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJJsWRmVeSWpSXmKPExsWy7bCmue6Vw//iDaa/ErSY91nWYtPja6wW S69fZLLYOeckq8X79wvZLDZvmsrswOaxZt4aRo+ds+6ye2xa1cnmcefaHjaPd+fOsXtsXlIf wBaVY5ORmpiSWqSQmpecn5KZl26r5B0c7xxvamZgqGtoaWGupJCXmJtqq+TiE6DrlpkDdIWS QlliTilQKCCxuFhJ386mKL+0JFUhI7+4xFYptSAlp8DQsECvODG3uDQvXS85P9fK0MDAyBSo MiEnY8LiLraCbrmKxcc/sTQwnhXvYuTkkBAwkfh/toW9i5GLQ0hgB6PE/f2HmCCcT4wSs5Y9 ZoNwPjNKND9fxAzT8vfaHBaIxC5GiYV9P6CcF4wSbyafZgOpYhPQl3jZsY0VxBYR8JZoedbI ClLELLCRUWL9vjVgCU4BK4l991+AjRUWCJW4teQ2I4jNIqAqsXvFeiYQm1fAUuLI/7lsELag xMmZT1hAbGYBeYntb+dAnaQg8fPpMqhlURJ/z7czQtSISMzubGMGWSwhsJJDYnPjflaIBheJ xX8PM0LYwhKvjm9hh7ClJD6/28sG0dDNKNH66D9UYjWjRGejD4RtL/Fr+hagQRxAGzQl1u/S BzElBJQljtyCuo1PouPwX3aIMK9ER5sQRKO6xIHt01kgbFmJ7jmfWScwKs1C8tksJJ/NQvLB LIRdCxhZVjGKpRYU56anFhsVmCBH9yZGcBrV8tjBOPvtB71DjEwcjIcYJTiYlUR4i7r/xgvx piRWVqUW5ccXleakFh9iNAWG9URmKdHkfGAizyuJNzQ1MjMzsDS1MDUzslAS5y0yeBAvJJCe WJKanZpakFoE08fEwSnVw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F3aSalVWsZ9nVWt/9r3vJNC7wbdh7qxN 8aECEvsSmmd4t4Vtur8s97PiVc7Fm5dJLHGYUhP27Vrc/68N0hJnVk5vm11u9i/ts5TmiUlO X+JPyOv6nHj+cOqRjFl3dubLnPSSbwtJvTp3ef/qp/EeHyaJ3dtwQcpid0mXeLi+TUSzT/7M hb37mRacvD834aJQfU5Z2o5P2U0zlZZ8d+xU3u7GrB9z+AQf66ddbdZRldntH644GF4XWsXu s/ZkMYfPDd2gvkNSe7/+sy5edX4qR9fu7XNYdC4osRRnJBpqMRcVJwIAALC2ji0DAAA= X-CMS-MailID: 20210113095635epcas2p10ebf79dfc85a8e96c64987cfdc15338c X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210112153042epcas2p4170a4dd67fe2120a63930f6c9b0bc9b3 References: <20210112013140.35979-1-chanho61.park@samsung.com> <20210112101247.GA34326@C02TD0UTHF1T.local> <7123dff576287de381c93abb88d9e283@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210113_045643_710269_4BF15475 X-CRM114-Status: GOOD ( 38.80 ) 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 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 Hi Marc, > -----Original Message----- > From: Marc Zyngier > Sent: Wednesday, January 13, 2021 12:31 AM > To: Chanho Park > Cc: Mark Rutland ; linux-arm- > kernel@lists.infradead.org; Chanho Park ; > Daniel Lezcano ; Thomas Gleixner > > Subject: Re: [PATCH] clocksource/drivers/arm_arch_timer: export > arch_timer_get_rate > > Chanho, > > On 2021-01-12 15:14, Chanho Park wrote: > > Hi Marc, > > > > On Tue, Jan 12, 2021 at 11:45 PM Marc Zyngier wrote: > >> > >> On 2021-01-12 13:39, Chanho Park wrote: > >> > Hi, > >> > > >> >> 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. > >> > > >> > I need a system-wide timestamp which can be available from > >> > bootloader and kernel stages including virtual machines. > >> > Actually, it's necessary to record a timestamp of each log message > >> > for system-wide debugging on type-1 hypervisor. > >> > RTC can be used for this purpose but we should make it to > >> > hypervisor awareness. > >> > |---------------|-------------------------| > >> > Bootloader VM1 (Guest) > >> > |-------------------------| > >> > VM2 (Guest) > >> > > >> > So, the easiest way is using the arm architect timer's timestamp > >> > because it's already supported on each VM by the hypervisor. > >> > >> This doesn't make much sense. The hypervisor and the VMs are > >> independent software entities, and they don't use symbols from each > >> other. > > > > I meant that each VM needs to be synchronized by the ARM arch timer's > > timestamp not the symbol itself. > > The symbol is necessary to calculate the system-wide time by the > > timestamp(counter) value. > > > > The counter of the arm architect timer will be increasing from the > > bootloader. > > The hypervisor will not reset the counter and each VMs as well. So, we > > can use this timestamp for comparing _real_ time :) > > 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. > > >> 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. Best Regards, Chanho Park _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel