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 29F11C54798 for ; Fri, 23 Feb 2024 12:52:57 +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:MIME-Version:References: Message-ID:Subject:Cc: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=3ODbJS6VzXnJ/sj4XJjVkhuS5fcIiWW/jGrzzQVxnR4=; b=XEqRG9e6uWDKay DCKiVuE9O4FIBjmomeJkawOvMEoAFUx2iCEks1lAvO3rDQcolp0pjOZWjvzjL+ocF8gYZraSFDm/r gPt0XALo7FPv3/Ordu8hJaLWS+S1JqkD2X7dDZocVzYLfO3dHKJaInLOczooK/67Xn7U/anuHUa9T 4bOZB+nkysMHkyswZgso6im8U2wGokAlaURFvRfvK63HYhSYSl8ntrLSsH5ZbvAvQQ08aX7LnJCDA ShsqGv9OjYxLJw/fHq5FwOeDrwYgVlg47r9AzMKQZy/E4wHQH/fTOjLJw8Jx9/pPGR6/LJZG01lqf c3XSf4caBNT3tM/hCGEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdV2a-00000009QF2-0XQD; Fri, 23 Feb 2024 12:52:36 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdV2V-00000009QEB-3Frg for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 12:52:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 26124CE2B2A; Fri, 23 Feb 2024 12:52:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20503C433F1; Fri, 23 Feb 2024 12:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708692749; bh=IyCj5keIAQfJYXAfP7hpyBP6OruhWQ1GZ9RjUxfZQm8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hHs2BTlAsibvTiPS5uMtGnbO95Z5CrS7S3+VfQE1MQ8ydoVDU/7TBA3sUrx8unWeS NlX6nPjBNeKzA3euVww5/83iSoXhurkXXlwPTVfMi8k+aHHcy/IxMkapQy924+3C4V l6tww2r6xsNFuJgm0/YJuYrO0A3LKH4hmiX6Jx56QpRoei7ASSTgjWPNRBRLsdivXv tO67neua4MvUrYTfJf2s3LCxJrvd8n9trzJ/GaCmK/nDPP+mpOSsJUajcf+uffxZt0 67YTFv9gvchP8jjUL+bp/QVlL8LBFFv/K0TzzsNo4hwAhPlH9qmcZ/ky2EMWm31rxe Ao7vrxxRrX4/w== Date: Fri, 23 Feb 2024 12:52:24 +0000 From: Will Deacon To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, broonie@kernel.org, Mark Rutland , Catalin Marinas , linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64/hw_breakpoint: Determine lengths from generic perf breakpoint macros Message-ID: <20240223125224.GC10641@willie-the-truck> References: <20240223113102.4027779-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240223113102.4027779-1-anshuman.khandual@arm.com> 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-20240223_045232_035721_6759C8F4 X-CRM114-Status: GOOD ( 15.63 ) 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 Fri, Feb 23, 2024 at 05:01:02PM +0530, Anshuman Khandual wrote: > Both platform i.e ARM_BREAKPOINT_LEN_X and generic i.e HW_BREAKPOINT_LEN_X > macros are used interchangeably to convert event->attr.bp_len and platform > breakpoint control arch_hw_breakpoint_ctrl->len. Let's be consistent while > deriving one from the other. This does not cause any functional changes. > > Cc: Will Deacon > Cc: Mark Rutland > Cc: Catalin Marinas > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > --- > This applies on v6.8-rc5 > > arch/arm64/kernel/hw_breakpoint.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c > index 35225632d70a..1ab9fc865ddd 100644 > --- a/arch/arm64/kernel/hw_breakpoint.c > +++ b/arch/arm64/kernel/hw_breakpoint.c > @@ -301,28 +301,28 @@ static int get_hbp_len(u8 hbp_len) > > switch (hbp_len) { > case ARM_BREAKPOINT_LEN_1: > - len_in_bytes = 1; > + len_in_bytes = HW_BREAKPOINT_LEN_1; I don't think we should do this. The HW_BREAKPOINT_LEN_* definitions are part of the user ABI and, although they correspond to the length in bytes, that's not necessarily something we should rely on. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel