From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1247B2D0C83 for ; Thu, 11 Dec 2025 11:32: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=1765452774; cv=none; b=MoYpY5CJEGk0m8a9TClSkkr3trkJchga6Bom46BfgZZHfQU4CrT5WNzhwouKjfVM60y6qhz0ZxbO2VsHjyaSh+HYLTb9csqbjWh+yZsyMbsYZqYxEOIzkTZlT+IoIQ9dHoPMwINYzwKtAoM7ek4KQpsLRpPZ6PPc/Arm4iVBLDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765452774; c=relaxed/simple; bh=aQtRz2x3FYD8vh2+tWvsz0nMxuygbqhW9DLTdYK2t/4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=C49+i5fyqxjCoqEsbu1J4WW3AbsA5TRohp7vvcLSCnLUq+KKb+tFJtyUi7Scjv9s82SA0FqeU8dd0cE/gQ9NhkZEoxS5yGpFO4bqLDK6N7qjpCBdjp9B7FwodHpVLZy1UUBaZecRWW6hL0LBY+VYgSGdw79ahYr5jAux/cKzn0U= 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 01B97FEC; Thu, 11 Dec 2025 03:32:45 -0800 (PST) Received: from [10.1.196.46] (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DC4583F740; Thu, 11 Dec 2025 03:32:48 -0800 (PST) Message-ID: Date: Thu, 11 Dec 2025 11:32:47 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 02/38] arm64: mpam: Re-initialise MPAM regs when CPU comes online From: Ben Horgan To: James Morse , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: D Scott Phillips OS , carl@os.amperecomputing.com, 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 , Dave Martin , Koba Ko , Shanker Donthineni , fenghuay@nvidia.com, baisheng.gao@unisoc.com, Jonathan Cameron , Gavin Shan , rohit.mathew@arm.com, reinette.chatre@intel.com, Punit Agrawal References: <20251205215901.17772-1-james.morse@arm.com> <20251205215901.17772-3-james.morse@arm.com> <0ea282be-c44f-4562-9104-1efe57348a3e@arm.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Retraction... sorry On 12/11/25 11:23, Ben Horgan wrote: > Hi James, > > On 12/9/25 15:13, Ben Horgan wrote: >> Hi James, >> >> On 12/5/25 21:58, James Morse wrote: > > Actually, this code is only run before the mpam enablement is finished, > importantly before the mpam_enabled static key is set, and so > arm64_mpam_current is still 0 for every cpu. For cpus that are brought > up after boot time this is never run. Actually, actually, this is run whenever a cpu comes online, even if by hotplug later, and so arm64_mpam_current will be 0 as need on the first switch on and the previous value for the cpu when it has previously been off. > > As SYS_MPAM0_EL1 and SYS_MPAM1_EL1 are unknown out of reset we should > set them to 0 whenever a cpu comes online to make sure they initially > use PARTID 0 as that is the only one guaranteed to have sensible > defaults in the MSC. Once the mpam driver has configured the MSC we can > start setting other values. > >> >>> + >>> + write_sysreg_s(regval, SYS_MPAM1_EL1); >>> + isb(); >>> + >>> + write_sysreg_s(regval, SYS_MPAM0_EL1); >>> } >>> >>> static bool >> >> Thanks, >> >> Ben >> >> > > Thanks, > > Ben > > -- Thanks, Ben