Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp916592imm; Wed, 25 Jul 2018 08:17:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdRyCfkVJIwPytCbsOVkAbMXdwAWTvVHHCDodECViaovhr/8zvOlhEE36lVcuhNnuqB0OBL X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr21109632pla.147.1532531866687; Wed, 25 Jul 2018 08:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532531866; cv=none; d=google.com; s=arc-20160816; b=oAECR8I1GKlM4e+BYPM0LquiAHveZXafo3llD0+8edqX5p8NayoR4VET4vhAlGGkIk cA7ec8H1PB75b99EAC5m8vEs0tDP5UBijc7ydvFaEpH0qZGHIh+hcPFlxMicn6Q/fCoj dR6AumGK+LQQS3Rbpm9mK3K42rXF+vKiP9OAFob07EUB4LJdMde7RCUbYF5fQO/RDMvS ZwiaqvphJB7L5xxgYiCu3mYtEPZvlInkTFrdEC59AkkPPkUdGK9RLmmFyCle++1zSG+1 AxQxrCA9bwXLCMNAB3/h//HYh7vKe5hf7b96Bovra2aHwjOR4vxPMLGqDRWeUHWQp26T aGwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=HTzkthqztVlpyjp7xkMy9TnHQzQlRoo030Zw1+mKDMY=; b=kUttfkuRTv842XeqICLrrc0uBeiwifEzSRMLe2xG2UBpjw71A9hrQIs+J1++Uw5Akv bJ52TQczurKmwxAzOF8J9RP0WP3GM9kFKLbsS8Vt2WWbF8214BGrDb6PfhNhRDPXhZbE MqdX2hExMjRMOxAUUpsYbcWr73YqlCXnA2pt7yf5hHv3zxoWmvR463pZJh1EOScyqRpW iMKD9NLmSv3yYJNUFPb89QqVwFD7dCf7zUsa7qGZZkUdDBT88jBQZftxyqW4mcGiXbcV BwDl/fkYo699igs6+l61d5FtZYxDDiRt6dHGzqz3+PMXLv3KYltDw9zDQFGLox9O0saX quxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3-v6si13104899pld.457.2018.07.25.08.17.31; Wed, 25 Jul 2018 08:17:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728594AbeGYQ2t (ORCPT + 99 others); Wed, 25 Jul 2018 12:28:49 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40500 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbeGYQ2t (ORCPT ); Wed, 25 Jul 2018 12:28:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E60A618A; Wed, 25 Jul 2018 08:16:41 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B2BF53F575; Wed, 25 Jul 2018 08:16:41 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id A691E1AE0A03; Wed, 25 Jul 2018 16:16:41 +0100 (BST) Date: Wed, 25 Jul 2018 16:16:41 +0100 From: Will Deacon To: =?iso-8859-1?Q?J=2E_Agust=EDn_Vega-Fr=EDas?= Cc: Agustin Vega-Frias , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, Mark Rutland , Jeremy Linton , Catalin Marinas , Marc Zyngier , Lorenzo Pieralisi , "Rafael J. Wysocki" , Phani Pabba , Richard Ruigrok , Vijaya Kilari , Jeff Hugo , Rahul Ramasubramanian Subject: Re: [RFC V4 0/3] arm_pmu: acpi: variant support and QCOM Falkor extensions Message-ID: <20180725151641.GC6866@arm.com> References: <1530822201-5890-1-git-send-email-agustinv@codeaurora.org> <20180713153318.GB3049@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 15, 2018 at 03:35:45PM -0500, J. Agust?n Vega-Fr?as wrote: > On Fri, Jul 13, 2018 at 10:33 AM, Will Deacon wrote: > > I'm mostly ok with this approach, but I have a concern with the way in which > > the sysfs interface for carving up the config fields is implemented. If this > > is intended to be a strict extension to the armv8 pmu architecture, then I > > don't think you should be overriding the attr_groups entirely. Rather, you > > should be taking the attr_groups from pmuv3 and then extending them in a way > > which avoids overlapping field allocations by construction. > > > > As it stands, you already have an overlap between the pcc bit and the > > chained counter bit which Suzuki has implemented and it will be very easy to > > introduce API breakage if we don't enforce this as part of the design. > > > > Will > > FYI, I left Qualcomm on July 6, one of my former colleagues will submit > new iterations of this series. I will continue to comment on this and future > patchsets as a courtesy to my former colleagues and the community. > > Thanks for pointing out the sysfs issue. My suggestion on how to address it is: > > 1. Reserve config and config1 for architectural format attributes and > config2 for extension format attributes. > 2. Add a struct attribute ** parameter to the extension init function so > extensions can return the new attributes. > 3. The extension framework code in arm_pmu_acpi.c can then allocate a new > attribute array to contain the base and extension attributes and ensure > all the new attributes are on config2. > > Though a more elaborate approach can be implemented to find conflicts in > bit usage within config fields, it would require much more code for a > relatively simple problem. Thoughts? As long as you're happy to live inside config2, that sounds sensible to me. Will