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 4D29F17AE11 for ; Fri, 8 Aug 2025 07:12:05 +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=1754637127; cv=none; b=gU3xjoWi+g8sKVqgMiOR3W6ntpBx6u6jqfDmsDrM6wcWGnd4LtHXxiE15jTnb/2bubYNNdLqrOUiSbFTb8yX4PjKEV7kdR0dWwL/rZ11LmzldhpCruQhzFiuu+FMIYRKWSXiDorX5Fch5J9RtN/YCauQT2QmEL6MHmZaf94qbUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754637127; c=relaxed/simple; bh=LXPrHcNG7KlWsHeoL1Cg1zKZCKZbrueHrYOom5thM3U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CY407aBHrTAW05Td21vsLpUiJSwxMqLn5F3ob8WGo/TqqKw7G6V0EXHltss0N5eWGoBAd00QGYCxW9iCAvObW6Jo3zdKhk8gPW4TQclr7IAXx0y7ga9YxMkEUg1m0/f1d0HTgdyorooMUJCdj6r8S00ClVDSb4u527Lx9PLLefE= 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 43FB822EA; Fri, 8 Aug 2025 00:11:57 -0700 (PDT) Received: from [10.57.5.99] (unknown [10.57.5.99]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 358A53F673; Fri, 8 Aug 2025 00:12:00 -0700 (PDT) Message-ID: Date: Fri, 8 Aug 2025 08:11:57 +0100 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 25/36] arm_mpam: Register and enable IRQs To: Ben Horgan , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Rob Herring , 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 References: <20250711183648.30766-1-james.morse@arm.com> <20250711183648.30766-26-james.morse@arm.com> Content-Language: en-US From: James Morse In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Ben, On 28/07/2025 11:49, Ben Horgan wrote: > On 7/11/25 19:36, James Morse wrote: >> Register and enable error IRQs. All the MPAM error interrupts indicate a >> software bug, e.g. out of range partid. If the error interrupt is ever >> signalled, attempt to disable MPAM. >> >> Only the irq handler accesses the ESR register, so no locking is needed. >> The work to disable MPAM after an error needs to happen at process >> context, use a threaded interrupt. >> >> There is no support for percpu threaded interrupts, for now schedule >> the work to be done from the irq handler. >> >> Enabling the IRQs in the MSC may involve cross calling to a CPU that >> can access the MSC. >> diff --git a/drivers/platform/arm64/mpam/mpam_devices.c b/drivers/platform/arm64/mpam/ >> mpam_devices.c >> index 145535cd4732..af19cc25d16e 100644 >> --- a/drivers/platform/arm64/mpam/mpam_devices.c >> +++ b/drivers/platform/arm64/mpam/mpam_devices.c >> @@ -1548,11 +1638,193 @@ static void mpam_enable_merge_features(struct list_head >> +static int mpam_enable_msc_ecr(void *_msc) >> +{ >> + struct mpam_msc *msc = _msc; >> + >> + __mpam_write_reg(msc, MPAMF_ECR, 1); > You can use MPAMF_ECR_INTEN. Sure, >> + >> + return 0; >> +} >> @@ -1644,7 +1939,6 @@ void mpam_enable(struct work_struct *work) >> struct mpam_msc *msc; >> bool all_devices_probed = true; >> - /* Have we probed all the hw devices? */ > Stray change. Keep the comment or remove it in the patch that introduced it. Fixed. Thanks, James