[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 10/10] [RFC only] xen: pci: remove pcidev_lock() function


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Wed, 31 Aug 2022 14:11:02 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UVkD+a9ezE4I8M7A/v2OpU0OQqIDPY5B20O9xlCtPAM=; b=YD/k845QfCnvzNUP/R9BmAR2ShinV6EF1v8LCjDZudBXmjNWxk2iWIeS/qM4RgigEWEXDOqfC8k3l47n8MacU+YgfaRAohTO5+ZDAsZ6LFJsGz/48LV1mhC0l2MRar92SbwqvdK6aLJnwYNqDbenBe0zGDTYm5XgF8zXvuUBePD/HzlqNpWaZ3JGvS1eri7y3lyLKHCcoyLJhrYlmw/W/goXmnIcw5JoWeXfAFmo40d5OeX6qCi0MN88Z94+yg+5cWJAxpNS1tau/VB5tkqtF7FfJw/pc4jj1xm8N7KIA1xpQFQQYj5KVK6Is0yJrcidnyF5Lvm7ObYaIS5j5YxMHQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aZ23+Y3+9yUKXKjciHha9W710G9Cck3NmzkTJfuGUsFUiGNmdGYoifiDnnkZo34vKmR3IDzrvAiPyBZ7ZupQLktvOqebhAGYoQHn4gHQGPe7y0KEUQc16LzaIitciVeFIEhzxwR97jalhFDE6DXyBCyXeRig3n4hQr5xqQMjClHfX7o0T6JDUeJSBAA8yvhJp68KN4MO6KandTMcjrVVSk0GfjmmD4n6yMEMUY9LT9TefmXXmKBkLL4C3aMa8RIEO5Df8o+B/uED9frh0rZfEWblzpou9A+ySJwVmYGFBC2ST3w7d7xhDj5sSuToyl5QDjlV8Kfx9bDOvUrVXiZrdw==
  • Cc: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 31 Aug 2022 14:11:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYvUOA+LvBLzOTSESi46h0pXBIvw==
  • Thread-topic: [RFC PATCH 10/10] [RFC only] xen: pci: remove pcidev_lock() function

This path will be squashed into "xen: pci: remove pcidev_[un]lock[ed]
calls" after we resolve "[RFC only] xen: iommu: remove last
pcidevs_lock() calls in iommu".

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
---
 xen/drivers/passthrough/pci.c | 18 ------------------
 xen/include/xen/pci.h         | 10 ----------
 2 files changed, 28 deletions(-)

diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index cc62a5aec4..381eba3018 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -50,24 +50,6 @@ struct pci_seg {
         u8 devfn;
     } bus2bridge[MAX_BUSES];
 };
-
-static spinlock_t _pcidevs_lock = SPIN_LOCK_UNLOCKED;
-
-void pcidevs_lock(void)
-{
-    spin_lock_recursive(&_pcidevs_lock);
-}
-
-void pcidevs_unlock(void)
-{
-    spin_unlock_recursive(&_pcidevs_lock);
-}
-
-bool_t pcidevs_locked(void)
-{
-    return !!spin_is_locked(&_pcidevs_lock);
-}
-
 static struct radix_tree_root pci_segments;
 
 static inline struct pci_seg *get_pseg(u16 seg)
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index d0a7339d84..0abc54ea39 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -156,16 +156,6 @@ struct pci_dev {
 
 #define has_arch_pdevs(d) (!list_empty(&(d)->pdev_list))
 
-/*
- * The pcidevs_lock protect alldevs_list, and the assignment for the 
- * devices, it also sync the access to the msi capability that is not
- * interrupt handling related (the mask bit register).
- */
-
-void pcidevs_lock(void);
-void pcidevs_unlock(void);
-bool_t __must_check pcidevs_locked(void);
-
 /*
  * Acquire and release reference to the given device. Holding
  * reference ensures that device will not disappear under feet, but
-- 
2.36.1



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.