[v5,02/14] bus/vmbus: move independent bus functions

Message ID 20220423042849.7718-3-srikanth.k@oneconvergence.com (mailing list archive)
State Awaiting Upstream
Delegated to: Thomas Monjalon
Headers
Series add FreeBSD support to VMBUS & NetVSC PMDs |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Srikanth Kaka April 23, 2022, 4:28 a.m. UTC
move independent Linux bus functions to OS independent file

Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.com>
Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
Signed-off-by: Anand Thulasiram <avelu@juniper.net>
---
 drivers/bus/vmbus/linux/vmbus_bus.c     | 15 ---------------
 drivers/bus/vmbus/unix/vmbus_unix_bus.c | 17 +++++++++++++++++
 2 files changed, 17 insertions(+), 15 deletions(-)
  

Patch

diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c
index e649537..18233a5 100644
--- a/drivers/bus/vmbus/linux/vmbus_bus.c
+++ b/drivers/bus/vmbus/linux/vmbus_bus.c
@@ -358,18 +358,3 @@ 
 	closedir(dir);
 	return -1;
 }
-
-void rte_vmbus_irq_mask(struct rte_vmbus_device *device)
-{
-	vmbus_uio_irq_control(device, 1);
-}
-
-void rte_vmbus_irq_unmask(struct rte_vmbus_device *device)
-{
-	vmbus_uio_irq_control(device, 0);
-}
-
-int rte_vmbus_irq_read(struct rte_vmbus_device *device)
-{
-	return vmbus_uio_irq_read(device);
-}
diff --git a/drivers/bus/vmbus/unix/vmbus_unix_bus.c b/drivers/bus/vmbus/unix/vmbus_unix_bus.c
index f76a361..96cb968 100644
--- a/drivers/bus/vmbus/unix/vmbus_unix_bus.c
+++ b/drivers/bus/vmbus/unix/vmbus_unix_bus.c
@@ -3,8 +3,10 @@ 
  * All Rights Reserved.
  */
 
+#include <rte_bus.h>
 #include <rte_uuid.h>
 
+#include "private.h"
 #include "vmbus_unix.h"
 
 /*
@@ -18,3 +20,18 @@ 
 	0x91, 0x3f,
 	0xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe
 };
+
+void rte_vmbus_irq_mask(struct rte_vmbus_device *device)
+{
+	vmbus_uio_irq_control(device, 1);
+}
+
+void rte_vmbus_irq_unmask(struct rte_vmbus_device *device)
+{
+	vmbus_uio_irq_control(device, 0);
+}
+
+int rte_vmbus_irq_read(struct rte_vmbus_device *device)
+{
+	return vmbus_uio_irq_read(device);
+}