From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 853602C3277 for ; Thu, 24 Jul 2025 12:09:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753358962; cv=none; b=UHN15EZ8EoJWKWg9duX3jd+VHCsy0QJATTfbH8aQZPFUtOgz1Zi1y2tf+YP43V3ThiFmlyjBoh8SaorBfCVO6fSGTeYnBo7/ibNtHv0rdJmZFz+LsQroxrLv9kmMCVTcJR4k1IsJYtSs6mwhBiJGxQUf6VY79aQzUQXydiFZtHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753358962; c=relaxed/simple; bh=HE2kK5fzj528CcXAbgBgt4goN1DFJluDzXmveP79SkI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BVl+C7ofWJg+tbj/Yx+lpiuypDPbi8aGPmeb25N+jmjhHIduHWhTW7aj5xeduAQp1JqZVonArrHZFR+7jbXiaozp02BeaYzW4nrQkL/8HYiz2o4a+ZGSNuYBK7SZMJPtI21+Ax17N45g0S5XVqrlzuEi4sroR6R04cmlRCnYoXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BAE3C4CEED; Thu, 24 Jul 2025 12:09:17 +0000 (UTC) Date: Thu, 24 Jul 2025 13:09:15 +0100 From: Catalin Marinas To: James Morse Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Ben Horgan , Rohit Mathew , Shanker Donthineni , Zeng Heng , Lecopzer Chen , Carl Worth , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie , Dave Martin , Koba Ko Subject: Re: [RFC PATCH 13/36] arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate Message-ID: References: <20250711183648.30766-1-james.morse@arm.com> <20250711183648.30766-14-james.morse@arm.com> 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: <20250711183648.30766-14-james.morse@arm.com> On Fri, Jul 11, 2025 at 06:36:25PM +0000, James Morse wrote: > Probing MPAM is convoluted. MSCs that are integrated with a CPU may > only be accessible from those CPUs, and they may not be online. > Touching the hardware early is pointless as MPAM can't be used until > the system-wide common values for num_partid and num_pmg have been > discovered. > > Start with driver probe/remove and mapping the MSC. > > CC: Carl Worth > Signed-off-by: James Morse > --- > arch/arm64/Kconfig | 1 + > drivers/platform/arm64/Kconfig | 1 + > drivers/platform/arm64/Makefile | 1 + > drivers/platform/arm64/mpam/Kconfig | 10 + > drivers/platform/arm64/mpam/Makefile | 4 + > drivers/platform/arm64/mpam/mpam_devices.c | 336 ++++++++++++++++++++ > drivers/platform/arm64/mpam/mpam_internal.h | 62 ++++ > 7 files changed, 415 insertions(+) > create mode 100644 drivers/platform/arm64/mpam/Kconfig > create mode 100644 drivers/platform/arm64/mpam/Makefile > create mode 100644 drivers/platform/arm64/mpam/mpam_devices.c > create mode 100644 drivers/platform/arm64/mpam/mpam_internal.h Bikeshedding: why not drivers/resctrl to match fs/resctrl? We wouldn't need the previous patch either to move the arm64 platform drivers. I'm not an expert on resctrl but the MPAM code looks more like a backend for the resctrl support, so it makes more sense to do as we did for other drivers like irqchip, iommu. You can create drivers/resctrl/arm64 if you want to keep them grouped. -- Catalin