Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2585354ybg; Thu, 24 Oct 2019 11:57:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMUjw4jx6lD3EFDnGkxj7hNXsnqPQ8Bgu9ZRsCNh7OVPiMQhWIQn4S4FPBXtik0dh5/2eD X-Received: by 2002:a50:fc18:: with SMTP id i24mr21819625edr.42.1571943453819; Thu, 24 Oct 2019 11:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571943453; cv=none; d=google.com; s=arc-20160816; b=afd/kmGMjUt151LMCu0Wun0EQYMHaTR+JdZvjEKjEHwazeMuVBLjt9cp42xtTPgkf4 UXzp1Gp6gODGNDKQYPmDIKg1yvYpsDfVsO+GykK9zMzlLs4fL/Berz3ygfLPAaqnnVWj yh36s8rariVxiKlUMRkM76EaPPPEOdu/9orA8v/BKu/9u7srnF78XdDwm+kRi1h9rFK3 sLLWYS0hanCT3opI05zLUmpLK3DVYBghvlWdj7UsC7Vuqq5yAUj1pc6lDxrThGwe/wy8 e9DX7B86CK/Row6NPrzTPsauqn2zkpCRqjMCTsl4aBFZBho3BEuMlWcgPGtURUu7MGDy IlWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FwcPcS9rRsZFrokvJj7YK4RaSiHsyk+ZP9/lfHzcHCs=; b=TiSAHCepPn+ijFts06Rj5gd76XSH1LJuaYUNTJ4P6JW5jCKu+0ArlBKRpDgSH8PY2I J0ra4HKCYhO3+Zsh9CBTqqmDqPN+/ZOjsardEese8uzphNUv3CpgItDsM1AwsCMOm0mv iQL7KCFzm7908a/KXR/btwVP+kJhToiEUVZ2IS8wMHszZXsZUquID4QzIh22+o+bDDVb cik7G3BCnDIxOfuODH1eS3sfotHM7LQ4uzsdQ9116E1lFJ0kFf4ecxxfrvCACBdYRlm9 +DiZFaq/yRjzQn89fiMwfxoyVEPmd+5v4zDA9sYUszxn1ctT7U/+G6dV/H8G+MaZQeVt f+qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QGHV+0RW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e15si10142977ejt.370.2019.10.24.11.57.09; Thu, 24 Oct 2019 11:57:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QGHV+0RW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406539AbfJXChM (ORCPT + 99 others); Wed, 23 Oct 2019 22:37:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:40736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406322AbfJXChM (ORCPT ); Wed, 23 Oct 2019 22:37:12 -0400 Received: from redsun51.ssa.fujisawa.hgst.com (unknown [199.255.47.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9087E205ED; Thu, 24 Oct 2019 02:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571884631; bh=jzD/o5fFFKb4zWGB61Nq3oM/Rw9gexxnXww5qQGCnnc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QGHV+0RWpDokCcVFBTQ6ochibC6yeFefd3NENUYBx6NKaKfgAIC2LHU+i/Z0boyx6 QhDrVJegviiXyxWzpUxADfgu+OjZf6JsncZvsO8Db7CLGgVT6LYPBaP/5hJzfA7hBK OSTURxqzz7+fkE7m8UtdRxnKX+NTmYA8LtNgTeKI= Date: Thu, 24 Oct 2019 11:37:04 +0900 From: Keith Busch To: Olof Johansson Cc: Bjorn Helgaas , Keith Busch , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI/DPC: Add pcie_ports=dpc-native parameter to bring back old behavior Message-ID: <20191024023704.GA3152@redsun51.ssa.fujisawa.hgst.com> References: <20191023192205.97024-1-olof@lixom.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023192205.97024-1-olof@lixom.net> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 23, 2019 at 12:22:05PM -0700, Olof Johansson wrote: > In commit eed85ff4c0da7 ("PCI/DPC: Enable DPC only if AER is available"), > the behavior was changed such that native (kernel) handling of DPC > got tied to whether the kernel also handled AER. While this is what > the standard recommends, there are BIOSes out there that lack the DPC > handling since it was never required in the past. > > To make DPC still work on said platforms the same way they did before, > add a "pcie_ports=dpc-native" kernel parameter that can be passed in > if needed, while keeping defaults unchanged. If platform firmware wants to handle AER events, but the kernel enables the DPC capability, the ports will be trapping events that firmware is expecting to handle. Not that that's a bad thing: firmware is generally worse at handling these errors. > +/* > + * If the user specified "pcie_ports=dpc-native", use the PCIe services > + * for DPC, but cuse platform defaults for the others. s/cuse/use > @@ -1534,9 +1534,11 @@ static inline int pci_irqd_intx_xlate(struct irq_domain *d, > #ifdef CONFIG_PCIEPORTBUS > extern bool pcie_ports_disabled; > extern bool pcie_ports_native; > +extern bool pcie_ports_dpc_native; > #else > #define pcie_ports_disabled true > #define pcie_ports_native false > +#define pcie_ports_dpc_native false > #endif You do not have any references to pcie_ports_dpc_native outside of files that require CONFIG_PCIEPORTBUS, so no need to define a default.