[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <166201996923.401.194772760546834930.tip-bot2@tip-bot2>
Date: Thu, 01 Sep 2022 08:12:49 -0000
From: "tip-bot2 for Marco Elver" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Marco Elver <elver@...gle.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Ian Rogers <irogers@...gle.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf/hw_breakpoint: Mark data __ro_after_init
The following commit has been merged into the perf/core branch of tip:
Commit-ID: db5f6f853194c5e02d8551425b5e86b7e0b81806
Gitweb: https://git.kernel.org/tip/db5f6f853194c5e02d8551425b5e86b7e0b81806
Author: Marco Elver <elver@...gle.com>
AuthorDate: Mon, 29 Aug 2022 14:47:10 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 30 Aug 2022 10:56:21 +02:00
perf/hw_breakpoint: Mark data __ro_after_init
Mark read-only data after initialization as __ro_after_init.
While we are here, turn 'constraints_initialized' into a bool.
Signed-off-by: Marco Elver <elver@...gle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Dmitry Vyukov <dvyukov@...gle.com>
Acked-by: Ian Rogers <irogers@...gle.com>
Link: https://lore.kernel.org/r/20220829124719.675715-6-elver@google.com
---
kernel/events/hw_breakpoint.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index 6d09edc..7df46b2 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -46,7 +46,7 @@ struct bp_cpuinfo {
};
static DEFINE_PER_CPU(struct bp_cpuinfo, bp_cpuinfo[TYPE_MAX]);
-static int nr_slots[TYPE_MAX];
+static int nr_slots[TYPE_MAX] __ro_after_init;
static struct bp_cpuinfo *get_bp_info(int cpu, enum bp_type_idx type)
{
@@ -62,7 +62,7 @@ static const struct rhashtable_params task_bps_ht_params = {
.automatic_shrinking = true,
};
-static int constraints_initialized;
+static bool constraints_initialized __ro_after_init;
/* Gather the number of total pinned and un-pinned bp in a cpuset */
struct bp_busy_slots {
@@ -739,7 +739,7 @@ int __init init_hw_breakpoint(void)
if (ret)
goto err;
- constraints_initialized = 1;
+ constraints_initialized = true;
perf_pmu_register(&perf_breakpoint, "breakpoint", PERF_TYPE_BREAKPOINT);
Powered by blists - more mailing lists