From: Changbin Du <changbin.du@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, <linux-kernel@vger.kernel.org>,
<hw.huiwang@huawei.com>, Changbin Du <changbin.du@huawei.com>
Subject: [PATCH] x86: use HW_BREAKPOINT_RW where possible
Date: Tue, 8 Nov 2022 10:12:52 +0800 [thread overview]
Message-ID: <20221108021252.605986-1-changbin.du@huawei.com> (raw)
Use enum HW_BREAKPOINT_RW where possible instead of individual
(HW_BREAKPOINT_R | HW_BREAKPOINT_W).
Signed-off-by: Changbin Du <changbin.du@huawei.com>
---
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_breakpoint.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 = HW_BREAKPOINT_W;
break;
case X86_BREAKPOINT_RW:
- *gen_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R;
+ *gen_type = 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 = X86_BREAKPOINT_WRITE;
break;
- case HW_BREAKPOINT_W | HW_BREAKPOINT_R:
+ case HW_BREAKPOINT_RW:
hw->type = X86_BREAKPOINT_RW;
break;
case HW_BREAKPOINT_X:
--
2.25.1
reply other threads:[~2022-11-07 10:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221108021252.605986-1-changbin.du@huawei.com \
--to=changbin.du@huawei.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=hw.huiwang@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®