From mboxrd@z Thu Jan 1 00:00:00 1970 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 1601AC433B4 for ; Mon, 3 May 2021 14:50:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 89662611C2 for ; Mon, 3 May 2021 14:50:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89662611C2 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=desiato.20200630; 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=8JSEtuckdZltaZqy9/xkwbiGyFlGBGQQEBNTsxQa4V8=; b=koS/a4YCGzKtzHucAr2qloAs+ DI7JIoTP6155h023Aac2NT5MLNLsqQDgcMppeuGnTSTIJXDxoZem8RuBA3fB/rdKFdpi0kLWbFks8 U92QsVxEtmELr679BauitOo9nj9XC/4AAqcr7oxjVROFkfD+FSCGfhz5GdK0F/1Qp1/DHJL8JNpMX B7NN8OtmEXD13dB17VAi76bDQKaSckmMI5ZrzNRgnDTWbIjSeqO67jQVBUMyRdAdL3bWwiDT09GNj QUSf4C1gjuNbsJON0/7zoMNI30MRZrcOJSd0fU+2Fqhuw4FQ0z4ISlwNiEcOlciyXV9VYEaoSvkT0 7nhsptJtg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ldZs9-00E6jQ-MK; Mon, 03 May 2021 14:48:34 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldZrT-00E6Y4-PW for linux-arm-kernel@desiato.infradead.org; Mon, 03 May 2021 14:47:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=ZaynnOWtz1Te8wfxtYrLIk63miL/F4a1HGn3nv7Urqg=; b=zkCG4XmevK6XESMQkG2J8pW1eQ bAPrFYibA63BKbDDnbVxaOmsXWP78UgLB2sNa+qGqhtsJXxAan9Hevffi7ud/8x9ImLNseVnG8OvK pc9kfcnZPD+ug5JwklL0ujGorT3RPi5LOm400a3H9NEI3cT3E8P7RCmZYPYUDm7s6B8R2UrhQSUKA q2uCI/9xotRxJ203e6na+M8NlLYRCMIunC6Fvxb5q7ZKZ909zTXBQ1euFjAAUT2csSGugXFQGb3K/ INuI7lJ7vN8Se87MBu2np8PM2JBu1hFTf/oGNxgDHv9Y+Fw7aWAHVZFH5aP8cuOGJM6NEGmOHUzvL eoDY2Lnw==; Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldZrR-0038d6-Aq for linux-arm-kernel@lists.infradead.org; Mon, 03 May 2021 14:47:50 +0000 Received: by mail-qv1-xf29.google.com with SMTP id jm10so2669246qvb.5 for ; Mon, 03 May 2021 07:47:49 -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=ZaynnOWtz1Te8wfxtYrLIk63miL/F4a1HGn3nv7Urqg=; b=f/kTbAKtjUtsRiWLTilOvljJRnbusQs75pq0RiLwmv7SAWfvilihFauytr+8eYpRCG p6Bw1dlvN0JUvKcbDHNfaePTMO5t9yoSHT5fr1g3FRqFF7a+Nvfy2R4kRxpi4zTCM7Jb 1J4kYadymJVE2oeMq8x52ToZBDd12wtbZ1j7YFETYif+mAjM/hBh9MiK0L96l54wxrb6 +MbWQij5LBdaoflS3wtkvlwgXY812BAd3U+OqfV3Fsgwgk51Ct2OuV3SkOWsW+tbdebt OzzHccXeu5s/Wbd9exI0FgfL04jPmRmoEk6j+d/v/2uxwktFzhj5g7oFhx+wdcG7AcEU /TlQ== 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=ZaynnOWtz1Te8wfxtYrLIk63miL/F4a1HGn3nv7Urqg=; b=ihRryjWT2ombmWuqET5+e0PmtBHBv2oH+rDgA31Ys/sJijfbe/EBK94e0oFLtNRfId geeY+oEe+JN7l5ltFUrPb2U7a9NnCyU46Gi3rGay94z2UeVfssGa6YSlKafS6ujjI/vc eeJmF+mR4NKqqoeYCG5a7v/Dkjqnw9EzcJ6WK81Mpya4JuQjrwSgr0mmmKv/KEXUkd47 taBr87ZaQJiwsNL6bfEKnGv9M9p1g+PE9UP/QgqYmSHYG19cimKDe58Z8XzqftVMK+MO k4BZrld7QYkMsjdHtGltkoYA6Q6nfKSEuY+G/RZcM8KLDKxHv+5i0F4uhRjCKi5e9Cml w2Ow== X-Gm-Message-State: AOAM533iLokRPvjwcoKhhowufkLi2fVMslZu/I72DTiI8bQrBEMymGup qc8Be+qQaufxDRn66eOxpvY= X-Google-Smtp-Source: ABdhPJzZoxPhUl5k38exLjHPsVAjKcwCE/twF8waDy9XYOrkcwBv7GeAm9ddoUSKZURoSAmsT/SChg== X-Received: by 2002:a05:6214:486:: with SMTP id ay6mr19861358qvb.18.1620053268704; Mon, 03 May 2021 07:47:48 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id r81sm8757152qka.82.2021.05.03.07.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 07:47:48 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 8210527C0054; Mon, 3 May 2021 10:47:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 03 May 2021 10:47:47 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdefgedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhephedvveetfefgiedutedtfeevvddvleekjeeuffffleeguefhhfejteekieeu ueelnecukfhppedufedurddutdejrddurddvheegnecuvehluhhsthgvrhfuihiivgeptd 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:44 -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 4/7] PCI: hv: Use pci_host_bridge::domain_nr for PCI domain Date: Mon, 3 May 2021 22:46:32 +0800 Message-Id: <20210503144635.2297386-5-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210503_074749_399882_84E5CAB8 X-CRM114-Status: GOOD ( 13.72 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org No functional change, just store and maintain the PCI domain number in the generic pci_host_bridge instead of x86 specific pci_sysdata. Signed-off-by: Boqun Feng --- drivers/pci/controller/pci-hyperv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 27b922b4bb7b..05b73d5dfe9d 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -2312,7 +2312,7 @@ static void hv_eject_device_work(struct work_struct *work) * because hbus->bridge->bus may not exist yet. */ wslot = wslot_to_devfn(hpdev->desc.win_slot.slot); - pdev = pci_get_domain_bus_and_slot(hbus->sysdata.domain, 0, wslot); + pdev = pci_get_domain_bus_and_slot(hbus->bridge->domain_nr, 0, wslot); if (pdev) { pci_lock_rescan_remove(); pci_stop_and_remove_bus_device(pdev); @@ -3098,6 +3098,7 @@ static int hv_pci_probe(struct hv_device *hdev, "PCI dom# 0x%hx has collision, using 0x%hx", dom_req, dom); + hbus->bridge->domain_nr = dom; hbus->sysdata.domain = dom; hbus->hdev = hdev; @@ -3109,7 +3110,7 @@ static int hv_pci_probe(struct hv_device *hdev, spin_lock_init(&hbus->retarget_msi_interrupt_lock); init_completion(&hbus->remove_event); hbus->wq = alloc_ordered_workqueue("hv_pci_%x", 0, - hbus->sysdata.domain); + hbus->bridge->domain_nr); if (!hbus->wq) { ret = -ENOMEM; goto free_dom; @@ -3236,7 +3237,7 @@ static int hv_pci_probe(struct hv_device *hdev, destroy_wq: destroy_workqueue(hbus->wq); free_dom: - hv_put_dom_num(hbus->sysdata.domain); + hv_put_dom_num(hbus->bridge->domain_nr); free_bus: kfree(hbus); return ret; @@ -3329,7 +3330,7 @@ static int hv_pci_remove(struct hv_device *hdev) wait_for_completion(&hbus->remove_event); destroy_workqueue(hbus->wq); - hv_put_dom_num(hbus->sysdata.domain); + hv_put_dom_num(hbus->bridge->domain_nr); kfree(hbus); return ret; -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel