summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gasket
diff options
context:
space:
mode:
authorTodd Poynor2018-08-10 05:21:04 +0200
committerGreg Kroah-Hartman2018-08-27 19:43:44 +0200
commit717264bab46e774e196574c77aae5f103b9b2f26 (patch)
tree6ec29fc2cf358903e00a2d2f5faa637f165b3ad7 /drivers/staging/gasket
parentstaging: gasket: page table: use dma_mapping_error for error detection (diff)
downloadkernel-qcow2-linux-717264bab46e774e196574c77aae5f103b9b2f26.tar.gz
kernel-qcow2-linux-717264bab46e774e196574c77aae5f103b9b2f26.tar.xz
kernel-qcow2-linux-717264bab46e774e196574c77aae5f103b9b2f26.zip
staging: gasket: core: switch to relaxed memory-mapped I/O
Use of readl() is deprecated; readl_relaxed() with appropriate memory barriers is preferred. Switch to relaxed reads and writes for better performance as well. Memory barriers required for I/O vs. normal memory access on Apex devices have already been explicitly coded in the page table routines. Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gasket')
-rw-r--r--drivers/staging/gasket/gasket_core.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/gasket/gasket_core.h b/drivers/staging/gasket/gasket_core.h
index 275fd0b345b6..fd7e75b765a6 100644
--- a/drivers/staging/gasket/gasket_core.h
+++ b/drivers/staging/gasket/gasket_core.h
@@ -590,25 +590,25 @@ const char *gasket_num_name_lookup(uint num,
static inline ulong gasket_dev_read_64(struct gasket_dev *gasket_dev, int bar,
ulong location)
{
- return readq(&gasket_dev->bar_data[bar].virt_base[location]);
+ return readq_relaxed(&gasket_dev->bar_data[bar].virt_base[location]);
}
static inline void gasket_dev_write_64(struct gasket_dev *dev, u64 value,
int bar, ulong location)
{
- writeq(value, &dev->bar_data[bar].virt_base[location]);
+ writeq_relaxed(value, &dev->bar_data[bar].virt_base[location]);
}
static inline void gasket_dev_write_32(struct gasket_dev *dev, u32 value,
int bar, ulong location)
{
- writel(value, &dev->bar_data[bar].virt_base[location]);
+ writel_relaxed(value, &dev->bar_data[bar].virt_base[location]);
}
static inline u32 gasket_dev_read_32(struct gasket_dev *dev, int bar,
ulong location)
{
- return readl(&dev->bar_data[bar].virt_base[location]);
+ return readl_relaxed(&dev->bar_data[bar].virt_base[location]);
}
static inline void gasket_read_modify_write_64(struct gasket_dev *dev, int bar,