<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/ntb.h, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-06-06T00:02:08+00:00</updated>
<entry>
<title>NTB: correct ntb_peer_spad_addr and ntb_peer_spad_read comment typos</title>
<updated>2020-06-06T00:02:08+00:00</updated>
<author>
<name>Wesley Sheng</name>
<email>wesley.sheng@amd.com</email>
</author>
<published>2020-05-26T07:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46f21af862656c477387f2256adc1005503db67d'/>
<id>urn:sha1:46f21af862656c477387f2256adc1005503db67d</id>
<content type='text'>
The comment for ntb_peer_spad_addr and ntb_peer_spad_read
incorrectly referred to peer doorbell register and local
scratchpad register.

Signed-off-by: Wesley Sheng &lt;wesley.sheng@amd.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>include/ntb: Fix typo in ntb_unregister_device description</title>
<updated>2020-04-13T14:28:34+00:00</updated>
<author>
<name>Maciej Grochowski</name>
<email>maciej.grochowski@pm.me</email>
</author>
<published>2020-04-09T05:03:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f454f4d1915b44cc3857148aac7a297a31591501'/>
<id>urn:sha1:f454f4d1915b44cc3857148aac7a297a31591501</id>
<content type='text'>
Signed-off-by: Maciej Grochowski &lt;maciej.grochowski@pm.me&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: Introduce MSI library</title>
<updated>2019-06-13T13:02:33+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2019-05-23T22:30:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=26b3a37b928457ba2cd98eaf6d7b0feca5a30fa6'/>
<id>urn:sha1:26b3a37b928457ba2cd98eaf6d7b0feca5a30fa6</id>
<content type='text'>
The NTB MSI library allows passing MSI interrupts across a memory
window. This offers similar functionality to doorbells or messages
except will often have much better latency and the client can
potentially use significantly more remote interrupts than typical hardware
provides for doorbells. (Which can be important in high-multiport
setups.)

The library utilizes one memory window per peer and uses the highest
index memory windows. Before any ntb_msi function may be used, the user
must call ntb_msi_init(). It may then setup and tear down the memory
windows when the link state changes using ntb_msi_setup_mws() and
ntb_msi_clear_mws().

The peer which receives the interrupt must call ntb_msim_request_irq()
to assign the interrupt handler (this function is functionally
similar to devm_request_irq()) and the returned descriptor must be
transferred to the peer which can use it to trigger the interrupt.
The triggering peer, once having received the descriptor, can
trigger the interrupt by calling ntb_msi_peer_trigger().

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Allen Hubbe &lt;allenbh@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: Introduce functions to calculate multi-port resource index</title>
<updated>2019-06-13T12:59:58+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2019-05-23T22:30:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f1b1f065c791de71017502ed3ba46779e231d9b'/>
<id>urn:sha1:5f1b1f065c791de71017502ed3ba46779e231d9b</id>
<content type='text'>
When using multi-ports each port uses resources (dbs, msgs, mws, etc)
on every other port. Creating a mapping for these resources such that
each port has a corresponding resource on every other port is a bit
tricky.

Introduce the ntb_peer_resource_idx() function for this purpose.
It returns the peer resource number that will correspond with the
local peer index on the remote peer.

Also, introduce ntb_peer_highest_mw_idx() which will use
ntb_peer_resource_idx() but return the MW index starting with the
highest index and working down.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Allen Hubbe &lt;allenbh@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: Introduce helper functions to calculate logical port number</title>
<updated>2019-06-13T12:59:47+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2019-05-23T22:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=246a42c51bc5dd247629f86c87d5e1b7628343c4'/>
<id>urn:sha1:246a42c51bc5dd247629f86c87d5e1b7628343c4</id>
<content type='text'>
This patch introduces the "Logical Port Number" which is similar to the
"Port Number" in that it enumerates the ports in the system.

The original (or Physical) "Port Number" can be any number used by the
hardware to uniquely identify a port in the system. The "Logical Port
Number" enumerates all ports in the system from 0 to the number of
ports minus one.

For example a system with 5 ports might have the following port numbers
which would be enumerated thusly:

Port Number:           1  2  5  7  116
Logical Port Number:   0  1  2  3  4

