From patchwork Wed Jul 15 16:54:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 6799721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8349EC05AC for ; Wed, 15 Jul 2015 16:57:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9046520680 for ; Wed, 15 Jul 2015 16:57:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC8F320661 for ; Wed, 15 Jul 2015 16:57:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZFPyG-00020X-SQ; Wed, 15 Jul 2015 16:55:48 +0000 Received: from mail-ig0-x22d.google.com ([2607:f8b0:4001:c05::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZFPxm-0000OF-S3 for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2015 16:55:19 +0000 Received: by igbij6 with SMTP id ij6so76217237igb.1 for ; Wed, 15 Jul 2015 09:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OSO1yELWlZNJNWwKszNaaRoAd4Thl2fbtKxpaO10jzM=; b=YE9KNZjvzNTC2veV4LBOcijfgjIYdVfsFyXAEYLXrMKyyLH0qJOrzT9m4mU8EojQ5l L/J2u8SYZViZeCg3PFb2JGTQvAJk7pvM82eHp9VQ4a7v+1lBxA1Goo6Zkav5TxBGst4b veoblfoLpdgHmJaiVBfykR4QvBkCOPhtRvu5NtHM5+mwvimZ3lxS9AeG7jvD8r+cXS0B NQc7IQXm4/BnGSolPHWAPfBrvm2dCLciSmZJamLxZF1fLM1tjfr04ntThnA5b2icNoVy TxPU/T2yA7zslsj4fubbKBwTH2Yo9FkHqMJEfeAgUC09jlGjEjARwfQAO3wxoyH6rqMr sLNw== X-Received: by 10.50.17.104 with SMTP id n8mr27783205igd.21.1436979296906; Wed, 15 Jul 2015 09:54:56 -0700 (PDT) Received: from dl.caveonetworks.com (64.2.3.194.ptr.us.xo.net. [64.2.3.194]) by smtp.gmail.com with ESMTPSA id bd7sm1088291igb.19.2015.07.15.09.54.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 15 Jul 2015 09:54:55 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id t6FGsrMl008219; Wed, 15 Jul 2015 09:54:53 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id t6FGsrIt008218; Wed, 15 Jul 2015 09:54:53 -0700 From: David Daney To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Bjorn Helgaas , linux-pci@vger.kernel.org, Thomas Gleixner , Jason Cooper Subject: [PATCH 1/5] pci: Add is_pcierc element to struct pci_bus Date: Wed, 15 Jul 2015 09:54:41 -0700 Message-Id: <1436979285-8177-2-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1436979285-8177-1-git-send-email-ddaney.cavm@gmail.com> References: <1436979285-8177-1-git-send-email-ddaney.cavm@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150715_095518_966905_E73BA9EB X-CRM114-Status: GOOD ( 12.99 ) X-Spam-Score: -2.0 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Robert Richter , linux-kernel@vger.kernel.org, David Daney MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: David Daney ... and use is to force only_one_child() to return true. Needed because the ThunderX PCIe RC cannot be identified by existing methods. Signed-off-by: David Daney --- drivers/pci/probe.c | 2 ++ include/linux/pci.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index cefd636..11ec2e7 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1643,6 +1643,8 @@ static int only_one_child(struct pci_bus *bus) { struct pci_dev *parent = bus->self; + if (bus->is_pcierc) + return 1; if (!parent || !pci_is_pcie(parent)) return 0; if (pci_pcie_type(parent) == PCI_EXP_TYPE_ROOT_PORT) diff --git a/include/linux/pci.h b/include/linux/pci.h index 8a0321a..1f1ce73 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -473,6 +473,7 @@ struct pci_bus { struct bin_attribute *legacy_io; /* legacy I/O for this bus */ struct bin_attribute *legacy_mem; /* legacy mem */ unsigned int is_added:1; + unsigned int is_pcierc:1; }; #define to_pci_bus(n) container_of(n, struct pci_bus, dev)