Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp18701pxx; Wed, 28 Oct 2020 16:46:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyl3O+YxhOW40tatoIYyeVM4VU1D4MSrWhm7IFo2LUsXvDBfJPAbRvEZlrkgJyOyX7lILz+ X-Received: by 2002:a50:d88c:: with SMTP id p12mr1332244edj.352.1603928793457; Wed, 28 Oct 2020 16:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603928793; cv=none; d=google.com; s=arc-20160816; b=O+OSNqJRTw6GJ3fqOtTPP1VH0AQFBUodkuCKPddX4lliQg+gBTCzvxVFL6Eo3F5Z39 RWgEP7nalOmeXUlyFjJTU4PwhvDjB9aK/UsDeZnvjOvse46vw/A+TaMPclJEZxVSZv8a Mjtj/hno17+L62OS2uTAtDRIdTnvIjYj+S8hkQzDCBGn8YSKRbZ0xDzpN1yNNVN9D9tq v/AhbL1GizzxD9RisIGq1RWt3vu3FAVOUdG62zy/RrNwrsw8A9dkoT0lAY5jPQM6YP08 brAsdJiRN2QaRzmtrohueL8bDQGrAxabnm7Ck5nWH4gCVfT93HQGajZvteDY4DyUFUS8 PZCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9nvUcWbLCYzP8icVZr09w080lWJ1d3JwvhqvzFXlS88=; b=LCu9QDW1uSeMoIHqKN5rTL0Q/zVIbA+5GnlzPqzBsghuzcrjw/8+Mv1TVuQLubP+GE yasuKLZo2j5O7LunQSVyrTntJ3OPNCYtfm30jNXjQ1wNnB1k/o/1G/7bX/NvZkv2VuMS ukuG1iFk4BINCEcS8F4pRm4VBeTBx29iSfqqO4tLVyZB9Z9WowF6/htdi3j/8+OPft+Y 9tWTlSab0NmFTUw3cfVIb3VgPnbVl72O1vLMSOpw1rfOMOhp+R2XxvukWQvdR0NGHKTV gDOdiTksEN7jkGk8QvhvscTIksu/10Ygr2Ttg1tw2KTNMaPzSyRmtJ/nlHPiYu30O47B qSyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ub5PcH6b; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h34si795206edd.609.2020.10.28.16.45.52; Wed, 28 Oct 2020 16:46:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ub5PcH6b; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390548AbgJ1Xnw (ORCPT + 99 others); Wed, 28 Oct 2020 19:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389612AbgJ1WvW (ORCPT ); Wed, 28 Oct 2020 18:51:22 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87CD3C0613CF; Wed, 28 Oct 2020 15:51:21 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id w25so1219723edx.2; Wed, 28 Oct 2020 15:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9nvUcWbLCYzP8icVZr09w080lWJ1d3JwvhqvzFXlS88=; b=Ub5PcH6bmuPUiToAtOG8mBCdmg6ZwtsCWGz3IaGkjVR4sH9NEqa6PkWeR5A0CQNBSh 3d0bT4egjdhlkvJWexgeTQvgx+TBaYydBnQDNjZne7ZCSyO1J51X+iLeCK6gv5esOWmJ JUETbOcUMKtz7ebHTxiek/PvZAXvSBKTYfPK3RltbqUcrfsqsBdc7BX4ESvph9Zoy2NW oATYYx6k9FPJbqvYMMXe5Uq11KpM1CHuSYiUqcPuCh6+VVFKASXnguYRIWFgdfJAKPU/ A0YQEpB7sRwLNUYKO9xviPdWAzXm8IDsSV7ekiVif/RMjMOvmxideHvaM6f9a1bGvzNN iv+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9nvUcWbLCYzP8icVZr09w080lWJ1d3JwvhqvzFXlS88=; b=sxY3lkAq0R8tY5FiqdPg3sdW9el0IYlDcO1jhFJRgfTaK5vGniz03wvIfWVkyG2YNH tv0wPsMOwUtQ6brd1NMrXr9PPQHzH2Dvkc5X2PEvB2iKTzIfdjjH2AtbL+gSDC+TYWiV OmG4D8jJFoOUMcOkmxouLaBO1MMiZRQRICByjPOhKHeL7KtufIzqjKBEhXtoTUFAlufP GCBU5782tP1AxbR4aqa61tDr2+DMo8dESEAzQnIalUmdfzySMJq8WkvNy4KJrZpKAvVN 6DmQ472TqFWlj0P8tG281ciV7PgWWw2mnOrlLAQ3p17npBSDNjhlrYVZzqgIn9y0DGrf 6DJw== X-Gm-Message-State: AOAM531WJyIm1dBp9fT36dx0qrAbvZg72ZwK8jgAU3aES0eRMLi7xcTW GMh0gDMSsoCryXVO0caqe/+828W8sfEPYYXYKpRR8+Xw+NA= X-Received: by 2002:aa7:cb92:: with SMTP id r18mr6339211edt.13.1603865370008; Tue, 27 Oct 2020 23:09:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ethan Zhao Date: Wed, 28 Oct 2020 14:09:18 +0800 Message-ID: Subject: Re: [PATCH v11 1/5] PCI: Conditionally initialize host bridge native_* members To: Kuppuswamy Sathyanarayanan Cc: Bjorn Helgaas , linux-pci , Linux Kernel Mailing List , Ashok Raj , knsathya@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? > + bridge->native_ltr = 1; > + bridge->native_shpc_hotplug = 1; > > device_initialize(&bridge->dev); > } > -- > 2.17.1 >