From patchwork Mon May 3 14:46:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 12236089 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.7 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 E44EBC43462 for ; Mon, 3 May 2021 14:48:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF06B611C0 for ; Mon, 3 May 2021 14:48:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbhECOsz (ORCPT ); Mon, 3 May 2021 10:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbhECOst (ORCPT ); Mon, 3 May 2021 10:48:49 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F167C061343; Mon, 3 May 2021 07:47:53 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id 76so3413939qkn.13; Mon, 03 May 2021 07:47:53 -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=WmxD0ZZWyLDmbUI7WJl5Chz/U5d4iCfhGGuYidByI1Y=; b=c/7Dh3OQepXd3Gk7+Ktnjc/Q1371ta4WGDJVxAkXb0L72Joe3A+fNs0b5ySNu/jZoD vinJS+TmbfjEYKiAEX4R9lq6tDPkYOlWnfW54p6wLHRr16yh3U1nPH5k8cw29O2XuN5k vAgrU/G3YbZF6jq8+W/77AmS/QUqQxehMoC6oWYfDJgT9B+ih0/CTwM5oXYYkg9hzn9C 2/zxwc8VAuPm2b+ki/jnLscwtksaMRdc10Lek3dsjl+SYRhwAS6OlUjtFBRxb1pPCRNS ZRvP6/1CemSsV4rUkXoJhE4rNVLeT2q6wdJPPc0vcgkcq3gL/3jdWjNCpoQ0GlrKVTxf FbWw== 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=WmxD0ZZWyLDmbUI7WJl5Chz/U5d4iCfhGGuYidByI1Y=; b=VLVmEFfedjjofQdF4YLfMTC0aQd7GCpH/Y7OQft17FAuJtx/fMiqVtq/xBkM6UVreo sVQXle+cYD4iXvmFt2NEci04fS6e9abXEosaq+0+Dl1TnyDoc+5ifd9pol/zLa0hBy92 IykLge47BB11lWZyWx5uq9D7dR4Cxu9dmqMQYA4HHuS1E8Cpe+lD8A+BQE2Kuav6K7jF pfgXEYxWR+9bsjanB1CxQBC5BkY3CnXxWJuiC20TUkPabycfdjbRKwJ9aZTt2Y/yABNQ +VbTOoojMrwPrK0YSUxkagjUy4MzMPq4lhV2POZ07NRmDLlwqX+Q5oozZIn+BHDlkkmO lKNA== X-Gm-Message-State: AOAM530f7d0lJdmP4Aji7M6sXTCiElZs81iMY4JDikF1LxLyAlwmlOiy RHRWYo9P2N3B4MHIfigM+faPZ2d9u1gd2w== X-Google-Smtp-Source: ABdhPJwJQTQ+i5t7XI+bNqjB0PUR0SiUXldDNi1Jbkj/jxzJyLKY99BDP7WgJCH0Jv+QngE01hMA2g== X-Received: by 2002:a37:7004:: with SMTP id l4mr19996241qkc.476.1620053272797; Mon, 03 May 2021 07:47:52 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id w4sm7801qti.6.2021.05.03.07.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 07:47:52 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 7B8A627C0054; Mon, 3 May 2021 10:47:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 03 May 2021 10:47:51 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdefgedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhephedvveetfefgiedutedtfeevvddvleekjeeuffffleeguefhhfejteekieeu ueelnecukfhppedufedurddutdejrddurddvheegnecuvehluhhsthgvrhfuihiivgepvd enucfrrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhhphgv rhhsohhnrghlihhthidqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunhdrfh gvnhhgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Received: from localhost (unknown [131.107.1.254]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 May 2021 10:47:50 -0400 (EDT) From: Boqun Feng To: Bjorn Helgaas , Arnd Bergmann , Marc Zyngier Cc: Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Lorenzo Pieralisi , Rob Herring , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Thomas Petazzoni , Boqun Feng , Mike Rapoport , Robin Murphy , Thomas Gleixner , Jon Derrick , Sunil Muthuswamy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-pci@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: [RFC v2 7/7] PCI: hv: Turn on the host bridge probing on ARM64 Date: Mon, 3 May 2021 22:46:35 +0800 Message-Id: <20210503144635.2297386-8-boqun.feng@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210503144635.2297386-1-boqun.feng@gmail.com> References: <20210503144635.2297386-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 4ec7839d0adf..75ff47bedf2a 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 @@ -449,7 +450,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 */ @@ -3102,7 +3107,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; refcount_set(&hbus->remove_lock, 1);