From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DD61C43464 for ; Fri, 18 Sep 2020 20:03:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4931922208 for ; Fri, 18 Sep 2020 20:03:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbgIRUDk (ORCPT ); Fri, 18 Sep 2020 16:03:40 -0400 Received: from mga12.intel.com ([192.55.52.136]:55347 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgIRUDk (ORCPT ); Fri, 18 Sep 2020 16:03:40 -0400 IronPort-SDR: 7LyqZMwK8io+MvJcN8xNbzxdOY7uTgYMwtFSOE9AQ4UPHjWX6f8iFMeYuTeOseu/dmS5TOuFEp yoD/mo9kUHEg== X-IronPort-AV: E=McAfee;i="6000,8403,9748"; a="139519428" X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="139519428" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 12:58:36 -0700 IronPort-SDR: CdozuX/OD++iyTLRl/RlCw3GXWbaM3hct99mLAvRS4Z8QHwf3WKyRJQQ3aJpvt8v/9uERs/wkx UUBqRvgu9oBw== X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="303453422" Received: from pbashab-mobl2.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.254.127.73]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 12:58:36 -0700 From: sathyanarayanan.kuppuswamy@linux.intel.com To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: [PATCH v9 1/5] PCI: Conditionally initialize host bridge native_* members Date: Fri, 18 Sep 2020 12:58:30 -0700 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kuppuswamy Sathyanarayanan 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 03d37128a24f..0da0fc034413 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 + bridge->native_ltr = 1; + bridge->native_shpc_hotplug = 1; device_initialize(&bridge->dev); } -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A90BBC2D0E2 for ; Tue, 22 Sep 2020 20:54:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7841623600 for ; Tue, 22 Sep 2020 20:54:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbgIVUyt (ORCPT ); Tue, 22 Sep 2020 16:54:49 -0400 Received: from mga05.intel.com ([192.55.52.43]:11102 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbgIVUyq (ORCPT ); Tue, 22 Sep 2020 16:54:46 -0400 IronPort-SDR: VMHRDGZuZ/MHx7/5N692IcyEwkMD1fC7YzTPWTrY8vbz8vvPgg260/Km+7nLGaC7UQToQ8wzm/ J5UzCcOk259w== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="245542542" X-IronPort-AV: E=Sophos;i="5.77,292,1596524400"; d="scan'208";a="245542542" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 13:54:45 -0700 IronPort-SDR: RibewKUXrtIVyaX6+3KdOSnam6ywd94ODuD342Mkp3kfWNM1mPuVKOmN7+LyQMY4sE37X+Vk1P wBLkdkvvoj7Q== X-IronPort-AV: E=Sophos;i="5.77,292,1596524400"; d="scan'208";a="510718934" Received: from fkhoshne-mobl1.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.255.230.168]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 13:54:42 -0700 From: sathyanarayanan.kuppuswamy@linux.intel.com To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: [PATCH v9 1/5] PCI: Conditionally initialize host bridge native_* members Date: Tue, 22 Sep 2020 13:54:28 -0700 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Message-ID: <20200922205428.QuRiw2TYYakt7lYurd71D2VmFHMfSeK0ALvS6bawV2s@z> From: Kuppuswamy Sathyanarayanan 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 03d37128a24f..0da0fc034413 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 + bridge->native_ltr = 1; + bridge->native_shpc_hotplug = 1; device_initialize(&bridge->dev); } -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FAC0C4346E for ; Mon, 28 Sep 2020 01:11:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 241F423A40 for ; Mon, 28 Sep 2020 01:11:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Dh46LfDc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726504AbgI1BLq (ORCPT ); Sun, 27 Sep 2020 21:11:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726396AbgI1BLp (ORCPT ); Sun, 27 Sep 2020 21:11:45 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1793C0613CE; Sun, 27 Sep 2020 18:11:44 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id m34so6844033pgl.9; Sun, 27 Sep 2020 18:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=jnJHULZko1WMf982dRYBhdTPK/IAC09MFg39qDolqYw=; b=Dh46LfDcCNj7eSPkEt1pEhl2fpxYl6gW+mG8Cc6YUjWmIQXmWoHkY/LVXUzBgwWCxj q8Ewmz4pkksibq9f7Qx9u3Tuv1JZKhXVIEtY+Fg4hmKfilUrmVi7UF/hntkNrcXK7tJ0 OXWVJyeL0HiS347UWqqHtEayxjKn/asuIqUUptL0wm4V6mhQQ4aFlB1bnX0Mrr9CEGuQ aayUI1pVYDF3QlSGpRQ9rrJD2XxWy5ypxGiSi1zYXkWjQpDvQtYmFTwTr+Oofkc13tCL xHBm2PWFu51YhYpMmlTFPYfuwpcVqYhAIaYuOvwpFuIeT6Ck7oTpggTpVTqMgSxKgDDJ F7eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=jnJHULZko1WMf982dRYBhdTPK/IAC09MFg39qDolqYw=; b=J4nDaZSR1f/owhMpGjzHmWV1G1dYjpdFHG7faMEmyEJi80YbNSCRumfE/npSnO3aY+ EFafDoHq8g7mRiCR4OxJstpzFQcby+QY6DdDMR9VMzhEXHpAFBBWRYf5dQLTK+xZsT3n Y9qucJ1BVmpOVIIpsSjbWvK1BRvgct89cBu2KBwDc5+biRC28hj8L/6kBvIPCHxQSGJY UBhmfTJY5bu1ueWzkfD1brCWUpUxQuTnRtKD5YSF9sRebPlagO/NPRftknux24yZyZqj jr+pv7PFscucjn6iaLq+UI8JsgRy8rEIg2vZR4vFBBBmKwVyjerzc3XYThS0hnP1sMSv mFIw== X-Gm-Message-State: AOAM533Q8Kokq2ijvaiTealP8GlSWzk3G7pw3f22BHPSZtE6ynV5Ux/n 4zArNnfr4lOKeq1PLvUyClYh/WSH2apmzw== X-Google-Smtp-Source: ABdhPJw4taYR14MYgwiiKKT/fgmtOU30T1hHvwb2nKN0oITv0s5yWS/tAaNazsLkKIqNfmgUT/HuQw== X-Received: by 2002:a63:34c5:: with SMTP id b188mr3185824pga.219.1601255504642; Sun, 27 Sep 2020 18:11:44 -0700 (PDT) Received: from skuppusw-mobl5.amr.corp.intel.com (jfdmzpr04-ext.jf.intel.com. [134.134.137.73]) by smtp.gmail.com with ESMTPSA id 137sm9368048pfb.183.2020.09.27.18.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 18:11:44 -0700 (PDT) From: Kuppuswamy Sathyanarayanan X-Google-Original-From: Kuppuswamy Sathyanarayanan To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: [PATCH v9 1/5] PCI: Conditionally initialize host bridge native_* members Date: Sun, 27 Sep 2020 18:11:32 -0700 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Message-ID: <20200928011132.Iol0y65gliQfCgdzM0ZLFGRM5CCPmlmdJu7sb0ZgeEM@z> 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 03d37128a24f..0da0fc034413 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 + bridge->native_ltr = 1; + bridge->native_shpc_hotplug = 1; device_initialize(&bridge->dev); } -- 2.17.1