lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] vDPA/ifcvf: record virtio notify base
Date
This commit records virtio notify base addr to implemente
doorbell mapping feature

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
---
drivers/vdpa/ifcvf/ifcvf_base.c | 1 +
drivers/vdpa/ifcvf/ifcvf_base.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c
index 1a661ab45af5..cc61a5bfc5b1 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.c
+++ b/drivers/vdpa/ifcvf/ifcvf_base.c
@@ -133,6 +133,7 @@ int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *pdev)
&hw->notify_off_multiplier);
hw->notify_bar = cap.bar;
hw->notify_base = get_cap_addr(hw, &cap);
+ hw->notify_pa = pci_resource_start(pdev, cap.bar) + cap.offset;
IFCVF_DBG(pdev, "hw->notify_base = %p\n",
hw->notify_base);
break;
diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
index 0111bfdeb342..bcca7c1669dd 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.h
+++ b/drivers/vdpa/ifcvf/ifcvf_base.h
@@ -98,6 +98,7 @@ struct ifcvf_hw {
char config_msix_name[256];
struct vdpa_callback config_cb;
unsigned int config_irq;
+ phys_addr_t notify_pa;
};

struct ifcvf_adapter {
--
2.27.0
\
 
 \ /
  Last update: 2021-04-28 10:27    [W:0.090 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site