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 9C854C48BF6 for ; Mon, 26 Feb 2024 04:23:14 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iPzjaNf7QxAs3XqR1iXwwhqyb6aUP0UJRATySM/3cQU=; b=h826ybAcAs7gZ2 92ofnxOqQrxLHeHzLGawr9c2gWvvLg8s2mDrV3J+yegm3bja14Y7sjMjGYOEj77qs/Aoa/YzVZIj8 T0XCkyHl0douKPxYtwV78pqe4kSkofWyo1seYJaTQmt12ILEu/92wk2cgB5A50YDrOFIBP2hVGlOR 0G1YNp9XIQzxcyuwsn+LluL64ihTKuxQFukDBcVRRU4VEV/Wd+wgvSVKXlQyzco/btbEn3oourqQA k4RTMLt+abK5FWBTiy6oJ5NOpavu4hX5pPw9JFAPZUBNfhgfIQ0/jqJkUq0kncF6JvKH9nLL/GI5h DcZ9HUqdrOlCWl0Mly3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1reSW7-0000000GQQY-4AdO; Mon, 26 Feb 2024 04:23:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1reSW5-0000000GQQ5-2oXv for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2024 04:23:03 +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 7744AC15; Sun, 25 Feb 2024 20:23:36 -0800 (PST) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.40.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E83233F6C4; Sun, 25 Feb 2024 20:22:54 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: broonie@kernel.org, mark.rutland@arm.com, Anshuman Khandual , Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org Subject: [PATCH] arm64/hw_breakpoint: Determine lengths from generic perf breakpoint macros Date: Mon, 26 Feb 2024 09:52:49 +0530 Message-Id: <20240226042249.4098185-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240125094119.2542332-2-anshuman.khandual@arm.com> References: <20240125094119.2542332-2-anshuman.khandual@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240225_202301_759425_D76F79F0 X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. 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 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; break; case ARM_BREAKPOINT_LEN_2: - len_in_bytes = 2; + len_in_bytes = HW_BREAKPOINT_LEN_2; break; case ARM_BREAKPOINT_LEN_3: - len_in_bytes = 3; + len_in_bytes = HW_BREAKPOINT_LEN_3; break; case ARM_BREAKPOINT_LEN_4: - len_in_bytes = 4; + len_in_bytes = HW_BREAKPOINT_LEN_4; break; case ARM_BREAKPOINT_LEN_5: - len_in_bytes = 5; + len_in_bytes = HW_BREAKPOINT_LEN_5; break; case ARM_BREAKPOINT_LEN_6: - len_in_bytes = 6; + len_in_bytes = HW_BREAKPOINT_LEN_6; break; case ARM_BREAKPOINT_LEN_7: - len_in_bytes = 7; + len_in_bytes = HW_BREAKPOINT_LEN_7; break; case ARM_BREAKPOINT_LEN_8: - len_in_bytes = 8; + len_in_bytes = HW_BREAKPOINT_LEN_8; break; } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel