From patchwork Tue Jul 20 13:44:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 12388387 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 74F01C636C8 for ; Tue, 20 Jul 2021 13:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5601361208 for ; Tue, 20 Jul 2021 13:53:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239168AbhGTNNN (ORCPT ); Tue, 20 Jul 2021 09:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239031AbhGTNGf (ORCPT ); Tue, 20 Jul 2021 09:06:35 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C1FC0613E9; Tue, 20 Jul 2021 06:46:42 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id u7so23934356ion.3; Tue, 20 Jul 2021 06:46:42 -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 :mime-version:content-transfer-encoding; bh=MjtB63O8D6JZEGLQ/GVfQXEaFWYKcg+D2+varZhpuDo=; b=dRiBWdPlS7gD/26YIVIlibyr6MUQmkqIbQCg1O2ad3Vlm1Om6UllVH7PyPSZ961ksi 2LfJUiHW3vw6ft+7UMAoqN7E0JLgPy+fOqV8w+JVfJDS62LYUBCkJ7gAprk9oB2CHH15 ZR+uh1KTSvRUwRDYgLfmTTbo/k1mIvhMwWmJNyQjhn7incwqHGSBJHtUuRS3+GwmNO4t mt48VNGmfIb/Re4tYVBroDo9IjwS1zKZjq/oeeXUHlZZGdE3AaPxknrYe+Y/hytxc7Go LUjHk5FnQLT4k99VK7G1ylZsOSjqLJV4W2RYeedEL5URLS1E4I+QQMA49Te6jlwmWktr jAiw== 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:mime-version:content-transfer-encoding; bh=MjtB63O8D6JZEGLQ/GVfQXEaFWYKcg+D2+varZhpuDo=; b=b5feXPxzQ/Tnn+bTcvm51fcLtSTpCOxMcQSYVXt6pnv826V+PhkNdkjXRm7L7OPKXm GvjQRw5M4pmUQWd8cHvKiFLsKv4ueunR9h+ZRqLrCqcKP57RMF+U4j+YC4JjVy8GYcRn sNTz6nBD7TzPMVylCzUu2BveXNdAMwRU6ntscC0tHD8UqBvj+1pUieeczByBVDswPK1W PBqQoHkMEHUFLL+7LI9ikFR1nSiU1ISfqs8Ta4ObkCrOhoJ41o0IQ43H+4aiyBGtwpIm 8aC8nrnC83QgTNR2ATiUy23387f6Gz8mPkZRz5MYA8/4Tv9491wLMWwlLYiH4oifB1+2 JJow== X-Gm-Message-State: AOAM5300gSR2k4u6PJ3q8EyFO/kgAhsSZbW5YKqZ3nnMFyCi4bWfkKt4 /y3OoBRc///ybP0kfe4DRIo= X-Google-Smtp-Source: ABdhPJzbgEejJohfrCjPWGfeFan9hbOBjdY9WcEs2PV1eNg5yhhrAdS5FuSUc6+qbEvGTVjdjCB2Nw== X-Received: by 2002:a02:93a3:: with SMTP id z32mr27012095jah.33.1626788801697; Tue, 20 Jul 2021 06:46:41 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id 20sm5096218ily.40.2021.07.20.06.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 06:46:41 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 70D2227C0054; Tue, 20 Jul 2021 09:46:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 20 Jul 2021 09:46:40 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedvgdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhunhcu hfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrghtth gvrhhnpeehvdevteefgfeiudettdefvedvvdelkeejueffffelgeeuhffhjeetkeeiueeu leenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsoh hquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedq udejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmh gvrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jul 2021 09:46:39 -0400 (EDT) From: Boqun Feng To: Bjorn Helgaas , Arnd Bergmann , Marc Zyngier Cc: Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Lorenzo Pieralisi , Rob Herring , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Boqun Feng , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, Sunil Muthuswamy , Mike Rapoport Subject: [RFC v5 8/8] PCI: hv: Turn on the host bridge probing on ARM64 Date: Tue, 20 Jul 2021 21:44:29 +0800 Message-Id: <20210720134429.511541-9-boqun.feng@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210720134429.511541-1-boqun.feng@gmail.com> References: <20210720134429.511541-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Now we have everything we need, just provide a proper sysdata type for the bus to use on ARM64 and everything else works. Signed-off-by: Boqun Feng --- drivers/pci/controller/pci-hyperv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index e6276aaa4659..62dbe98d1fe1 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -448,7 +449,11 @@ enum hv_pcibus_state { }; struct hv_pcibus_device { +#ifdef CONFIG_X86 struct pci_sysdata sysdata; +#elif defined(CONFIG_ARM64) + struct pci_config_window sysdata; +#endif struct pci_host_bridge *bridge; struct fwnode_handle *fwnode; /* Protocol version negotiated with the host */ @@ -3075,7 +3080,9 @@ static int hv_pci_probe(struct hv_device *hdev, dom_req, dom); hbus->bridge->domain_nr = dom; +#ifdef CONFIG_X86 hbus->sysdata.domain = dom; +#endif hbus->hdev = hdev; INIT_LIST_HEAD(&hbus->children);