From patchwork Wed Jun 9 16:32:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 12310795 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.8 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,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 C97D9C48BCD for ; Wed, 9 Jun 2021 17:23:45 +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 8C2F861376 for ; Wed, 9 Jun 2021 17:23:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C2F861376 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@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=WwVp2HAC5MVWHU08utVHY5SX1G7BDp4QiJui0wlqVR4=; b=ySTf5KqqqJwm70 HCKwHrxciaSFdke0u4BYdwbsrJ8bflhRt2EDcykBLDoVacc43AH1IodZQJJVJqnxjb6qYR1oA6vGq STyoKv8OBnVkLgjFooTC0eqOex9uStvOKNYscbbirmNj0lD3sQ1NbMd0EzF39DfpXLY6Ifxuymodg TWhVbXY8uoOthCZ0EsKtfLw23O42TgoUawdyFo5FStmiY+Ol+1bOga24wM6TWFf/O6wqZ9U/2huzv iAboQiourEN3JvRbOrvw6nZbsiNjCOfJZ7Cc0+N9Cb2e/pJNWJM1rkDZYU7m15qQFuwnuFPDyzvAr OrRVCXPYO1e3mXC+ix8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lr1t9-00FGV2-HL; Wed, 09 Jun 2021 17:21:13 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lr181-00Ex52-IF for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 16:32:30 +0000 Received: by mail-io1-xd30.google.com with SMTP id k5so13600054iow.12 for ; Wed, 09 Jun 2021 09:32:28 -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=15t7ZKTSX9WU503SVEKMIKymOsp0yb03DbikdqeGm38=; b=IL895TA+hvrX3n0qdh9JJZDlsA+zMM40QHD9YuLGcFvWyFmOBbWr0lwsaAEA/sDP3K iFVOzZzN8SgYt1T/Imb/+iyDliuKqHw3rq4mBWgspDpmiKr06PA6iLRSvIt3hJB4O1aY toqIyYe8lCVdoENWwYcnZwWSV+xVpKpFiMnbwCmTqhaDKg6ynHNUHy+4iqZkdyC9pr61 IZ7qNz3LEV6Ip/F18DKU7VLSouVvRLCcd/xmj5hUBWpvkH8y9VvsFDhs2h0qpbpq4lVg rwdBYEpcXvk37O5uAA6bRMrGKBTlcMygnp+qYboJC1W7sp1RKrUtXJsqhZU90Lw0YmG0 tipg== 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=15t7ZKTSX9WU503SVEKMIKymOsp0yb03DbikdqeGm38=; b=cprvuvIIQz/4keL3h2Vh0/oR4bWlncoNt/k4/zhPp1fMr+V9HI8ZgJWspHsNu4eDCk VFRWxQyJbdndsN6Z5PMHJaMJJCimjEnUNaoTpRGUGApM3fKnPFyGGHp+UWr4sunYGVjG BrfWa/UYBt6N4LVwhTnWmSFAEUIe0MHtOH/gHn5WKSoF4VEpD3WSlqqtjrJTFarbKMg9 wTHfFilClxfrqGM9CvHMPYB9MrEqBu1AxQdjbs9IQf6dgi6LNj5lXF76Ood4KtFFBwas DgHtF2gbDYRaCGpIoF5iQIEiEdrV5IW9/I/yyot3rFdTFlCWR27jffw9F7/XWGD2opLa 1OdA== X-Gm-Message-State: AOAM531x0ag3DrlPTZo9NsiO9RT/3oLNyUqmFi0w3RfRNGLsH5Pr2ZTz 0+rdVlBnIOvSAoWs8Me4YzY= X-Google-Smtp-Source: ABdhPJyhgEqY3+4woUSGc66Hoo7NTM4a2l3JyXWUFWWECsf/CaRguxBXkWADIBSg3+gt9uwmlaziiQ== X-Received: by 2002:a05:6638:2725:: with SMTP id m37mr461409jav.121.1623256347937; Wed, 09 Jun 2021 09:32:27 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id i7sm263328ilb.67.2021.06.09.09.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 09:32:27 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 7184D27C005C; Wed, 9 Jun 2021 12:32:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 09 Jun 2021 12:32:26 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeduuddguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeehvdevteefgfeiudettdefvedvvdelkeejueffffelgeeuhffhjeetkeei ueeuleenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Jun 2021 12:32:26 -0400 (EDT) From: Boqun Feng To: Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org Cc: Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Lorenzo Pieralisi , Rob Herring , Clint Sbisa , Boqun Feng , Ard Biesheuvel , Sunil Muthuswamy Subject: [RFC v3 7/7] PCI: hv: Turn on the host bridge probing on ARM64 Date: Thu, 10 Jun 2021 00:32:11 +0800 Message-Id: <20210609163211.3467449-8-boqun.feng@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210609163211.3467449-1-boqun.feng@gmail.com> References: <20210609163211.3467449-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-20210609_093229_646452_77802DD6 X-CRM114-Status: GOOD ( 12.63 ) 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 16a779ab9ed4..271d0b6d4796 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 */ @@ -3099,7 +3104,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);