summaryrefslogtreecommitdiffstats
path: root/Documentation/core-api
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-10-26 20:41:29 +0200
committerMatthew Wilcox <willy@infradead.org>2018-11-05 22:38:09 +0100
commit84e5acb76dacb8ebd648a86a53907ce0dd616534 (patch)
tree21bd8958fbf6ae3c7195931876037fc174ea5ce7 /Documentation/core-api
parentXArray: Turn xa_erase into an exported function (diff)
downloadlinux-84e5acb76dacb8ebd648a86a53907ce0dd616534.tar.xz
linux-84e5acb76dacb8ebd648a86a53907ce0dd616534.zip
XArray: Add xa_store_bh() and xa_store_irq()
These convenience wrappers disable interrupts while taking the spinlock. A number of drivers would otherwise have to open-code these functions. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'Documentation/core-api')
-rw-r--r--Documentation/core-api/xarray.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/core-api/xarray.rst b/Documentation/core-api/xarray.rst
index 65c77a81b689..8a6e2087de77 100644
--- a/Documentation/core-api/xarray.rst
+++ b/Documentation/core-api/xarray.rst
@@ -167,6 +167,8 @@ Takes RCU read lock:
Takes xa_lock internally:
* :c:func:`xa_store`
+ * :c:func:`xa_store_bh`
+ * :c:func:`xa_store_irq`
* :c:func:`xa_insert`
* :c:func:`xa_erase`
* :c:func:`xa_erase_bh`
@@ -247,7 +249,8 @@ Sharing the XArray with interrupt context is also possible, either
using :c:func:`xa_lock_irqsave` in both the interrupt handler and process
context, or :c:func:`xa_lock_irq` in process context and :c:func:`xa_lock`
in the interrupt handler. Some of the more common patterns have helper
-functions such as :c:func:`xa_erase_bh` and :c:func:`xa_erase_irq`.
+functions such as :c:func:`xa_store_bh`, :c:func:`xa_store_irq`,
+:c:func:`xa_erase_bh` and :c:func:`xa_erase_irq`.
Sometimes you need to protect access to the XArray with a mutex because
that lock sits above another mutex in the locking hierarchy. That does