From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 31C881DDC1E; Fri, 27 Jun 2025 11:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024928; cv=none; b=RmQ0UpBP3J6wTuP/nmwmxlHFAIHwec4RZdxwayMudRJqRpFczaZkeqifbLGueEYaKEuBRYFFosugtPfLQU44xWSvulmCXM+Bxt7Tkzfk5NorlrPdsP9bAllxIaDHmuCmGxlJk5NHoL4RTwoVs+lgFVC/XFB28/8CE74y8I82Yu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024928; c=relaxed/simple; bh=rMdY4LGMe/vXofAe3cP4wjwPAua87drI2R+LIiqSjsA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LYq+OB/QCvy7+K5M0yWvqmTGmfiFlsPPxgyZQ+spe/TftkckQL2wdDJ4wVMqO+SkyfbpkP93IxtGv65ZFx4u7pzPru1V8b1Tj0aJEiJ4RKcct7UozColD1/vq6vk+2uEBQ7aRZuZVq/vVXqnqpBqxNTLZrjuW9FdXtTzoBOmMZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4bTDK826rdz6L5H9; Fri, 27 Jun 2025 19:46:04 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 9691E140417; Fri, 27 Jun 2025 19:48:42 +0800 (CST) Received: from localhost (10.48.153.213) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 27 Jun 2025 13:48:41 +0200 Date: Fri, 27 Jun 2025 12:48:39 +0100 From: Jonathan Cameron To: Terry Bowman CC: , , , , , , , , , , , , , , , , Subject: Re: [PATCH v10 13/17] cxl/pci: Update cxl_handle_cor_ras() to return early if no RAS errors Message-ID: <20250627124839.000056b3@huawei.com> In-Reply-To: <20250626224252.1415009-14-terry.bowman@amd.com> References: <20250626224252.1415009-1-terry.bowman@amd.com> <20250626224252.1415009-14-terry.bowman@amd.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To frapeml500008.china.huawei.com (7.182.85.71) On Thu, 26 Jun 2025 17:42:48 -0500 Terry Bowman wrote: > Update cxl_handle_cor_ras() to exit early in the case there is no RAS > errors detected after applying the status mask. This change will make > the correctable handler's implementation consistent with the uncorrectable > handler, cxl_handle_ras(). > > Signed-off-by: Terry Bowman > Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jonathan Cameron > --- > drivers/cxl/core/pci.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c > index 156ce094a8b9..887b54cf3395 100644 > --- a/drivers/cxl/core/pci.c > +++ b/drivers/cxl/core/pci.c > @@ -677,10 +677,11 @@ static void cxl_handle_cor_ras(struct device *dev, u64 serial, > > addr = ras_base + CXL_RAS_CORRECTABLE_STATUS_OFFSET; > status = readl(addr); > - if (status & CXL_RAS_CORRECTABLE_STATUS_MASK) { > - writel(status & CXL_RAS_CORRECTABLE_STATUS_MASK, addr); > - trace_cxl_aer_correctable_error(dev, serial, status); > - } > + if (!(status & CXL_RAS_CORRECTABLE_STATUS_MASK)) > + return; > + writel(status & CXL_RAS_CORRECTABLE_STATUS_MASK, addr); > + > + trace_cxl_aer_correctable_error(dev, serial, status); > } > > /* CXL spec rev3.0 8.2.4.16.1 */