Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
0bd2f26
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
bindings
helpers
blk.c
bug.c
build_assert.c
build_bug.c
cpumask.c
cred.c
device.c
dma.c
err.c
fs.c
helpers.c
io.c
jump_label.c
kunit.c
mutex.c
page.c
pci.c
pid_namespace.c
platform.c
rbtree.c
rcu.c
refcount.c
security.c
signal.c
slab.c
spinlock.c
sync.c
task.c
uaccess.c
vmalloc.c
wait.c
workqueue.c
kernel
macros
pin-init
uapi
.gitignore
.kunitconfig
Makefile
bindgen_parameters
build_error.rs
compiler_builtins.rs
exports.c
ffi.rs
samples
scripts
security
sound
tools
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
rust
/
helpers
/
io.c
Blame
Blame
Latest commit
History
History
101 lines (82 loc) · 1.67 KB
Breadcrumbs
linux
/
rust
/
helpers
/
io.c
Top
File metadata and controls
Code
Blame
101 lines (82 loc) · 1.67 KB
Raw
// SPDX-License-Identifier: GPL-2.0 #include <linux/io.h> void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t size) { return ioremap(offset, size); } void rust_helper_iounmap(void __iomem *addr) { iounmap(addr); } u8 rust_helper_readb(const void __iomem *addr) { return readb(addr); } u16 rust_helper_readw(const void __iomem *addr) { return readw(addr); } u32 rust_helper_readl(const void __iomem *addr) { return readl(addr); } #ifdef CONFIG_64BIT u64 rust_helper_readq(const void __iomem *addr) { return readq(addr); } #endif void rust_helper_writeb(u8 value, void __iomem *addr) { writeb(value, addr); } void rust_helper_writew(u16 value, void __iomem *addr) { writew(value, addr); } void rust_helper_writel(u32 value, void __iomem *addr) { writel(value, addr); } #ifdef CONFIG_64BIT void rust_helper_writeq(u64 value, void __iomem *addr) { writeq(value, addr); } #endif u8 rust_helper_readb_relaxed(const void __iomem *addr) { return readb_relaxed(addr); } u16 rust_helper_readw_relaxed(const void __iomem *addr) { return readw_relaxed(addr); } u32 rust_helper_readl_relaxed(const void __iomem *addr) { return readl_relaxed(addr); } #ifdef CONFIG_64BIT u64 rust_helper_readq_relaxed(const void __iomem *addr) { return readq_relaxed(addr); } #endif void rust_helper_writeb_relaxed(u8 value, void __iomem *addr) { writeb_relaxed(value, addr); } void rust_helper_writew_relaxed(u16 value, void __iomem *addr) { writew_relaxed(value, addr); } void rust_helper_writel_relaxed(u32 value, void __iomem *addr) { writel_relaxed(value, addr); } #ifdef CONFIG_64BIT void rust_helper_writeq_relaxed(u64 value, void __iomem *addr) { writeq_relaxed(value, addr); } #endif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
You can’t perform that action at this time.