From patchwork Thu Jul 16 05:11:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 11666671 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 88F0A60D for ; Thu, 16 Jul 2020 05:14:35 +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 5FB35207BB for ; Thu, 16 Jul 2020 05:14:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="McEDuWGK"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CyRfgRhB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FB35207BB 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:References:In-Reply-To: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:List-Owner; bh=Bt0Pi+7pIrIRcWMKMDyKxi9EJSQlzwo8kFtij0Zct4Q=; b=McEDuWGK8SWMpgShx30FIqF+tW Q/A7ILqApVTYe3zRpC7FJSGOXk+Hx56F4OQJB72TiI6zTgwXjj3X4ahcaOCJcraIDFkvHGGWb1aB5 zSBwMTcopz9FKWtBLCpP7hLIJwTp6/n2f00jpgG/2y1FPOzPW4epInx18lqCXyyBzPmUbKK7DWMuO F5nEuck9sXChbCrTeELH+qWexxscVZPEXVGS3JLYffQjC/Mgjo9dfa37HYSZwMOPwlYCvODyiXEKv PDgSvA/SXcUxGegXscDt9cZfiuACPhKlgWc4CTRBuQwxiXb0AfnoksVGa6L4LzOvkZUFI0sC1tg9S qcr2Tybg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvwCf-0005pT-8v; Thu, 16 Jul 2020 05:13:05 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvwCX-0005mt-Mb for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2020 05:12:58 +0000 Received: by mail-pg1-x544.google.com with SMTP id j19so4229892pgm.11 for ; Wed, 15 Jul 2020 22:12:57 -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:in-reply-to:references; bh=5uEgZcOvxySkXqr8EUPn06IShVdK3dXiQkAlG2OoJgw=; b=CyRfgRhBPlbJusvWZ2r6TphLSUqOHZjwFjCUPFk4b0NBT22sQeUDaJ717mzoDj3zAz MVUZsXUGOplDpyd9M+8GVQGshB2Mo8Lc0MKq7+iTRog7lrQJNWLmqK9tVvRtwlkEEUxt N6HKAb0924maFPbitUjI2O06iGLFFngf/67TSSZD+rtoVfQEvq+U6xUWIVZPgPziTcLY c03WrC2tRZeuCnvFXyccZWdySAfelGuPrVPtzSQFremFGc8NJWz6OROOUgjlpLvpZ6uF 0l88G612fXl0BSRTEIYHmPqU46PxFQ+xAh6chUdesCpDENSxsp97o6sL0yq0hFUMKw7i EB2Q== 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:in-reply-to :references; bh=5uEgZcOvxySkXqr8EUPn06IShVdK3dXiQkAlG2OoJgw=; b=gyAVcYf8i/ZJWygPnzRwDc85cchuWgvyOg4iBC1KVhlyUXAfO1UrCC5Azbk4BH09nr O5JTPcku4ccloobJvhwkYQ91m2ZEVgvJPqFIehBz6X/slCYwvde6GGxn/kv8wfSD4ula 3Ybl1CrPmZGHXdwtuu7UbWY0Gx74UdkINYPFNs9iJUJwsVsKAy1HL2Gz3pPw22n0Pi77 PfmGkGiybXDwDGCdCrNPop0DoV4Hnn+lxvLYOlSfUEQk8WA0sVWAYmBqlmugY1ho+YXq eqNKBiU1VxPMtV2uHfKyd5gSlK5Sz2464dWUI0MqJgdtwAV0+nyTAKpCa2tB7pBvTkA2 g7UQ== X-Gm-Message-State: AOAM532wLdNtgN1onIb8D9RxVeG6xE1XDQCNYfsiwL2L2ePNbLC/Fj69 JPUBCiUJ1aluKkIBfDOtPgU+5cOVD51Kqg== X-Google-Smtp-Source: ABdhPJyMvmCqRalWIJW5f9/g7nrURfOw7B8xkuE0x7liIs+vZhTKT7UKjFTL2WrzuJNWEe8iDMSN3A== X-Received: by 2002:aa7:988f:: with SMTP id r15mr2227739pfl.2.1594876375762; Wed, 15 Jul 2020 22:12:55 -0700 (PDT) Received: from localhost ([2400:8904::f03c:91ff:fe8a:bbe4]) by smtp.gmail.com with ESMTPSA id az13sm3449882pjb.34.2020.07.15.22.12.54 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Jul 2020 22:12:55 -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 7/7] tools headers UAPI: Update tools's copy of linux/perf_event.h Date: Thu, 16 Jul 2020 13:11:30 +0800 Message-Id: <20200716051130.4359-8-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200716051130.4359-1-leo.yan@linaro.org> References: <20200716051130.4359-1-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200716_011257_856009_C66DC299 X-CRM114-Status: GOOD ( 16.13 ) 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:544 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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.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 To get the changes in the commit: "perf: Add perf_event_mmap_page::cap_user_time_short ABI" This update is a prerequisite to add support for short clock counters related ABI extension. Signed-off-by: Leo Yan --- tools/include/uapi/linux/perf_event.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 7b2d6fc9e6ed..21a1edd08cbe 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -532,9 +532,10 @@ struct perf_event_mmap_page { cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */ cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */ - cap_user_time : 1, /* The time_* fields are used */ + cap_user_time : 1, /* The time_{shift,mult,offset} fields are used */ cap_user_time_zero : 1, /* The time_zero field is used */ - cap_____res : 59; + cap_user_time_short : 1, /* the time_{cycle,mask} fields are used */ + cap_____res : 58; }; }; @@ -593,13 +594,29 @@ struct perf_event_mmap_page { * ((rem * time_mult) >> time_shift); */ __u64 time_zero; + __u32 size; /* Header size up to __reserved[] fields. */ + __u32 __reserved_1; + + /* + * If cap_usr_time_short, the hardware clock is less than 64bit wide + * and we must compute the 'cyc' value, as used by cap_usr_time, as: + * + * cyc = time_cycles + ((cyc - time_cycles) & time_mask) + * + * NOTE: this form is explicitly chosen such that cap_usr_time_short + * is a correction on top of cap_usr_time, and code that doesn't + * know about cap_usr_time_short still works under the assumption + * the counter doesn't wrap. + */ + __u64 time_cycles; + __u64 time_mask; /* * Hole for extension of the self monitor capabilities */ - __u8 __reserved[118*8+4]; /* align to 1k. */ + __u8 __reserved[116*8]; /* align to 1k. */ /* * Control data for the mmap() data buffer.