From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 D021E25B66E; Wed, 21 May 2025 10:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747822493; cv=none; b=g+VkFGaPWL0raCDOajrxYKOwQlolGid8qZqDZwaZoNES2l1FYcmDC/Tc/0Ug87wcZuaIXpjQHqjNIdEjVuU6h+axWxW4SVIXw3Z12o9NhlfOFYSy1X6iYSNQ6bMe5oolITReeX4YlBMCx4beXdfBODExgSRhj1pLXkV0l/tTCWU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747822493; c=relaxed/simple; bh=uekFzqz99LLjLHspdti1ivZB7yPyONTYgHYGnDu/3bU=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=FpdMDmV1GFDRKk5L/TgcVr7XUoHuGYbss5U3NYkIp+NfpxH+9cx6yhgWttVqiUH0C6QGCfha/66kGrCBKJylUSeQgGKQ+nVJLmOaHQEnT3gnxU73mLGB95K2S1wKf2F0MPvsSazO+8PgqgaX5BZc63Gl1z2z9w8V15Blp6iVfY8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Mb5N++UC; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Mb5N++UC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747822492; x=1779358492; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=uekFzqz99LLjLHspdti1ivZB7yPyONTYgHYGnDu/3bU=; b=Mb5N++UC1gkRKkAVEyQSYphHI8lQDjVx6P+0UNmCLXysPiK4mtzvXweb ko+i/eNRIOiwC5zoHIkfktaDa6+2uo/x1/O3BI7K7DQt58wTdOwHaP92P 7O1KqxNiMSquvjpneRkJX05G8VTnQQmNps5aBjd1rtyMzYuU3fpXDz27y o6fWsOZE6jdru/mP50++F/yh/j12SxmYWsNCyaXu+szPwtRWS+S6Gyqr1 wY3M3KWL8V1b/3t+37f8CpVt53PmqCc40B4jkvXRXIpoc2e88wQZyWfsj A4sPl9LU4dzVgVdEVZH1eSZNp72RyoPqxk7/IK8lpIkVUueNkTe6kLSEz g==; X-CSE-ConnectionGUID: VAC3pOd8RN6r9OJ2QUOafw== X-CSE-MsgGUID: SJ9djBikR7eEiu5IUxA/dg== X-IronPort-AV: E=McAfee;i="6700,10204,11439"; a="53457026" X-IronPort-AV: E=Sophos;i="6.15,303,1739865600"; d="scan'208";a="53457026" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2025 03:14:51 -0700 X-CSE-ConnectionGUID: Sryv4vM8T8e2lM82CkAKLw== X-CSE-MsgGUID: Lc+DeZb6Rtq4K8oH+oXTTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,303,1739865600"; d="scan'208";a="144735805" Received: from dalessan-mobl3.ger.corp.intel.com (HELO localhost) ([10.245.244.221]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2025 03:14:42 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Wed, 21 May 2025 13:14:38 +0300 (EEST) To: Bjorn Helgaas cc: linux-pci@vger.kernel.org, Jon Pan-Doh , Karolina Stolarek , Weinan Liu , Martin Petersen , Ben Fuller , Drew Walton , Anil Agrawal , Tony Luck , Sathyanarayanan Kuppuswamy , Lukas Wunner , Jonathan Cameron , Sargun Dhillon , "Paul E . McKenney" , Mahesh J Salgaonkar , Oliver O'Halloran , Kai-Heng Feng , Keith Busch , Robert Richter , Terry Bowman , Shiju Jose , Dave Jiang , LKML , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas Subject: Re: [PATCH v7 04/17] PCI/AER: Consolidate Error Source ID logging in aer_isr_one_error_type() In-Reply-To: <20250520215047.1350603-5-helgaas@kernel.org> Message-ID: References: <20250520215047.1350603-1-helgaas@kernel.org> <20250520215047.1350603-5-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-520110086-1747822478=:946" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-520110086-1747822478=:946 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 20 May 2025, Bjorn Helgaas wrote: > From: Bjorn Helgaas >=20 > Previously we decoded the AER Error Source ID in aer_isr_one_error_type()= , > then again in find_source_device() if we didn't find any devices with > errors logged in their AER Capabilities. >=20 > Consolidate this so we only decode and log the Error Source ID once in > aer_isr_one_error_type(). Add a "details" parameter so we can add a note > when we didn't find any downstream devices with errors logged in their AE= R > Capability. >=20 > This changes the dmesg logging when we found no devices with errors logge= d: >=20 > - pci 0000:00:01.0: AER: Correctable error message received from 0000:0= 2:00.0 > - pci 0000:00:01.0: AER: found no error details for 0000:02:00.0 > + pci 0000:00:01.0: AER: Correctable error message received from 0000:0= 2:00.0 (no details found) >=20 > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/pcie/aer.c | 22 +++++++++------------- > 1 file changed, 9 insertions(+), 13 deletions(-) >=20 > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > index 568229288ca3..488a6408c7a8 100644 > --- a/drivers/pci/pcie/aer.c > +++ b/drivers/pci/pcie/aer.c > @@ -733,16 +733,17 @@ void aer_print_error(struct pci_dev *dev, struct ae= r_err_info *info) > =09=09=09info->severity, info->tlp_header_valid, &info->tlp); > } > =20 > -static void aer_print_port_info(struct pci_dev *dev, struct aer_err_info= *info) > +static void aer_print_port_info(struct pci_dev *dev, struct aer_err_info= *info, > +=09=09=09=09const char *details) > { > =09u8 bus =3D info->id >> 8; > =09u8 devfn =3D info->id & 0xff; > =20 > -=09pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d\n", > +=09pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d%s\n= ", > =09=09 info->multi_error_valid ? "Multiple " : "", > =09=09 aer_error_severity_string[info->severity], > =09=09 pci_domain_nr(dev->bus), bus, PCI_SLOT(devfn), > -=09=09 PCI_FUNC(devfn)); > +=09=09 PCI_FUNC(devfn), details); > } > =20 > #ifdef CONFIG_ACPI_APEI_PCIEAER > @@ -926,15 +927,8 @@ static bool find_source_device(struct pci_dev *paren= t, > =09else > =09=09pci_walk_bus(parent->subordinate, find_device_iter, e_info); > =20 > -=09if (!e_info->error_dev_num) { > -=09=09u8 bus =3D e_info->id >> 8; > -=09=09u8 devfn =3D e_info->id & 0xff; > - > -=09=09pci_info(parent, "found no error details for %04x:%02x:%02x.%d\n", > -=09=09=09 pci_domain_nr(parent->bus), bus, PCI_SLOT(devfn), > -=09=09=09 PCI_FUNC(devfn)); > +=09if (!e_info->error_dev_num) > =09=09return false; > -=09} > =09return true; > } > =20 > @@ -1281,9 +1275,11 @@ static inline void aer_process_err_devices(struct = aer_err_info *e_info) > static void aer_isr_one_error_type(struct pci_dev *root, > =09=09=09=09 struct aer_err_info *info) > { > -=09aer_print_port_info(root, info); > +=09bool found; > =20 > -=09if (find_source_device(root, info)) > +=09found =3D find_source_device(root, info); > +=09aer_print_port_info(root, info, found ? "" : " (no details found"); > +=09if (found) > =09=09aer_process_err_devices(info); > } > =20 >=20 Reviewed-by: Ilpo J=E4rvinen --=20 i. --8323328-520110086-1747822478=:946--