From patchwork Mon Jul 26 18:06:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 12400511 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 D0967C4338F for ; Mon, 26 Jul 2021 18:12:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 944AF604DB for ; Mon, 26 Jul 2021 18:12:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 944AF604DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Cg4KJK9JnmVrsDlRX5RU28FRotfHqGaOG2VwwYgPgcw=; b=Qh2ZwiQ1QYCZKC Q+5sS/XSCIE7BnZ0jKmraifZPAiORCQgVaayR4vidJUZ0R7q4b0D3wXd8lqtxrus+X/i0vD3SmCbF 1Nvi+R0v8z3ocQCIQRhwwxj+/8OzdEFNedywabhYABXqrm2oSdAYB0kjfgtca9P0GcY5/ZM0Ysvmy JIvJTD2IkqgKMgXM3Mh31oTMYbMTs/CCKlJUbCQCIwe7+Qy/AYDxHAytlN8hGmKALhNaBsYFQBgIg VQtw0eNP9DsRCfPAKkKdWwoxmBQLL0jTRT5IarFBagmEOqgbgr4u7BLViD8MiUmpx7hNYAuQ4W20B Ko13CTCRBvtB/fZvdm/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m854R-00CD5p-NC; Mon, 26 Jul 2021 18:11:20 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m850n-00CBrJ-Er for linux-arm-kernel@lists.infradead.org; Mon, 26 Jul 2021 18:07:34 +0000 Received: by mail-il1-x129.google.com with SMTP id h18so9817898ilc.5 for ; Mon, 26 Jul 2021 11:07:33 -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=1ExxtPk3m7cD/MyVHcJHisgBq5NdaixHar/yvts63oY=; b=lu6ztsDonsig5sCIETowNoTKgft3OXEsGkWrfkw8He3KqD/0JU/DK9nSpf258sg0Bz i9CfwO0MFWfyclZTqiF/nY+UPtRMwrN26ANS2zqMruPGcvbZGskxaB+8QglMK2oq2+E9 d+gHrJ+HZLU7yMxzU9WjOL7oluVtm0ZLGtISL9vMNMWIySFEh9LzdRBDSNoFmKc5qEx/ Tq9YpvdpkkpR5WucSZPhHUJog0DGKCcL9OnvqS94uUV0cEaCaUkNOBtC11zkbFVWFVO1 s3aeZ7oHB/DX7pFnT9+WCcvGTsySvYYyGQnt4YkvAkLqd8pSSGQ8qgFJXetJNYCsaDIW iLRg== 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=1ExxtPk3m7cD/MyVHcJHisgBq5NdaixHar/yvts63oY=; b=qjIGjyWYjaTnET2y6fd0DN3Obq09kOwYOYJ1MHwJIGydFbSxAdDhA3O7ZolZPlv4f/ L1pTh8KcLcsY4sooQGGnAoMQ+Y1NMHYpQBBPYttYbJ/fwZcjOtwh2QoAf797K5xcsfJ5 R9b8Tk65tmV9y2QKCVYZ2gP1Q7QoCKFt/jLfdemkNOL9VhkBarzzPbVKdNGdhmOdXsiC CD1jnnLsR14ukgSeS/JgBX/0YVb6caWpok0VUtTMgwExw6o92KuksGw8o8qCF3zG4F5Y dlOZTmHdPIhIjuaNN0cKnrjMKjCd1aTi/yilIURdzNEsGNCQzloEbBM8JC3G/8ZO+j6g JgaQ== X-Gm-Message-State: AOAM532oP73tUPuwZr+vRffnRL0qI2tYHqKlgA3O6rJW8uMdYFcsnSOS OSgLZAoVz5RzbezHeD9ziAc= X-Google-Smtp-Source: ABdhPJwjo+fF9BZyZ1BakHMFl5O/MdShV0ZbSl+l/TnHSzCFG+swYnuCtJh3DE0ifq0bZhyUxaJHcg== X-Received: by 2002:a92:260f:: with SMTP id n15mr13843918ile.143.1627322852708; Mon, 26 Jul 2021 11:07:32 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id t2sm269781ilq.27.2021.07.26.11.07.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 11:07:32 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id E2BD227C0068; Mon, 26 Jul 2021 14:07:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 26 Jul 2021 14:07:30 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrgeehgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhephedvveetfefgiedutedtfeevvddvleekjeeuffffleeguefhhfejteekieeu ueelnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepsg hoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedtieeg qddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfhhigi hmvgdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 26 Jul 2021 14:07:30 -0400 (EDT) From: Boqun Feng To: Bjorn Helgaas , Arnd Bergmann , Marc Zyngier , Lorenzo Pieralisi Cc: Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , 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: [PATCH v6 8/8] PCI: hv: Turn on the host bridge probing on ARM64 Date: Tue, 27 Jul 2021 02:06:57 +0800 Message-Id: <20210726180657.142727-9-boqun.feng@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726180657.142727-1-boqun.feng@gmail.com> References: <20210726180657.142727-1-boqun.feng@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210726_110733_547323_7ACCBA41 X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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);