Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp410810rwe; Thu, 1 Sep 2022 01:19:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR6la/TZthEEtVsVi6oTojCRLNUP+rm/1GpSokvTgqSnXLes51huPB0fQvr7tJpbCdeC9Al5 X-Received: by 2002:a05:6402:1f06:b0:447:f6a0:2f71 with SMTP id b6-20020a0564021f0600b00447f6a02f71mr22863753edb.243.1662020353705; Thu, 01 Sep 2022 01:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662020353; cv=none; d=google.com; s=arc-20160816; b=HYvLVxYsrkB8F0UwaqiG6U+39ZDfOxhiHfeqbdfdyYXf5GPK29StnXs4wCCXx2TdzI r79VtPt6NgC3EoCMO54rDKbjQKQpjJIP3EwT8bmfJU/iYi0PshAo4gllEmKUdQrGok85 ANGinTz7tvriiB1Y8rAGp7Ijb2XHNC8YzoDM/kq4nlyRlpjHwMb2d8m/uab8aDtUd9jQ +OykkgCdH0MsH4G0bRjH5aoli4HuoPsCMi3YZPTtdL2iX0As3LPaJVFf6xU6vW+wco5Q 0R9cqTDit9ilePECyG1okySziFB9sZnuq6I0EJDy+pxUOL9b8nZ/QHgafI64Gd4+cxGB +snQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=uCdb/nlwiFpiF5+XvQwhBLBYsJZY7IhGqVNuaXwEkcA=; b=WidT30NUWzq1UySaFYBKjkPjW0bVbn7COXSZky+iAwaXvrRHdnlF2qc/YflJbmTCRE cB6PXn9Bmx/natxRXzDTUJKWl6FiTDuOezoKkjIK3D93ToBivzT8NDGDuBILP6ItN8HE 6B2WjJ2ihiYwS/FTw3GFsbNIaC8HGN5M7xChFqxAaNJzKiE9P+IyKIySxF4FPzcd0sJP S5vfWiiM4dHOmliVQLSDWZ6KxzfsjNTZ8fSS6LvBE9ka1mMEtD/ZCsPmWvrb6v0lIDsT /dnW+10LEjx1MkiNmEi+Z0sPGhDKvDoGCCOMm9EuMRs7Op7i6F5WGrq+AWx4v6QtmtF7 KLYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JgDdw90a; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd17-20020a170907629100b0072ab5d0fc33si12865348ejc.863.2022.09.01.01.18.47; Thu, 01 Sep 2022 01:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JgDdw90a; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234058AbiIAINg (ORCPT + 99 others); Thu, 1 Sep 2022 04:13:36 -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: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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/db5f6f853194c5e02d8551425b5e86b7e0b81806 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 { }; 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);