Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp257902pxx; Thu, 29 Oct 2020 01:43:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOK58kXD11g2EcPYVgTID1smQowhNhyIn5N20sP1vjRdKjIB/mjlZ5rn0N7sfbHQgqm3ik X-Received: by 2002:aa7:dc12:: with SMTP id b18mr2800201edu.295.1603960985432; Thu, 29 Oct 2020 01:43:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603960985; cv=none; d=google.com; s=arc-20160816; b=XMTZWfp8lt+U6c8ugKTaPaOmaRIH5lsH9Fj2XWIKw1BscrnSlxf8wBgpf0v4hg7o0e 0xtH3jZlGCGdcsQQj6RAUfErsFtnJLQhX1Cwo+ilLaoAxgagv/qrpddKK3065z49wEl6 H84HqJvYZDgScvCp9HSzIK/Vw/+vcygjn2X1+PnynIaxmwVHEmkzL2aGOwWG+fPJiZ7f nTBYgyxi7PcWG4NhKVYeiPvDlMqJjfCbGrb+FdpojCRUxx9dx2FI7MbrldcNUSQvxlnx 0PCRoa2I44ieay/ToCMnGrUuWoXqhMY/1vi0zvW2dG4eLW7zur7YMG/dAtI4yDBBWvLu BLfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=R3jXUcSCzC/JAWcvOgOkkFBYXhrg1hrT+HtluLXcG/M=; b=0OG71p9NLluhKBdcLN0QBVJhn1nJNHE6gKE79MSZ22cQEbr6+xsMtImr0OhcNa9JN0 45BPUCtdw5dOrhceVy0DRHZ44P/JP4V/w/VgecRCmxdQwkg0lI3ALpvk6hThtVkoRqGM ApisJGQZ77FjfqUGxWOSIYJSo478Zvg18rTJDuv5Fc7opUtjrVVQVb+Md8IQBxBko1DU PrpkhaVdDGu5yWdENHxTpNlfCI5adXul+cMg8wd43HMFH9FSEiypWl3GuBUQUQxhtoih eF3VZ8ZlqSwkNt58I3m2zw4d6fGF9GpaMJjlUjpr8MfjWRr0pAvaN/zLKMuqrh7vsRcQ iZhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si1489574edl.282.2020.10.29.01.42.43; Thu, 29 Oct 2020 01:43:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403972AbgJ2A7y (ORCPT + 99 others); Wed, 28 Oct 2020 20:59:54 -0400 Received: from mga18.intel.com ([134.134.136.126]:16196 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731561AbgJ1WR3 (ORCPT ); Wed, 28 Oct 2020 18:17:29 -0400 IronPort-SDR: rdRA8M3bw7vFFH0a0PPCvONQSS/tI7Hu3uQIYjIlW9MsONDqMebVodfb7sIT+n+syxla+bsQ/M yGWVWtVRd3IA== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="156072242" X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="156072242" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 10:14:11 -0700 IronPort-SDR: 4YVU2uW+/l5QXaisbX2aM9ahPxQ6TtDiYZso8e6kxGgGUplah6Dy87BbJ8sy/cRhYrV2nm3ItO vZH5r+w+PlgA== X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="536311450" Received: from rramir3-mobl.amr.corp.intel.com (HELO [10.254.71.48]) ([10.254.71.48]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 10:14:11 -0700 Subject: Re: [PATCH v11 1/5] PCI: Conditionally initialize host bridge native_* members To: Ethan Zhao Cc: Bjorn Helgaas , linux-pci , Linux Kernel Mailing List , Ashok Raj , knsathya@kernel.org References: From: "Kuppuswamy, Sathyanarayanan" Message-ID: Date: Wed, 28 Oct 2020 10:14:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/20 11:09 PM, Ethan Zhao wrote: > On Tue, Oct 27, 2020 at 10:00 PM Kuppuswamy Sathyanarayanan > wrote: >> >> If CONFIG_PCIEPORTBUS is not enabled in kernel then initialing >> struct pci_host_bridge PCIe specific native_* members to "1" is >> incorrect. So protect the PCIe specific member initialization >> with CONFIG_PCIEPORTBUS. >> >> Signed-off-by: Kuppuswamy Sathyanarayanan >> --- >> drivers/pci/probe.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c >> index 4289030b0fff..756fa60ca708 100644 >> --- a/drivers/pci/probe.c >> +++ b/drivers/pci/probe.c >> @@ -588,12 +588,14 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) >> * may implement its own AER handling and use _OSC to prevent the >> * OS from interfering. >> */ >> +#ifdef CONFIG_PCIEPORTBUS >> bridge->native_aer = 1; >> bridge->native_pcie_hotplug = 1; >> - bridge->native_shpc_hotplug = 1; >> bridge->native_pme = 1; >> - bridge->native_ltr = 1; >> bridge->native_dpc = 1; >> +#endif > If CONFIG_PCIEPORTBUS wasn't defined, leave them to "unknown" value ? By default all of them are 0. > >> + bridge->native_ltr = 1; >> + bridge->native_shpc_hotplug = 1; >> >> device_initialize(&bridge->dev); >> } >> -- >> 2.17.1 >> -- Sathyanarayanan Kuppuswamy Linux Kernel Developer