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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 A0FEDC47247 for ; Thu, 30 Apr 2020 16:18:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 772DE208C3 for ; Thu, 30 Apr 2020 16:18:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="llxRALtu"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="FWbHYicd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 772DE208C3 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+infradead-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=bombadil.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=ArtLQpcpxmutLkXcFkKd/mfdpTCiM3BDdOomCTaMXdk=; b=llxRALtuZBNEVJ be/22JbnS+w8NiCZ79jJRDgIDc9KQpehWrAViOxYorxjzx0A0Bgr6B7qQ863asZB4EOtJmCFBSrHh nNXZkCA9KW8zHnJiXWp1J/u2nJPIKlkM7XOHadGH1PUSo6Xh27mYvt6hEXlY3oEbNZ4bY1AYUt7Tb +Dx8QPcl4AG+YflwD0q785ZCFqF2SWaP38YAt3wG1g7gyNL8zXbvKo84Fg2/HjP908qd39syP5gDd tm4atzfIIpTs45nYeDR0aRhSiHSH9s3hkiaerBJ6XCVnQwI/77N8m06Ra+xj3tiNo9ipgjxd7MRX5 64qcGXBTDXcqLwH3CLig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUBtI-0003TG-GL; Thu, 30 Apr 2020 16:18:24 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUBtG-0003Sd-27 for linux-arm-kernel@lists.infradead.org; Thu, 30 Apr 2020 16:18:23 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 EE94220873; Thu, 30 Apr 2020 16:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588263501; bh=5R1P59XWFriRjxe5e4BwtfyFc/8B5tCSKlTVbm120WY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FWbHYicdfPDjjYeJPc0wx5uyaSBePyMtYHG2jq9/y3Rlj3rPkum04ZiSQO0BYAPhV G23qhA6RGP/lsaiuQobgqfndHcI8FOhOFgn7t8uKNyIQHmNPGohnUTGMARV8YBFbd6 Cvzu10wcz3BXUOIM4uUTYofcgbV5A4wsexskA3rI= Date: Thu, 30 Apr 2020 17:18:15 +0100 From: Will Deacon To: Peter Zijlstra Subject: Re: [PATCH] arm64: perf_event: Fix time_offset for arch timer Message-ID: <20200430161815.GE25258@willie-the-truck> References: <20200320093545.28227-1-leo.yan@linaro.org> <20200430145823.GA25258@willie-the-truck> <4d924f705245c797a19d3a73eb0c1ba0@kernel.org> <20200430160436.GC13575@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200430160436.GC13575@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200430_091822_127589_2D5DCF07 X-CRM114-Status: GOOD ( 11.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: Mark Rutland , Catalin Marinas , Mathieu Poirier , James Clark , Alexander Shishkin , Marc Zyngier , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Ingo Molnar , Al Grant , Leo Yan , Namhyung Kim , tglx@linutronix.de, Jiri Olsa , linux-arm-kernel@lists.infradead.org, Mike Leach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 30, 2020 at 06:04:36PM +0200, Peter Zijlstra wrote: > On Thu, Apr 30, 2020 at 04:29:23PM +0100, Marc Zyngier wrote: > > > I wonder if we could/should make __sched_clock_offset available even when > > CONFIG_HAVE_UNSTABLE_SCHED_CLOCK isn't defined. It feels like it would > > help with this particular can or worm... > > Errrgh. __sched_clock_offset is only needed on x86 because we transition > from one clock device to another on boot. It really shouldn't exist on > anything sane. I think we still transition from jiffies on arm64, because we don't register with sched_clock until the timer driver probes. Marc, is that right? > Let me try and understand your particular problem better. I think the long and short of it is that userspace needs a way to convert the raw counter cycles into a ns value that can be compared against values coming out of sched_clock. To do this accurately, I think it needs the cycles value at the point when sched_clock was initialised. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel