Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1099222rbb; Sun, 25 Feb 2024 20:26:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU1076CKC12LE8huOEFiJ/7q7t8W9s2giU+YYz0KcRjCDXZFEmwsNo6QDN8uB5s8M5WyypQI6gqlNyOibMvk9SNz7JOyemZv1vXt2jtUQ== X-Google-Smtp-Source: AGHT+IEfPMCRSVlsiG6elBj7y+ApoRzjm0fHHpN3cwhfa0GKgBODb6+2UzvPyYLzHLXuU3SOVw8c X-Received: by 2002:a17:902:6e10:b0:1db:ea2b:d2c4 with SMTP id u16-20020a1709026e1000b001dbea2bd2c4mr6108563plk.15.1708921606455; Sun, 25 Feb 2024 20:26:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708921606; cv=pass; d=google.com; s=arc-20160816; b=puNDWRwb0BIXiDJMwiO5X6sPneiBvL/ZgaUcEAuhVpDRO/9ifqJj+LtvmdbelpKuHd GB6X3xgoTKupdQ38txboSX+U3ePtT+hvSuildMV/3tz6t9zJt2iMoW4RbbTpEwngUmCC tixfLBjQpmkpL8EDhvaAlGoTfN4VXSW4yE7Sp7Aiz27dYwa1YytBDbiZUL45g4RNRdlq eaBPqZ41gez3Qrv7iwAf2//5BZfyG7ajjoFozAvBf/DQB/nGsCEEXVQdfQ/4dZacsPtf Dh1yvvbeQ6jrVzx7QF1Rq0ApWZxiU0R9LKTb9GZ6jGq+BhtuoLlrNLIqA56o0czZrNMn 0hOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=PTpr8SGTXQgFsycFzDmWz/Ev8ETdBQzcf+QxA940hJ0=; fh=5PxL2nMQJmO3nEbvX2rK8Gvz7tYT7/7jdXYwA57IMEA=; b=N3lT73sz+IK/fM+llAaM/hnYrlY3ogLvWgUg0ur0fqMZ9M23nzArTEXmnXwJj06Lu4 tdfqKPXJ6pooaXCUlD3BHWalurVTL/w0uaTy6sOdc9BxHZpDiLeq2sWzwKZTD4DDl8y2 cCDeY12Brt7/cIiBy5d7C9VIRpOmY1Q6lHm/Pi6KmCRXp4GYXRO6n+0pkZy1RD94nVSI h+qcL9SDZdQVC2mDODkiwitjbETZ/NBkFD0QZ7xQvNnUUnLCcKXLv1xkA2pYcOH5+shT OykcONoq9sdLr7VNAO8jZlT5Wuc6TaKRyFBuGT9+dD7uIuVWv78EhNvrBxbrgE0fyjoJ ob8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-80550-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80550-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y12-20020a170902ed4c00b001dc41a33ad0si3037969plb.491.2024.02.25.20.26.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 20:26:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80550-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-80550-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80550-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C91328250C for ; Mon, 26 Feb 2024 04:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 360201B5AD; Mon, 26 Feb 2024 04:26:41 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3108A1B270 for ; Mon, 26 Feb 2024 04:26:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708921600; cv=none; b=JN5jZojENkwbLknr2BQydIxr9xNlvG+qnHzS5/m/IEk6h3SivHDJ628EVmXSx8xlPp3VyjVOPYgF9BmDo+r6aGOAKveYl96hLPTanw9CBO+grLVyk2ICEVgHKwMvB5VuR3QirByxc5bqFdUTwucDkRt+PYCRQqsK0tVAY/cd6Ag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708921600; c=relaxed/simple; bh=kN/30hnphBLUZUDAalCs0F00ZD4Mmo4HCmywnZe6880=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=V7GBxQhqBVy8xQHzimjWUy02TZi18hsRkl8y9JCetvd26bYJI7jU8GIKdHBJeyf6IvK45JbFFAOrf7Z0HK35PK+XYeP1LkamjUcP0dbohDJKJ5/snB49adWLbmSAfBg2FZ6Pym32mztsJ1Fvn0DYq/Kxoh8ZWukGIV2k7GFSFbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 74762C15; Sun, 25 Feb 2024 20:27:17 -0800 (PST) Received: from [10.162.40.19] (a077893.blr.arm.com [10.162.40.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9D8C73F6C4; Sun, 25 Feb 2024 20:26:36 -0800 (PST) Message-ID: <21ee46a1-5e5a-4e8a-b1ba-e7f26c39e325@arm.com> Date: Mon, 26 Feb 2024 09:56:33 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] arm64/hw_breakpoint: Determine lengths from generic perf breakpoint macros Content-Language: en-US To: linux-arm-kernel@lists.infradead.org Cc: broonie@kernel.org, mark.rutland@arm.com, Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org References: <20240125094119.2542332-2-anshuman.khandual@arm.com> <20240226042249.4098185-1-anshuman.khandual@arm.com> From: Anshuman Khandual In-Reply-To: <20240226042249.4098185-1-anshuman.khandual@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/26/24 09:52, 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; > 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; > } > Please ignore this. Wrong patch got picked up in the git send-email :)