[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V3 12/41] xen/arm: Add helpers ioreadl/iowritel
Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> --- xen/include/asm-arm/mm.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index 4ac8fab..b5ea2d1 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -156,7 +156,17 @@ extern void clear_fixmap(unsigned map); /* map a 2MB aligned physical range in virtual memory. */ void* early_ioremap(paddr_t start, size_t len, unsigned attributes); /* map a physical range in virtual memory */ -void *ioremap_attr(paddr_t start, size_t len, unsigned attributes); +void __iomem *ioremap_attr(paddr_t start, size_t len, unsigned attributes); + +static inline uint32_t ioreadl(const volatile void __iomem *addr) +{ + return (*(volatile uint32_t *)addr); +} + +static inline void iowritel(const volatile void __iomem *addr, uint32_t val) +{ + *(volatile uint32_t *)addr = val; +} #define mfn_valid(mfn) ({ \ unsigned long __m_f_n = (mfn); \ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |