From patchwork Wed Aug 11 15:36:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 12431469 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 B86FAC4338F for ; Wed, 11 Aug 2021 15:40:18 +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 80B7160E09 for ; Wed, 11 Aug 2021 15:40:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 80B7160E09 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=QSt95/cgNRIPSreet/trsHe7GH6FqSwrRN29pZfZeiM=; b=x3+kepnPtn7ek1 yj0Q/yccLXNMvbHuQRoCzqctMKcUWwYW62iD18VxxWqiEjRCqXMZ52kgXqbg46Cyc+8tq+L2BT6on FALQA4RpLRFLEN+n0D/grJHHGjCG3RRrUDBB1fXSl4EbFgIX914agb08UZkruBUeu/M/Z/8gufE8M X+O5VhBpSRyJknFYhOxCeZw4tzrDYTBugeBEHtx5fqAuEFBp1hPPwyuQZVJNtjm/n1/cQSwngZxRo 24YL4Ik5PE8sB2k54D/T8MIUL2kfG5orrmOdfXyNe5pCJpyq4AkvMChx9YwSMyyZXQJmWmhVC46dj XWDk86Mq+xBM9Cbbh42w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDqIv-007ZYw-3N; Wed, 11 Aug 2021 15:38:05 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDqHb-007Z8D-AJ for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 15:36:44 +0000 Received: by mail-io1-xd2d.google.com with SMTP id e186so4150164iof.12 for ; Wed, 11 Aug 2021 08:36:43 -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=DQztCj7/CCGbKaKfsGCj2ylvssWy2hoSLtQUB8lGvqA=; b=XxdVMm6fenLsjMT3qAxdEjlJ+RMQ5X4WvI9Cx8RWNlvtVC+bhg0+IiOIOWs6QAXGzW jkQe1TurjzzTv9GUVGVu0YTsBAO3Q9XHzzW4O88HO8drG9qcx8EKovfgNPMeut0/preL 3FCzsFlWsg7vGO1XaDZhP1CcV8lkQYW5VV8mja8Yf+odS6OlCePmYV0P9s6UaHmmEW7f ziS2asakbEYEYnsvZLuj4tJpGTNJGpKB8WjhZFG8t4r1A9hMqA4oaVQ7Ko6ueU17dW8z SKaBDqcbedh7KSlTBOD4QTvLHGsU3gpdmmTaBb3PaUhQpaE7hpGwgStS9ew5DUu7zjWw EtoA== 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=DQztCj7/CCGbKaKfsGCj2ylvssWy2hoSLtQUB8lGvqA=; b=BQiNqSbKQ3lUs3ogNEUTxKSrL82gA3WNd/lLS0Cw5xcclpaWhPfLgwzMEuOJ+RGIvq h/WKPO1AuIa6BWCcb0sQkBQne6N7SfBdZcgx2zuWnuFsE8B2g70Z6HUpsprl/hdjBB8a khm0Ty+pAHwrAMbDbOy7sTo/liu88eetKGxlm0LEfj/DnLIpHMlrplR0WxHTsw78CfHu Vwy/A7TRyTpYacIZpF1HuydQWzxwV44lhcZ6VDRfIJQsXD5MHqpfV4x8SCnmmtl4JzmC /S+FXjWzD16kIZlPgrmZ0HE3u2DlNfhGsK2wvcIMlxvs3c0R4jl4igKgA5bqsdbiI0ag Wdpg== X-Gm-Message-State: AOAM530OndWQ0HIpQwdcrVP6t+asWVzAhO6g+i0TSe45oWhd1LIonirS 8ecCeFz4ri1NRQbZPPPmL+4= X-Google-Smtp-Source: ABdhPJzLLBPJ4N7FhEZx/e0t1/uMyV5jGKrTQJ5t5039LpTMBPPzh67wbfKPDN5YlpUF01jwpsVe+w== X-Received: by 2002:a05:6602:1848:: with SMTP id d8mr32570ioi.72.1628696202630; Wed, 11 Aug 2021 08:36:42 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id m1sm13261529ilf.24.2021.08.11.08.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 08:36:42 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 3382527C0054; Wed, 11 Aug 2021 11:36:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 11 Aug 2021 11:36:41 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrkedugdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhunhcu hfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrghtth gvrhhnpeehvdevteefgfeiudettdefvedvvdelkeejueffffelgeeuhffhjeetkeeiueeu leenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsoh hquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedq udejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmh gvrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Aug 2021 11:36:40 -0400 (EDT) From: Boqun Feng To: Lorenzo Pieralisi Cc: Catalin Marinas , Will Deacon , Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , "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-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-hyperv@vger.kernel.org, Sunil Muthuswamy , Marc Zyngier , Arnd Bergmann Subject: [RFC 5/5] PCI: hv: Remove the dependency of pci_config_window Date: Wed, 11 Aug 2021 23:36:19 +0800 Message-Id: <20210811153619.88922-6-boqun.feng@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811153619.88922-1-boqun.feng@gmail.com> References: <20210811153619.88922-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-20210811_083643_390632_D8D8D0D6 X-CRM114-Status: GOOD ( 12.61 ) 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 The ACPI device information is now correctly set via ->private of pci_host_bridge, therefore no need to use pci_config_window in hv_pcibus_device, so remove it. Note we still need an empty pci_sysdata structure for non-x86, because it's x86-specific. Signed-off-by: Boqun Feng --- drivers/pci/controller/pci-hyperv.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index fd3792b5edcc..f2b977ef7b84 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -448,12 +448,17 @@ enum hv_pcibus_state { hv_pcibus_maximum }; +/* + * Defines a empty struct for non-x86 architecture, this is OK because we only + * use this field as an "anchor" to get back to hv_pcibus_device object on + * non-x86 architecture. + */ +#ifndef CONFIG_X86 +struct pci_sysdata { }; +#endif + 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 */