From patchwork Tue Feb 6 13:57:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 20016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1656483dyb; Tue, 6 Feb 2024 08:26:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqFlsmK59rFqEoGFSsas8jKj4VLSjk2Q61UXLep+r/xI5tppqr6zG7XVjvDmZ0lqkA/8Ff X-Received: by 2002:a05:651c:b06:b0:2d0:772a:e5ae with SMTP id b6-20020a05651c0b0600b002d0772ae5aemr2440155ljr.14.1707236775807; Tue, 06 Feb 2024 08:26:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707236775; cv=pass; d=google.com; s=arc-20160816; b=VRWeg7ibwfIWkUzVhP1/CHIqr+5SEzVpyyhIQU99JSS+Jd5+r8a8ZOJ5ruN+4Xulx0 bc1ja77DvjxyxtK01P97rEzYpyO7N/xHV/rdi1V/CO9KOKeEIg8jjENQtSreeZypD/TK N7BvL33VRTuXX2IdBet4z0p5ygh+wDKjjKa6s4lqMJ68V+es1ZYv1vilW4WmPka87M9A qeaLMWidrT++DGxdCI+QFXOOm+QHIvbV+GeNgISZnX7LD2hbVPVxNOCBGIPSmU2dFbQr j+B+tI8sM/tAny8xsabJX2C0vkjPC95o9zlP2ZwQNM/fBMGb6936+Q+kRQ6VJtO2h+FY Pbbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=4Nr6dU2rmCXT6AY8jPwfs2yNfoItq4kTnpt7lysw1dY=; fh=VdcgEyrAvw86Bkb515uz6Xcl1S1pF8X1tDkxZuk4E0E=; b=IXMA4TM6ct+n5KVlQyaJbI+XQgpYnK8ptaM72cwgaGEwF9CTUBAWcrn47PLtyLBcvW tVzjNnjBHdoZdEgNYbCWgHLVzgitDGWCpKFa7l6Rkpt3CpIthYbafTD5qowHur8NUJzr db3nNw8L2i5ayQ+VXAdKmw/9AlQFUvwbNfNV2vhgc2AZf3IgJ0zQWrSdAFQ3iLn7K6CL oq/7p7CIk8YQfzb+KJXJ0L1QAw3Aj/SZRZhQnxOZtNK+Tx3OpS3e83SIVDJurm/XnNOO B/C0jpT7Bxw0tLFZnXnbqSdaHcNYpVPdaC5e0jOnEH3Xf5jsCOK8YIYR2IY7vqLbbNkc Avcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NATnf3AN; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55061-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55061-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCW9RMeXxiEezqYKQ3VlEz05OO/JQkGSYM4QpHL1Wf8X2Wv92FJyfcDcCcMS/mpvwvjJHnuL0VdiVG3+DdMoU9Crhh4dRA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 23-20020a508757000000b005609c1f61b8si1231939edv.125.2024.02.06.08.26.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 08:26:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55061-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NATnf3AN; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55061-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55061-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D6B641F2637A for ; Tue, 6 Feb 2024 13:57:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3F5C131E3E; Tue, 6 Feb 2024 13:57:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NATnf3AN" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 0184C131736; Tue, 6 Feb 2024 13:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707227853; cv=none; b=izTd0iMQxkMtqAWfdUqZXizl4JuEUidFzFdqBJwRrZC+XyjHH533G55bsmORTyPdhBk8Elp+Nybjb3g7NkpDDJ5qzOfHhkBIF5Vz1Ec/FhrJJiYs4DwlKDR37iq7bh9L0wLUq4w1tvtb/7Z0PJkvSwZge5pZdG30WRmouf5rJnw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707227853; c=relaxed/simple; bh=+6R/x2mXrJ2mSjnMfGMWqrnVr3TA5VqeovMhAdWHed8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=AAjjkbuWPWp677Iyr7huj1jEFU6SehV5piguPFDxdqx9yS01aIhZNAqeEQpvvSQMnuaPcWonaU8mvNOkNX7jnH24pesrLy+o/tiASsmROTLWtqoGoo9eTIErtBgADsnsPosa1xIcg57jsNHgB/0yKhfL16ce5vPGzbqbxvs/iTI= 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=NATnf3AN; arc=none smtp.client-ip=192.198.163.14 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707227851; x=1738763851; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=+6R/x2mXrJ2mSjnMfGMWqrnVr3TA5VqeovMhAdWHed8=; b=NATnf3ANTLyC6QcTHm49O13AZElntwzSj54lDxd+JLnny25X7datHxb+ SNobHDDa1LQq5TAQV5Dkw4FRbJzZdQU+zjHyI3PGfx0hoLH4eiq1m+mMJ qlWzSv4qBoYwIJpIvs8EZmSIRkvapIk+MW8xMe8BGRca04PFwBNSxR3j4 M0Nss3qUj6+90Fi+pwGvVT++KhiihygFZCiW9/GO4YOztlckESh4WizNC vs9id2C+1+OKoyXcD+Bk0jh/ljuQF7vaBwjMVJ/54e7DtKMp/D4DeKGvu azCg89kS0G+oTWhi1r2cAO7rOYt6rQZ5AjG7v7PQ4B0uO+5D0QfEO1rs1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="905136" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="905136" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 05:57:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="1309627" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.36.139]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 05:57:25 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-pci@vger.kernel.org, Bjorn Helgaas , Jesse Brandeburg , intel-wired-lan@lists.osuosl.org, Tony Nguyen Cc: Ard Biesheuvel , Borislav Petkov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-edac@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Mahesh J Salgaonkar , netdev@vger.kernel.org, "Oliver O'Halloran" , Paolo Abeni , Tony Luck , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 0/4] PCI: Consolidate TLP Log reading and printing Date: Tue, 6 Feb 2024 15:57:13 +0200 Message-Id: <20240206135717.8565-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790167509477376853 X-GMAIL-MSGID: 1790167509477376853 This series consolidates AER & DPC TLP Log handling code. Helpers are added for reading and printing the TLP Log and the format is made to include E-E Prefixes in both cases (previously only one DPC RP PIO displayed the E-E Prefixes). I'd appreciate if people familiar with ixgbe could check the error handling conversion within the driver is correct. Ilpo Järvinen (4): PCI/AER: Cleanup register variable PCI: Generalize TLP Header Log reading PCI: Add TLP Prefix reading into pcie_read_tlp_log() PCI: Create helper to print TLP Header and Prefix Log drivers/firmware/efi/cper.c | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 39 +++------ drivers/pci/ats.c | 2 +- drivers/pci/pci.c | 79 +++++++++++++++++++ drivers/pci/pci.h | 2 +- drivers/pci/pcie/aer.c | 28 ++----- drivers/pci/pcie/dpc.c | 31 ++++---- drivers/pci/probe.c | 14 ++-- include/linux/aer.h | 16 ++-- include/linux/pci.h | 2 +- include/ras/ras_event.h | 10 +-- include/uapi/linux/pci_regs.h | 2 + 12 files changed, 145 insertions(+), 84 deletions(-)