Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1815940rbb; Tue, 27 Feb 2024 01:56:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV83lcJu9KLILo0eU3zNuXhriM7kK6k46E78ZqlVn2unnOfJJT2AgmuVTGIlQ9TPJ0YssvbrRwZSOocD0LX/Y/Er7lV1ERwmtNWV/Espw== X-Google-Smtp-Source: AGHT+IFD85Z6eGMCftLN1OCAVr84Q6OxW2SoruXEAswxOy56JYQn95O2Gn7qj1uiOlwScEYr9kx2 X-Received: by 2002:aa7:c0d5:0:b0:565:e646:5c15 with SMTP id j21-20020aa7c0d5000000b00565e6465c15mr4219639edp.31.1709027799079; Tue, 27 Feb 2024 01:56:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709027798; cv=pass; d=google.com; s=arc-20160816; b=SVN9SydgNhEmoMLE5QZJx21XnpuCCjvqO3aqR6ARfSB/zWCAuhe6CfoSfowOOL0dxf 2e24rtHmmShjZKwEQ2r/BU+oeQ+uHqFQBNzpV19jkUVBkjR5GWLwNOLYbpvCIuGWb+1/ pe9Ll87/Vvbed6521/jVMYEJebIfFxhN0MzcwKwYqJsQrjgp0ctJIXOzrnaGNWPhG1ny Fn0965JhCNIB4QN8UIgR6L22veXVfoXuE5N+tInpaNUqaTu+LQUosOv+6OddH17dyA/O bn8BSW+d1cmhdy+KaXV8uShKr9uD0ZGh0qhaWbACcDEx7JXu3Y2fzPbareiGksGvwJ/K 1E3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=KlfixdQD65Agjll2NzU4UWu1IKhVRUNc2OvzBJZIom0=; fh=vvaaWqmq3T4G2fLIQqXPxSygPsRI9Po84J2TJvukRmM=; b=nculGRSrbyUeeOdLSNIUeiER6NnzrzEHsSUsUa7kJfevt5pyAWmub84ELhxCXNHuDh cslTNIykSy7ucfa3oaLRgx8ZNLzx1Q6KtlfPhikQ1awZUbcS9r+BgsRUbQ7NWP9SXFw6 POE1Bd/RTghaR2XW94coAv9P3H4o0f1Hd9sg+V1/I8Z1/flMBFw00e1bnAU+54JRwfF2 emVjxje0v/uAXAnV6yqFZ+8JYldmPMy4wyN6dESz3UVTmn2IuNHbbrMfVLyCEr6+LJup YwegwvbPbndO/hTkNXuDfc6Rt8orxrBogYmACSd+lkXaSbuLjApZskcVVMzojL9Ero6a wsYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nmioxoRP; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-82741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i16-20020a508710000000b00565bef075a1si554441edb.625.2024.02.27.01.56.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 01:56:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82741-linux.lists.archive=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=nmioxoRP; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-82741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82741-linux.lists.archive=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 9F7461F24F09 for ; Tue, 27 Feb 2024 06:18:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B64175337B; Tue, 27 Feb 2024 06:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nmioxoRP" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 7A8E32D04E; Tue, 27 Feb 2024 06:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709014691; cv=none; b=VDy/IGQHv/cGKNLnVFE17JwBO71FFnRmZ+yjRIl1X0tXI9Pj3RLopWJfpJ3olEObGBQIk30k9A/R3IKXIeeEokaxtD+GfKcw8ImgnliS4EsQ4c9+kFa8QvNYtKuOpc7nuSS+hlUaqFvrSEl8FzGKR4AMZ2UfhSG9DYS9pewncI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709014691; c=relaxed/simple; bh=H3/TmucXlknlmGnXEBs63coRpmsQX8Q70R9XCdjhxaU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ro/zUOs+atL5rjCJXeQcIEMrgSMyXTQo/5UchDQMrtL2T5s7UbKEise5Zjn+GHfukMAMTzAzMY5ME3C4Od+U4Ey36SG85e2PcCNUBdiJE1CNJVEk+AtXU6nLpTReHVSpAjf45oNOj3BOQl0HrU5fN4OOlXc9FPl/51KWinvdAUo= 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=nmioxoRP; arc=none smtp.client-ip=198.175.65.10 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=1709014690; x=1740550690; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=H3/TmucXlknlmGnXEBs63coRpmsQX8Q70R9XCdjhxaU=; b=nmioxoRPBxtm0SsdnZPdSMgCFvkYlPWj77hf+syL3TzgkXmnIm+S76Jc UrfgjnglF9ZnGI2QAxy+DZrBoCB4zP+QZ05y7vSAF+OwfNt1FUlBMxo25 Dc4G5KNB5FPTx8QLOXIMVtFBDi+URpFQiOZT2JNpzfd0VlR555/4adop5 8UkmP+62brpcfTMEqDZukEaxZIw3OG/se+A3NdHR+jVlwxtwhde/kskom fDcH3ZDm+6c1NGgycEiLadRE6ki8kDFFmOzfuu/AJxvOAPYEsfM1zghwJ nHS3zYuKJhXm2ab2673vs68HTQQzXPKBk+gxL5KrwkpuMPftKTASysEG5 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="20784922" X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="20784922" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 22:18:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="6893885" Received: from zhaohaif-mobl.ccr.corp.intel.com (HELO [10.124.229.115]) ([10.124.229.115]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 22:18:06 -0800 Message-ID: <89984f11-b84e-4da0-ab5b-f2048461aae0@linux.intel.com> Date: Tue, 27 Feb 2024 14:18:03 +0800 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: [PATCH v2 0/3] PCI/DPC: Clean up DPC vs AER/EDR ownership and Kconfig To: Bjorn Helgaas , linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kuppuswamy Sathyanarayanan , Matthew W Carlis , Keith Busch , Lukas Wunner , Mika Westerberg , Jesse Brandeburg , Bjorn Helgaas References: <20240222221521.32159-1-helgaas@kernel.org> From: Ethan Zhao In-Reply-To: <20240222221521.32159-1-helgaas@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/23/2024 6:15 AM, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Previously we could request control of DPC without AER, which is illegal > per spec. Also, we could enable CONFIG_PCIE_DPC without CONFIG_PCIE_EDR, > which is also illegal. This series addresses both. I have a question here, how to understand the relationship EDR & AER ? somewhere EDR touches AER status without checking _OSC granted bits, such as pci_aer_raw_clear_status(edev); sometimes EDR calling AER with host->native_aer checked, like pcie_do_recovery() { ... if (host->native_aer || pcie_ports_native) { pcie_clear_device_status(dev); pci_aer_clear_nonfatal_status(dev); } ... } That is really confusing. could we do some cleanup to eliminate it ? such as seperate AER code into common code and runtime part. Thanks, Ethan > > Bjorn Helgaas (3): > PCI/DPC: Request DPC only if also requesting AER > PCI/DPC: Remove CONFIG_PCIE_EDR > PCI/DPC: Encapsulate pci_acpi_add_edr_notifier() > > drivers/acpi/pci_root.c | 22 ++++++++++++---------- > drivers/pci/pci.h | 4 ++++ > drivers/pci/pcie/Kconfig | 14 ++++---------- > drivers/pci/pcie/Makefile | 5 ++++- > drivers/pci/pcie/dpc.c | 10 ---------- > include/linux/pci-acpi.h | 8 -------- > 6 files changed, 24 insertions(+), 39 deletions(-) >