From patchwork Thu Jul 16 05:11:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 11666657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9706860D for ; Thu, 16 Jul 2020 05:13:32 +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 6627D207BB for ; Thu, 16 Jul 2020 05:13:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DkANtZgt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Za/sOcxJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6627D207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MNtMT9uXJGwJRRqP2cC1va4Jt+S3nBq0/1fq+EVhDCk=; b=DkANtZgtL7K0DXqDomOMbq3iC9 UWtrewLjHTjBdGhO60f5GZqzISeXcgCeG3IQLzZ3TTwvB+F3APi15QaWs+iohfQ0PenoQsR9eZy5h 7aEndhkpDHUN/HWwyx0MBE9INK69r214rLR52Wz28a/cZxe1qQ2m+KxlqENxiIWhxM/oBJOR/Lq7b y2OUD5U4DGKTpcIRyWJtwJXZLvNZUdMKHuxVZU6zSpJ4ZPdTNfqPywm+CzrCrdm7Y97ciM+vSAS0I 6RPEgeedF2pOttPQNdcgPi833sDOVLZBmMeAQU3hy1NE6kx+yoTsU9Q2UxpPWKNxtDwyFwIBiVpZs DVuyTETQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvwBZ-0005Rz-Mk; Thu, 16 Jul 2020 05:11:57 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvwBW-0005Qi-0M for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2020 05:11:55 +0000 Received: by mail-pf1-x442.google.com with SMTP id q17so3127253pfu.8 for ; Wed, 15 Jul 2020 22:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ig+Pz0HvOxBec7mSBcRcKr3V9Zl8Ma01mbpSkhfzxHQ=; b=Za/sOcxJGOG3wt1UvmCh3w0KQ9uZrZoFgdVX2u+PCGoFZjQXtZ/aLB4tmQI1s1fOj6 eNQOijKwq467jqwkqiv40fiTJjrT7GravSYEfAI1jxQxd0ZYhaDn+JaZFUNEaOUj95+H aMvle/21tW7bIKvpI7Uc42vgCdi723IgCcmxMq1TnuUp0JDtVf2DlhUh13jLdzTARxED TrlILdqXtw36c3cZzZ6iyvfc6+yHWAH0EAW6hCm3AJ7EXRPYaAoYjEaE4bZZmhun2hcB QpkdHlic6fmRD9P601IfDQgdm+LC7L5vB4qP6kSzflf7yirYc0QJwCJBMMlpfTuQ+TTe 563w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ig+Pz0HvOxBec7mSBcRcKr3V9Zl8Ma01mbpSkhfzxHQ=; b=UIUby2+JkGAjQ71aixfZJwIYMlGkUDYmj+ip8Qp6D5YI4iiQ/P7oJSLD5ux4aK5Q70 YXskQkkqsl3wnMps4b21YKysD/Wes+2uAwKzBbf7kvehOsEPwiaZp17OfAFNKXx8yoS+ AbWu2bd0TyfZENWlalefIneFLh3ibmy/oLxo/hdoPuZ9o0bmo56CM7FXqdPDNDJUHvsb 70cM8SpxVsqj5RICYOeGxGDmj45ANGxtOO3BTmkXlL08q8HR8efiilLatW6ifi0fPTAU LOf0HvBAhfZXNwIPEHT7AMm3AL1L+mbdZCre95kJkDnGUzSy2P/DPYkeWU1fopXpGEKR QhoQ== X-Gm-Message-State: AOAM531KQJ6sPy02KWOTFy3NUectcjcbmTh1h+59EkdhQM4wc4t/B7e3 jpi/bzZRAoeGQ2bh6weK4wI0/qfxXdOyhA== X-Google-Smtp-Source: ABdhPJytphd2kofWJjJYe1jPA/1m0TOD9T+g7Bq7P//Mnf57T4ygPu+Nf2NAUeZNAHOQCEOrHAwNGA== X-Received: by 2002:a63:7e55:: with SMTP id o21mr2829176pgn.263.1594876310048; Wed, 15 Jul 2020 22:11:50 -0700 (PDT) Received: from localhost ([2400:8904::f03c:91ff:fe8a:bbe4]) by smtp.gmail.com with ESMTPSA id g4sm3737878pgn.64.2020.07.15.22.11.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Jul 2020 22:11:49 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Will Deacon , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Catalin Marinas , Thomas Gleixner , "Ahmed S. Darwish" , "Ben Dooks (Codethink)" , Paul Cercueil , Adrian Hunter , Kan Liang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/7] arm64: perf: Proper cap_user_time* support Date: Thu, 16 Jul 2020 13:11:23 +0800 Message-Id: <20200716051130.4359-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200716_011154_393673_22702F09 X-CRM114-Status: GOOD ( 10.95 ) X-Spam-Score: 3.4 (+++) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (3.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:442 listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2400:8904:0:0:f03c:91ff:fe8a:bbe4 listed in] [zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: Leo Yan MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch set is rebased for Peter's patch set to support cap_user_time/cap_user_time_short ABI for Arm64, and export Arm arch timer counter related parameters from kernel to Perf tool. After get feedback from Ahmed, this patch set contains Ahmed's new patch to refine sched clock data accessing with raw_read_seqcount_latch(). This patch set has been rebased on mainline kernel with the latest commit 994e99a96c9b ("Merge tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86 into master"); it has been verified with Perf tool for Arm SPE timestamp enabling. Changes from v2: - Included Ahmed's patch to use raw_read_seqcount_latch() for sched_clock's seqcount latching; - Changed to use mul_u64_u32_shr() for converting counter to ns in Arm64's arch_perf_update_userpage() (PeterZ). Ahmed S. Darwish (1): time/sched_clock: Use raw_read_seqcount_latch() Leo Yan (1): tools headers UAPI: Update tools's copy of linux/perf_event.h Peter Zijlstra (5): sched_clock: Expose struct clock_read_data arm64: perf: Implement correct cap_user_time arm64: perf: Only advertise cap_user_time for arch_timer perf: Add perf_event_mmap_page::cap_user_time_short ABI arm64: perf: Add cap_user_time_short arch/arm64/kernel/perf_event.c | 57 ++++++++++++++++++++------- include/linux/sched_clock.h | 28 +++++++++++++ include/uapi/linux/perf_event.h | 23 +++++++++-- kernel/time/sched_clock.c | 41 ++++++------------- tools/include/uapi/linux/perf_event.h | 23 +++++++++-- 5 files changed, 124 insertions(+), 48 deletions(-)