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 7DD2F346E59; Tue, 18 Nov 2025 10:44:32 +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=1763462674; cv=none; b=IntObA6uRizi5UIjagfxoermmEYVgv65i57UHVtUyeAVM03pnkbMN3vT/NZX+PE5/ZT/JLNGnwGXeAiIPVuag8XyGNfMuNSTdrIeH1KM3xJ+3pyDezIZrKk5sI6khlPIa/CkcQagmWculS1tMY0bLtO+/05TikCFxIVFT5saJCI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763462674; c=relaxed/simple; bh=Fi92iRAH8GmexsBQN85W9mA5aibeGiC2ZYk+7nepmEo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ObLSJzjRRSqUDYFZQDJ1FPEm8NxLzQWY5TnyE2qrJJfZomJO2cNdTHqCKUbzCumvms5dUW5Nw+jpZ6Mf9t3n3v4WBRXI77WUMg4nEyX0sPU0ggiqxVuxukWOdmZXJyDNbPhxZdRUOygTslZ9Mf908a6CyQwluVizmOfygyh4XcU= 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 0DBF3FEC; Tue, 18 Nov 2025 02:44:24 -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 C1E4C3F740; Tue, 18 Nov 2025 02:44:26 -0800 (PST) Message-ID: <3d2b7980-db26-423f-9525-5d18eade8344@arm.com> Date: Tue, 18 Nov 2025 10:44:25 +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: [PATCH v5 10/34] arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate To: Markus Elfring , James Morse , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Cc: LKML , Amit Singh Tomar , Baisheng Gao , Baolin Wang , Carl Worth , Catalin Marinas , D Scott Phillips , Danilo Krummrich , Dave Martin , David Hildenbrand , Drew Fustini , Fenghua Yu , Gavin Shan , Greg Kroah-Hartman , Hanjun Guo , Jamie Iles , Jeremy Linton , Jonathan Cameron , Koba Ko , Len Brown , Linu Cherian , Lorenzo Pieralisi , Peter Newman , "Rafael J. Wysocki" , Rob Herring , Rohit Mathew , Shanker Donthineni , Shaopeng Tan , Sudeep Holla , Wang ShaoBo , Will Deacon , Xin Hao , Zeng Heng References: <20251117170014.4113754-11-ben.horgan@arm.com> From: Ben Horgan Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Markus, On 11/17/25 19:50, Markus Elfring wrote: > … >> +++ b/drivers/resctrl/mpam_devices.c >> @@ -0,0 +1,190 @@ > … >> +static int mpam_msc_drv_probe(struct platform_device *pdev) >> +{ > … >> + mutex_lock(&mpam_list_lock); >> + msc = do_mpam_msc_drv_probe(pdev); >> + mutex_unlock(&mpam_list_lock); > … > > Does anything hinder you to integrate statements like “guard(mutex)(&mpam_list_lock);” here? > https://elixir.bootlin.com/linux/v6.18-rc6/source/include/linux/mutex.h#L228 The mpam_list_lock needs to be dropped before the end of the scope as it is also taken in mpam_msc_drv_remove(). > > Regards, > Markus Thanks, Ben