From nobody Mon Apr 6 23:08:50 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 51320ECAAD1 for ; Thu, 1 Sep 2022 08:14:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234060AbiIAINh (ORCPT ); Thu, 1 Sep 2022 04:13:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233940AbiIAIMy (ORCPT ); Thu, 1 Sep 2022 04:12:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D9612BF74; Thu, 1 Sep 2022 01:12:51 -0700 (PDT) Date: Thu, 01 Sep 2022 08:12:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1662019970; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uCdb/nlwiFpiF5+XvQwhBLBYsJZY7IhGqVNuaXwEkcA=; b=JgDdw90am9NrH8lJb6upsXHPUGDWciMghpVY1REKNF0cQObIikqo/tdH7vxl4VhvI60DDs GKwlt4bRo6TU9FaStSb+fpB1BwOM8Q4ETFWukC8dXY5bBRxkCQJv1uACWO1n01EmZNa2Un xLexFSUcX+fvezW9hAflpvsxK0W5gMyNai4Aik6JruoMEUZnKEQwqo4x77hBg7ubLFRe1O XIpFHDXPD2o0mLoCY5iF1Z10AoQ60ixEOA4oPs54ZOLsoEubfGa7q28khmLR+fY+SElBNa VGZZPF6YXJ/DkA2ZU96LDBWN8EAlr9jXirdTVtXp43qcic8dbEI28C1HL7FfBQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1662019970; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uCdb/nlwiFpiF5+XvQwhBLBYsJZY7IhGqVNuaXwEkcA=; b=9N5hA7rtjR2RrHLRYBbavPP9blUeYqf0WZ9IP5TzbT+91WhYNWFxciagNJmkzSWWb6Dg5T TDyEZvC9DfnR64Aw== From: "tip-bot2 for Marco Elver" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/hw_breakpoint: Mark data __ro_after_init Cc: Marco Elver , "Peter Zijlstra (Intel)" , Dmitry Vyukov , Ian Rogers , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220829124719.675715-6-elver@google.com> References: <20220829124719.675715-6-elver@google.com> MIME-Version: 1.0 Message-ID: <166201996923.401.194772760546834930.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: db5f6f853194c5e02d8551425b5e86b7e0b81806 Gitweb: https://git.kernel.org/tip/db5f6f853194c5e02d8551425b5e86b7e= 0b81806 Author: Marco Elver AuthorDate: Mon, 29 Aug 2022 14:47:10 +02:00 Committer: Peter Zijlstra 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 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dmitry Vyukov Acked-by: Ian Rogers 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 { }; =20 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; =20 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 = =3D { .automatic_shrinking =3D true, }; =20 -static int constraints_initialized; +static bool constraints_initialized __ro_after_init; =20 /* 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; =20 - constraints_initialized =3D 1; + constraints_initialized =3D true; =20 perf_pmu_register(&perf_breakpoint, "breakpoint", PERF_TYPE_BREAKPOINT);