mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 11:06:03 +02:00
-----BEGIN PGP SIGNATURE----- iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmp49yoeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG1WIH/1SD1rNIb4Prf0C7 Rk9Hz0IZ3uYNe1Xi+Ozv3zQUuLB6d7ewl9e4zyHHYT4eeIKvBZv9jtIF3QH4ty5X JB9Gy62WICtqIEkzzt2bkcV1byFmKz2+BLv04fgcyTXEGOEByCDiZ3/N3kSJOqvg YxsGOmKkQSTavFLSe96Gj2pgchJqZ6j3qucDO6GrPOo8depP2kfzxfaJbXix0HEZ ln08X9hgZDxy4I98PmSaaJsK2R/i6T6jQdA3i8DnSbbyNhLn+3FK6gkP08ZEpaor 82WwJf+MVCLHXLYDy0aYOUDHpkNkkJWOj45A2Hv9JkOupGcUpyPGr82l4yh/MrxC +kM28xs= =rIbd -----END PGP SIGNATURE----- Merge tag 'v7.2-rc7' into driver-core-next We need the driver-core fixes in here as well to build on top of. Signed-off-by: Danilo Krummrich <dakr@kernel.org>
162 lines
3.3 KiB
C
162 lines
3.3 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/io.h>
|
|
#include <linux/ioport.h>
|
|
|
|
#ifdef CONFIG_HAS_IOMEM
|
|
__rust_helper void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t size)
|
|
{
|
|
return ioremap(offset, size);
|
|
}
|
|
|
|
__rust_helper void __iomem *rust_helper_ioremap_np(phys_addr_t offset,
|
|
size_t size)
|
|
{
|
|
return ioremap_np(offset, size);
|
|
}
|
|
|
|
__rust_helper void rust_helper_iounmap(void __iomem *addr)
|
|
{
|
|
iounmap(addr);
|
|
}
|
|
#endif /* CONFIG_HAS_IOMEM */
|
|
|
|
__rust_helper void rust_helper_memcpy_fromio(void *dst,
|
|
const volatile void __iomem *src,
|
|
size_t count)
|
|
{
|
|
memcpy_fromio(dst, src, count);
|
|
}
|
|
|
|
__rust_helper void rust_helper_memcpy_toio(volatile void __iomem *dst,
|
|
const void *src, size_t count)
|
|
{
|
|
memcpy_toio(dst, src, count);
|
|
}
|
|
|
|
__rust_helper u8 rust_helper_readb(const void __iomem *addr)
|
|
{
|
|
return readb(addr);
|
|
}
|
|
|
|
__rust_helper u16 rust_helper_readw(const void __iomem *addr)
|
|
{
|
|
return readw(addr);
|
|
}
|
|
|
|
__rust_helper u32 rust_helper_readl(const void __iomem *addr)
|
|
{
|
|
return readl(addr);
|
|
}
|
|
|
|
#ifdef CONFIG_64BIT
|
|
__rust_helper u64 rust_helper_readq(const void __iomem *addr)
|
|
{
|
|
return readq(addr);
|
|
}
|
|
#endif
|
|
|
|
__rust_helper void rust_helper_writeb(u8 value, void __iomem *addr)
|
|
{
|
|
writeb(value, addr);
|
|
}
|
|
|
|
__rust_helper void rust_helper_writew(u16 value, void __iomem *addr)
|
|
{
|
|
writew(value, addr);
|
|
}
|
|
|
|
__rust_helper void rust_helper_writel(u32 value, void __iomem *addr)
|
|
{
|
|
writel(value, addr);
|
|
}
|
|
|
|
#ifdef CONFIG_64BIT
|
|
__rust_helper void rust_helper_writeq(u64 value, void __iomem *addr)
|
|
{
|
|
writeq(value, addr);
|
|
}
|
|
#endif
|
|
|
|
__rust_helper u8 rust_helper_readb_relaxed(const void __iomem *addr)
|
|
{
|
|
return readb_relaxed(addr);
|
|
}
|
|
|
|
__rust_helper u16 rust_helper_readw_relaxed(const void __iomem *addr)
|
|
{
|
|
return readw_relaxed(addr);
|
|
}
|
|
|
|
__rust_helper u32 rust_helper_readl_relaxed(const void __iomem *addr)
|
|
{
|
|
return readl_relaxed(addr);
|
|
}
|
|
|
|
#ifdef CONFIG_64BIT
|
|
__rust_helper u64 rust_helper_readq_relaxed(const void __iomem *addr)
|
|
{
|
|
return readq_relaxed(addr);
|
|
}
|
|
#endif
|
|
|
|
__rust_helper void rust_helper_writeb_relaxed(u8 value, void __iomem *addr)
|
|
{
|
|
writeb_relaxed(value, addr);
|
|
}
|
|
|
|
__rust_helper void rust_helper_writew_relaxed(u16 value, void __iomem *addr)
|
|
{
|
|
writew_relaxed(value, addr);
|
|
}
|
|
|
|
__rust_helper void rust_helper_writel_relaxed(u32 value, void __iomem *addr)
|
|
{
|
|
writel_relaxed(value, addr);
|
|
}
|
|
|
|
#ifdef CONFIG_64BIT
|
|
__rust_helper void rust_helper_writeq_relaxed(u64 value, void __iomem *addr)
|
|
{
|
|
writeq_relaxed(value, addr);
|
|
}
|
|
#endif
|
|
|
|
__rust_helper resource_size_t rust_helper_resource_size(struct resource *res)
|
|
{
|
|
return resource_size(res);
|
|
}
|
|
|
|
__rust_helper struct resource *
|
|
rust_helper_request_mem_region(resource_size_t start, resource_size_t n,
|
|
const char *name)
|
|
{
|
|
return request_mem_region(start, n, name);
|
|
}
|
|
|
|
__rust_helper void rust_helper_release_mem_region(resource_size_t start,
|
|
resource_size_t n)
|
|
{
|
|
release_mem_region(start, n);
|
|
}
|
|
|
|
__rust_helper struct resource *rust_helper_request_region(resource_size_t start,
|
|
resource_size_t n,
|
|
const char *name)
|
|
{
|
|
return request_region(start, n, name);
|
|
}
|
|
|
|
__rust_helper struct resource *
|
|
rust_helper_request_muxed_region(resource_size_t start, resource_size_t n,
|
|
const char *name)
|
|
{
|
|
return request_muxed_region(start, n, name);
|
|
}
|
|
|
|
__rust_helper void rust_helper_release_region(resource_size_t start,
|
|
resource_size_t n)
|
|
{
|
|
release_region(start, n);
|
|
}
|