Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2320522rdb; Mon, 5 Feb 2024 03:00:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPWu2t3S13h1i/lGIp/BpPzQ2Cu/tCN0oRzwxPOIT8diIwcNvBrjLjuozXFiW9AGh0nENO X-Received: by 2002:a2e:7011:0:b0:2d0:9e44:1afb with SMTP id l17-20020a2e7011000000b002d09e441afbmr3449738ljc.3.1707130804939; Mon, 05 Feb 2024 03:00:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707130804; cv=pass; d=google.com; s=arc-20160816; b=z62PXp2VDY/SkiBXe51SJilEzOS5PZNH+SpdBGbkG62b6mIGBM4zoBKCrx16SnG6nX e9i4AjHYF7Oen8QSwEgDigZIqXWkYlMXpZU5ti0hKc+aL0tZc4zH26+Jb/mLHDd3AUpj MzfCyPqv6VkI7EyjRhyCqLTMjP5FX4076K/MroylJUmiha/b/+QO8FgvhhS2J4xBkKys u1RA3zdTZJ0BtBTR5Wdfq2AOj8c+TKPCWO7GA9LJCxei7bEwuPgMhEdasSaZjbYh8v73 tHyJDUVExD8cwgBfTe3VTjdYdfuiMb/Y4WlBrjsbUgYN5S95sK8WA+7q/q71m/fp8f1T oZXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=PeupUPwOwmS/62XAPHn0k9tpF4l/P7P53EJatyy1xBY=; fh=hLk48vq+6rwLyzk8NEmHU+jRX4T8RcN5bvR1pcBbc2Q=; b=hb/Lc+5QaSMWh3weavYV0VkYcp3zxbB/ZR7Sr7SH15udKQ4Wd449jlrCTm9Tzllqp7 KHqnJ0z7VYPmF16xlyTeFQPgTCoqk63QO21tkRBCf9LbYI0qEkoujYm5514S2wPVUlON JKl2yaaodGMX2RnRZmW8e25+8e9ACP6F9bp5rianq6nehTmHU2Zabcqyn+xMLst8Fg+R a+W50ln7PfCiUjHvtuQEdepTnlyFPAj8D6PklkjhLHH55CoCeUpg6c8tJrEML7D9i2Wq E/16zOSI9i0GYx/uRj54ZOroUDZ0T+ST1UrrIaKqQwRjVok1TbWY+w0Kt4jvlT0jp67o 4G3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-52443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52443-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=1; AJvYcCXm3ZxoZqCD9EF2Li1C2S7SDifIZjGURanutsYulhb6dj5g4VjQOyRzUwTMGkcrhrkCX90Dqgh4OCetSZMhW9o1sENlc2eMN0Xh++Y6IQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k22-20020a508ad6000000b0055c2990a430si3712613edk.24.2024.02.05.03.00.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 03:00:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-52443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52443-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A9DDB1F23CDA for ; Mon, 5 Feb 2024 11:00:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C45D18039; Mon, 5 Feb 2024 10:59:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 573A418029; Mon, 5 Feb 2024 10:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707130795; cv=none; b=o/a3CRveONQv4ScFa+8PkzZwyHJlI4ahPkHvwguwu3Ud4EcjYrCwo+P028pTy88Hu3SnFSxRRDYGW/jJhSMIVWfGpAWOa+edsZOGM7geMZSzkhMban82lNsuIizQy8cs6/ebfURuWYuBioSnAu2vE5iqKBeh2uMLz4zcGjLWjA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707130795; c=relaxed/simple; bh=Ax1Wfs8fMfncrJJBBuNS3ZuGYCCrru7PPsf60KUJ6Qw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T/S5yiR+Lk5YPzgl6j0TJiFg4hgDbrrp5EBMSOhToi0neqEO7St+QvpAC8Z5PO4tl7zH8BZEjlEcIgiVqUTmmG4jdv+/J1/bCiH69M/3anibiDMIhfAuz1ZhozUfs/Dp4x1NoV+0RApvYyZL2amT3quG2fmjaTnKjREN5Wk2Vv0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 155581FB; Mon, 5 Feb 2024 03:00:35 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.66.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A9D063F762; Mon, 5 Feb 2024 02:59:50 -0800 (PST) Date: Mon, 5 Feb 2024 10:59:43 +0000 From: Mark Rutland To: "Ricardo B. Marliere" Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH] perf: make pmu_bus const Message-ID: References: <20240204-bus_cleanup-events-v1-1-c779d1639c3a@marliere.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240204-bus_cleanup-events-v1-1-c779d1639c3a@marliere.net> On Sun, Feb 04, 2024 at 10:29:39AM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the pmu_bus variable to be a constant structure as well, > placing it into read-only memory which can not be modified at runtime. > > Cc: Greg Kroah-Hartman > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Ricardo B. Marliere Acked-by: Mark Rutland Mark. > --- > kernel/events/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/events/core.c b/kernel/events/core.c > index 59b332cce9e7..decd994bfca4 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -11434,7 +11434,7 @@ static const struct attribute_group *pmu_dev_groups[] = { > }; > > static int pmu_bus_running; > -static struct bus_type pmu_bus = { > +static const struct bus_type pmu_bus = { > .name = "event_source", > .dev_groups = pmu_dev_groups, > }; > > --- > base-commit: fdd041028f2294228e10610b4fca6a1a83ac683d > change-id: 20240204-bus_cleanup-events-765165264090 > > Best regards, > -- > Ricardo B. Marliere >