From nobody Sat Apr 11 12:31:05 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4646CC433FE for ; Mon, 7 Nov 2022 10:13:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231381AbiKGKNI (ORCPT ); Mon, 7 Nov 2022 05:13:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbiKGKNC (ORCPT ); Mon, 7 Nov 2022 05:13:02 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6285B2BC for ; Mon, 7 Nov 2022 02:13:00 -0800 (PST) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N5Rm0032PzpW35; Mon, 7 Nov 2022 18:09:19 +0800 (CST) Received: from M910t.huawei.com (10.110.54.157) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 7 Nov 2022 18:12:57 +0800 From: Changbin Du To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , CC: "H. Peter Anvin" , , , Changbin Du Subject: [PATCH] x86: use HW_BREAKPOINT_RW where possible Date: Tue, 8 Nov 2022 10:12:52 +0800 Message-ID: <20221108021252.605986-1-changbin.du@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use enum HW_BREAKPOINT_RW where possible instead of individual (HW_BREAKPOINT_R | HW_BREAKPOINT_W). Signed-off-by: Changbin Du --- arch/x86/kernel/hw_breakpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoin= t.c index 668a4a6533d9..cccfb446ce80 100644 --- a/arch/x86/kernel/hw_breakpoint.c +++ b/arch/x86/kernel/hw_breakpoint.c @@ -213,7 +213,7 @@ int arch_bp_generic_fields(int x86_len, int x86_type, *gen_type =3D HW_BREAKPOINT_W; break; case X86_BREAKPOINT_RW: - *gen_type =3D HW_BREAKPOINT_W | HW_BREAKPOINT_R; + *gen_type =3D HW_BREAKPOINT_RW; break; default: return -EINVAL; @@ -347,7 +347,7 @@ static int arch_build_bp_info(struct perf_event *bp, case HW_BREAKPOINT_W: hw->type =3D X86_BREAKPOINT_WRITE; break; - case HW_BREAKPOINT_W | HW_BREAKPOINT_R: + case HW_BREAKPOINT_RW: hw->type =3D X86_BREAKPOINT_RW; break; case HW_BREAKPOINT_X: --=20 2.25.1