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=-5.5 required=3.0 tests=BAYES_00,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 B798AC433E1 for ; Mon, 20 Jul 2020 10:55:42 +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 851742065E for ; Mon, 20 Jul 2020 10:55:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="crvRGp/1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PS5amjYV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 851742065E 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-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=IURApEPIAXinbB4y4if4R4p0Zezx3+JmtIEN3Xcqr0s=; b=crvRGp/1P0OY+1n76d7Jp9ajQ 31yKEZRwqt7mYalpxYKUigl3QAOjWhGU6ZYTOnyepl8/R53RYriIKZ8A1iM2Z4hTKP1Xu4D3rPIZ8 MeDfckwhNg/vZ6TnS1nITGvlnHq0aQ5DBn820NWtSRwcdbcmzc6fz5F4DE4+yLYJnOaCcVYi1cC59 zG0qNWnow5azqdCQpkx31MTME1di5tCSm5EW2QPnzqJfCNYosSwjh4KoUe78PAC08TwJyhI4GknFX zUrOsogo9290lyq26fuZUoPFPPkNcsIAk3P/w/HYvxJxodz1igCpVf8XAEktektVq472aKEuGYsd7 y1h2j90EQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxTR4-0004DM-8G; Mon, 20 Jul 2020 10:54:18 +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 1jxTR1-0004CV-Cp for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 10:54:16 +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 E614E2068F; Mon, 20 Jul 2020 10:54:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595242454; bh=SCRhSZR4EXlD5UHDQ82Q4Rez0JRwUrmYwlR/DjbXzWY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PS5amjYVMT2Am53EEuDZYF5jdddtDp3w7fuXV3cZeWoKl4LCxcWaWPVv8UbHnR9ev nXKvx93ICO1SodYagGe0AjpzbiyBcl4Eg0wFT0l/ha99nUUHB3jizc2YpuggoUIdlJ axOxaJYK9kXaud2YFnTfuHUNvvaVL9os5obWVpeE= Date: Mon, 20 Jul 2020 11:54:10 +0100 From: Will Deacon To: Mark Rutland Subject: Re: [PATCH v3 1/3] arm64: perf: Add support caps in sysfs Message-ID: <20200720105410.GD11516@willie-the-truck> References: <1592487344-30555-1-git-send-email-zhangshaokun@hisilicon.com> <20200720101518.GA11516@willie-the-truck> <20200720105019.GA54220@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200720105019.GA54220@C02TD0UTHF1T.local> 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-20200720_065415_501328_57D5CD8F X-CRM114-Status: GOOD ( 21.49 ) 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: Shaokun Zhang , 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 On Mon, Jul 20, 2020 at 11:50:19AM +0100, Mark Rutland wrote: > On Mon, Jul 20, 2020 at 11:15:19AM +0100, Will Deacon wrote: > > On Thu, Jun 18, 2020 at 09:35:42PM +0800, Shaokun Zhang wrote: > > > > +static umode_t > > > +armv8pmu_caps_attr_is_visible(struct kobject *kobj, struct attribute *attr, > > > + int unused) > > > +{ > > > + int pmuver = armv8pmu_get_pmu_version(); > > > + > > > + if (pmuver >= ID_AA64DFR0_PMUVER_8_4) > > > + return attr->mode; > > > > Is this sufficient? I'm a bit confused by the text in the Arm ARM that says: > > > > | If ARMv8.4-PMU is implemented: > > | * If STALL_SLOT is not implemented, it is IMPLEMENTATION DEFINED whether > > | the PMMIR System registers are implemented. > > | * If STALL_SLOT is implemented, then the PMMIR System registers are > > | implemented. > > > > whereas the register description for PMMIR_EL1 says: > > > > | This register is present only when ARMv8.4-PMU is implemented. > > I think this is trying to say that when ARMv8.4-PMU is not implemented, > PMMIR definitely isn't implemented (i.e. the the presence of PMMIR_EL1 > implies the presence of ARMv8.4-PMU). > > > Mark -- please could you clarify whether or not we need to check STALL_SLOT > > as well as the PMUVer? > > Given the explciit wording that it's IMP DEF, I suspect that we need to > check both. > > I'll go chase this up. Thanks. In the meantime, Shaokun, can you send updated versions of the first two patches, please? We'll play it safe and check STALL_SLOT as well pending Mark's findings. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel