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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3CC54C61DA4 for ; Thu, 9 Feb 2023 03:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HJJXCGf/0PPpSOy+RxKoL+9ZA17QBekUAAPEHGhUSKg=; b=psKU9x5sYEZaum 6Ha1Z7191640K7M1zgihsIv8Gva7W+llJxldXfROBBLC5H6xXddnmRfptpQNp1Vd6mlevEgMB/3W0 6U/BB3HaMkdcS62mTVPfPmnDLpSuQfg/oeCGQ6vH0m59UIPE5SR0eHll17vfBWcNmoqG/SI3tTgu7 Rzl5GozJYqTEGE3VOXypaszlmLBR15cvh2WWIvG/rsYGPDsJhAFqwGmowZdPHxji6US3F1QvZg7q3 bQyeL41Ueop5SlWtPERNd3aRPzRyXA4UCPL5ELE4ANfMSIDD0KnzHxE954Zv5RWm9XQtl7yE4zKrP BfJ3GmPEEkyehgcGSi7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPxnx-0002ez-Vp; Thu, 09 Feb 2023 03:41:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPxnv-0002eN-AM for linux-arm-kernel@lists.infradead.org; Thu, 09 Feb 2023 03:41:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 47BB7150C; Wed, 8 Feb 2023 19:41:39 -0800 (PST) Received: from [10.162.40.17] (unknown [10.162.40.17]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A7DFD3F71E; Wed, 8 Feb 2023 19:40:54 -0800 (PST) Message-ID: <656cdc72-b01c-914e-9ace-59cc9fea572f@arm.com> Date: Thu, 9 Feb 2023 09:10:50 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH V7 3/6] arm64/perf: Add branch stack support in struct arm_pmu Content-Language: en-US To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon References: <20230105031039.207972-1-anshuman.khandual@arm.com> <20230105031039.207972-4-anshuman.khandual@arm.com> <0351f0bc-d94b-957f-8e03-6525e47d63a4@arm.com> From: Anshuman Khandual In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230208_194059_437369_F84CD5CA X-CRM114-Status: GOOD ( 14.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 2/9/23 00:56, Mark Rutland wrote: > On Fri, Jan 13, 2023 at 09:45:22AM +0530, Anshuman Khandual wrote: >> >> On 1/12/23 19:24, Mark Rutland wrote: >>> On Thu, Jan 05, 2023 at 08:40:36AM +0530, Anshuman Khandual wrote: >>>> struct arm_pmu { >>>> struct pmu pmu; >>>> cpumask_t supported_cpus; >>>> char *name; >>>> int pmuver; >>>> + int features; >>>> irqreturn_t (*handle_irq)(struct arm_pmu *pmu); >>>> void (*enable)(struct perf_event *event); >>>> void (*disable)(struct perf_event *event); >>> >>> Hmm, we already have the secure_access field separately. How about we fold that >>> in and go with: >>> >>> unsigned int secure_access : 1, >>> has_branch_stack : 1; >> >> Something like this would work, but should we use __u32 instead of unsigned int >> to ensure 32 bit width ? > > I don't think that's necessary; the exact size doesn't really matter, and > unsigned int is 32-bits on all targets suppropted by Linux, not just arm and > arm64. > > I do agree that if this were a userspace ABI detail, it might be preferable to > use __u32. However, I think using it here gives the misleading impression that > there is an ABI concern when there is not, and as above it's not necessary, so > I'd prefer unsigned int here. Makes sense, will this as unsigned int. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel