From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E678AC531C9 for ; Fri, 24 Jul 2026 12:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2NihTIkzvJJhL1oMJLkkInbq38KcecjKA4gcRVTiYro=; b=P6EWLC4+CaPP0bTKGM0pahyWmC cJBj+FwOer+XSebNsv+Kgk6dnXMmokJ6yCQXStjQuJ8GJKJrEEVOaxBMycooIg831qD61TujflsRX IEkLSUmuaBhpVft13VHpIA8/6+SkJbQDzAvOtVI0xruCkw2Hk21GHyNuJbz8XAKonk6dqspbfeJM7 6LNFfVRVSWoIw3YAV7rod/smCoN41E7dJbCAtLX8eBtwJ/qhUZefj7uZntVMcc1EcluZvq6QZoL6e Y66yySoAMTac7oJyMe9Cup0EW8tinBzdQwouFfkGIRF9lTK6yGJ+2uROU0XqEYjbTIk3CROmZfobp IY8TygzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wnEsE-0000000GM9D-1sWB; Fri, 24 Jul 2026 12:19:30 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wnEsD-0000000GM8z-0Ypf for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2026 12:19:29 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 8E66C43EB2; Fri, 24 Jul 2026 12:19:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 117CA1F00A3D; Fri, 24 Jul 2026 12:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784895568; bh=2NihTIkzvJJhL1oMJLkkInbq38KcecjKA4gcRVTiYro=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=HGR1+R3Utvf9qRUvr8MB/WEz/YIO7CFExPVMRcFsOjvGb/mhOz57ZZLW4G8DGzlKi jCwQSCoOos3aLTbrn+yAOjadJhCjxqFtgp9HIKSA/8w8HFoaR3wGdHKLDfDyBU6+2q UEm5YkrYt3eGQW/gl1td6o6mUmd9SCBwoHsaYarHVkiVTZJ3WLSkZsB9Z3yadfRBbl 7qSDulW2JajROCYIXjXaYTr6pL6MsHku94UmabQD/1FUWADB4qdHY1Wre6CSZgvu9G Frr1z5nG+wsonT8jDV84KcUak3r2w5opxI9vxJBJ0TNwlVkO7Uxl26TSeVloHdvLcN VghuxtNsSqVxg== Date: Fri, 24 Jul 2026 13:19:22 +0100 From: Sudeep Holla To: Andre Przywara Cc: Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , James Morse , Ben Horgan , Reinette Chatre , Fenghua Yu , Jonathan Cameron , Srivathsa L Rao , Ganapatrao Kulkarni , Trilok Soni , Srinivas Ramana , Niyas Sait , Lee Trager , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 05/10] arm_mpam: propagate MSC access errors for __ris_msmon_read() Message-ID: <20260724-daffy-red-gazelle-3f70be@sudeepholla> References: <20260723155454.1760823-1-andre.przywara@arm.com> <20260723155454.1760823-6-andre.przywara@arm.com> <20260724-horned-wolf-of-will-a49c1d@sudeepholla> <1864c9a2-2e97-411e-9f12-862a8cfd4101@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1864c9a2-2e97-411e-9f12-862a8cfd4101@arm.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jul 24, 2026 at 01:17:06PM +0200, Andre Przywara wrote: > Hi, > > On 7/24/26 12:02, Sudeep Holla wrote: > > On Thu, Jul 23, 2026 at 05:54:49PM +0200, Andre Przywara wrote: > > > Allow the function for RIS accesses to return an error, and propagate > > > read and write errors from the lower level up. > > > This function is a bit special, since it can be called via an SMP > > > helper, so the prototype must stay as void. So propagate any errors > > > using the "err" field in the struct passed in as the sole argument to > > > that function. > > > > > > > Not sure if this was already discussed by build bisection regresses between > > 4/10 and 5/10 as you change function prototype there and caller here or > > am I missing to read it correctly ? > > Does it? I build tested every patch multiple times yesterday, and just > repeated it, and it comes back cleanly. > > > > Signed-off-by: Andre Przywara > > > --- > > > drivers/resctrl/mpam_devices.c | 36 +++++++++++++++++++++++++--------- > > > 1 file changed, 27 insertions(+), 9 deletions(-) > > > > > > diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c > > > index 9ee4eb4db03f..bcff53477133 100644 > > > --- a/drivers/resctrl/mpam_devices.c > > > +++ b/drivers/resctrl/mpam_devices.c > > > @@ -1328,6 +1328,10 @@ static u64 mpam_msmon_overflow_val(enum mpam_device_features type, > > > return overflow_val; > > > } > > > +/* > > > + * This function might be called via smp_call_function_any(), so propagate > > > + * errors inside the arg struct. > > > + */ > > > static void __ris_msmon_read(void *arg) > > > { > > > u64 now; > > > @@ -1351,7 +1355,9 @@ static void __ris_msmon_read(void *arg) > > > mon_sel = FIELD_PREP(MSMON_CFG_MON_SEL_MON_SEL, ctx->mon) | > > > FIELD_PREP(MSMON_CFG_MON_SEL_RIS, ris->ris_idx); > > > - mpam_write_monsel_reg(msc, CFG_MON_SEL, mon_sel); > > > + m->err = mpam_write_monsel_reg(msc, CFG_MON_SEL, mon_sel); > > > + if (m->err) > > > + return; > > > switch (m->type) { > > > case mpam_feat_msmon_mbwu_31counter: > > > @@ -1371,7 +1377,9 @@ static void __ris_msmon_read(void *arg) > > > * Read the existing configuration to avoid re-writing the same values. > > > * This saves waiting for 'nrdy' on subsequent reads. > > > */ > > > - read_msmon_ctl_flt_vals(m, &cur_ctl, &cur_flt); > > > + m->err = read_msmon_ctl_flt_vals(m, &cur_ctl, &cur_flt); > > > + if (m->err) > > > + return; > > > > > > > Atleast read_msmon_ctl_flt_vals() changed to return value in last patch. > > Ah, but this is not a problem that breaks the build, as we formerly just > ignored the (at this point bogus) error value, but now pass it up. Rather than return I was thinking about added parameter to get the read value. > But this is one occasion of "touching the same line twice", that was > criticised before. Not nice, but the alternative would be to have one giant > patch, which I figured to be unreadable. > Ah then good. May be I was overthinking. -- Regards, Sudeep