[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251217151609.3162665-35-den@valinux.co.jp>
Date: Thu, 18 Dec 2025 00:16:08 +0900
From: Koichiro Den <den@...inux.co.jp>
To: Frank.Li@....com,
dave.jiang@...el.com,
ntb@...ts.linux.dev,
linux-pci@...r.kernel.org,
dmaengine@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: mani@...nel.org,
kwilczynski@...nel.org,
kishon@...nel.org,
bhelgaas@...gle.com,
corbet@....net,
geert+renesas@...der.be,
magnus.damm@...il.com,
robh@...nel.org,
krzk+dt@...nel.org,
conor+dt@...nel.org,
vkoul@...nel.org,
joro@...tes.org,
will@...nel.org,
robin.murphy@....com,
jdmason@...zu.us,
allenbh@...il.com,
andrew+netdev@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
Basavaraj.Natikar@....com,
Shyam-sundar.S-k@....com,
kurt.schwemmer@...rosemi.com,
logang@...tatee.com,
jingoohan1@...il.com,
lpieralisi@...nel.org,
utkarsh02t@...il.com,
jbrunet@...libre.com,
dlemoal@...nel.org,
arnd@...db.de,
elfring@...rs.sourceforge.net,
den@...inux.co.jp
Subject: [RFC PATCH v3 34/35] Documentation: PCI: endpoint: pci-epf-vntb: Update and add mwN_offset usage
Add a concrete example showing how to place multiple memory windows in
the same BAR (one for data, one for interrupts) by using 'mwN_offset'
and 'mwN_bar'.
Signed-off-by: Koichiro Den <den@...inux.co.jp>
---
Documentation/PCI/endpoint/pci-vntb-howto.rst | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/Documentation/PCI/endpoint/pci-vntb-howto.rst b/Documentation/PCI/endpoint/pci-vntb-howto.rst
index 9a7a2f0a6849..bfc3e51ab79f 100644
--- a/Documentation/PCI/endpoint/pci-vntb-howto.rst
+++ b/Documentation/PCI/endpoint/pci-vntb-howto.rst
@@ -90,9 +90,9 @@ of the function device and is populated with the following NTB specific
attributes that can be configured by the user::
# ls functions/pci_epf_vntb/func1/pci_epf_vntb.0/
- ctrl_bar db_count mw1_bar mw2_bar mw3_bar mw4_bar spad_count
- db_bar mw1 mw2 mw3 mw4 num_mws vbus_number
- vntb_vid vntb_pid
+ ctrl_bar mw1 mw2 mw3 mw4 num_mws vntb_pid
+ db_bar mw1_bar mw2_bar mw3_bar mw4_bar spad_count vntb_vid
+ db_count mw1_offset mw2_offset mw3_offset mw4_offset vbus_number
A sample configuration for NTB function is given below::
@@ -111,6 +111,16 @@ A sample configuration for virtual NTB driver for virtual PCI bus::
# echo 0x080A > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_pid
# echo 0x10 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vbus_number
+When BAR resources are tight but you still need to create many memory
+windows, you can pack multiple windows into a single BAR via 'mwN_offset'
+and 'mwN_bar' as shown below::
+
+ # echo 0xE0000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1
+ # echo 0x20000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw2
+ # echo 0xE0000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw2_offset
+ # echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1_bar
+ # echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw2_bar
+
Binding pci-epf-ntb Device to EP Controller
--------------------------------------------
--
2.51.0
Powered by blists - more mailing lists