The logical port number is useful when calculating which resources
to use for which peers. So we thus define two helper functions:
ntb_logical_port_number() and ntb_peer_logical_port_number() which
provide the "Logical Port Number" for the local port and any peer
respectively.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Allen Hubbe &lt;allenbh@gmail.com&gt;
Cc: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: correct ntb_dev_ops and ntb_dev comment typos</title>
<updated>2019-06-13T12:59:22+00:00</updated>
<author>
<name>Wesley Sheng</name>
<email>wesley.sheng@microchip.com</email>
</author>
<published>2019-04-30T10:04:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18c8c0954d15105b02f7d2f556b9eafae426871f'/>
<id>urn:sha1:18c8c0954d15105b02f7d2f556b9eafae426871f</id>
<content type='text'>
The comment for ntb_dev_ops and ntb_dev incorrectly referred to
ntb_ctx_ops and ntb_device.

Signed-off-by: Wesley Sheng &lt;wesley.sheng@microchip.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: add new parameter to peer_db_addr() db_bit and db_data</title>
<updated>2019-02-13T16:03:18+00:00</updated>
<author>
<name>Leonid Ravich</name>
<email>lravich@gmail.com</email>
</author>
<published>2019-02-12T20:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ebb09b33c60c46fd4f7ffa0af9e693eebe765d1b'/>
<id>urn:sha1:ebb09b33c60c46fd4f7ffa0af9e693eebe765d1b</id>
<content type='text'>
NTB door bell usage depends on NTB hardware.

ex: intel NTB gen1 has one peer door bell register which can be controlled
by the bitmap writen to it, while Intel NTB gen3 has a registers
per door bell and the data trigering the each door bell is always 1.

therefore exposing only peer door bell address forcing the user
to be aware of such low level details

Signed-off-by: Leonid Ravich &lt;Leonid.Ravich@emc.com&gt;
Acked-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Acked-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Acked-by: Allen Hubbe &lt;allenbh@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: Fix UB/bug in ntb_mw_get_align()</title>
<updated>2018-01-29T03:17:24+00:00</updated>
<author>
<name>Serge Semin</name>
<email>fancer.lancer@gmail.com</email>
</author>
<published>2017-12-06T14:31:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1678a4c66a5c2cb43f744f7dc7e048d59690166'/>
<id>urn:sha1:f1678a4c66a5c2cb43f744f7dc7e048d59690166</id>
<content type='text'>
Simple (1 &lt;&lt; pidx) operation causes undefined behaviour when
pidx &gt;= 32. It must be casted to u64 to match the actual return
value of ntb_link_is_up() method, so to have all the possible
peer indexes covered and to get rid of undefined behaviour.
Additionally there are special macros in "linux/bitops.h" to perform
the bit-set-shift operations, so it's recommended to have them used
for proper bit setting.

Signed-off-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: Rename NTB messaging API methods</title>
<updated>2018-01-29T03:17:23+00:00</updated>
<author>
<name>Serge Semin</name>
<email>fancer.lancer@gmail.com</email>
</author>
<published>2017-12-06T14:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b87ab21935d76922362ff98a5a78f16e2e956ead'/>
<id>urn:sha1:b87ab21935d76922362ff98a5a78f16e2e956ead</id>
<content type='text'>
There is a common methods signature form used over all the NTB API
like functions naming scheme, arguments names and order, etc.
Recently added NTB messaging API IO callbacks were named a bit
different so should be renamed to be in compliance with the rest
of the API.

Signed-off-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb_hw_switchtec: Add initialization code for crosslink</title>
<updated>2018-01-29T03:17:23+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-11-29T17:55:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01752501820277d217a7b52548d9c948f98d2c56'/>
<id>urn:sha1:01752501820277d217a7b52548d9c948f98d2c56</id>
<content type='text'>
Crosslink is a feature of the Switchtec switches that is similar to
the B2B mode of other NTB devices. It allows a system to be designed
that is perfectly symmetric with two identical switches that link
two hosts together.

In order for the system to be symmetric, there is an empty host-less
partition between the two switches which the host must enumerate and
assign BAR addresses to. The firmware in the switch manages this
specially so that the BAR addresses on both sides of the empty
partition will be identical despite being in the same partition with
the same address space.

The driver determines whether crosslink is enabled by a flag set in
the NTB partition info registers which are set by the switch's
configuration file.

When crosslink is enabled, a reserved LUT window is setup to point to
the peer's switch's NTB registers and the local MWs are set to forward
to the host-less partition's BARs. (Yes, this hurts my brain too.)
Once this is setup, largely the same NTB infrastructure is used to
communicate between the two hosts.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
</feed>
