Release 4.11 arch/arm/kernel/io.c
#include <linux/export.h>
#include <linux/types.h>
#include <linux/io.h>
#include <linux/spinlock.h>
static DEFINE_RAW_SPINLOCK(__io_lock);
/*
* Generic atomic MMIO modify.
*
* Allows thread-safe access to registers shared by unrelated subsystems.
* The access is protected by a single MMIO-wide lock.
*/
void atomic_io_modify_relaxed(void __iomem *reg, u32 mask, u32 set)
{
unsigned long flags;
u32 value;
raw_spin_lock_irqsave(&__io_lock, flags);
value = readl_relaxed(reg) & ~mask;
value |= (set & mask);
writel_relaxed(value, reg);
raw_spin_unlock_irqrestore(&__io_lock, flags);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ezequiel García | 64 | 100.00% | 1 | 100.00% |
Total | 64 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL(atomic_io_modify_relaxed);
void atomic_io_modify(void __iomem *reg, u32 mask, u32 set)
{
unsigned long flags;
u32 value;
raw_spin_lock_irqsave(&__io_lock, flags);
value = readl_relaxed(reg) & ~mask;
value |= (set & mask);
writel(value, reg);
raw_spin_unlock_irqrestore(&__io_lock, flags);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ezequiel García | 64 | 100.00% | 1 | 100.00% |
Total | 64 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL(atomic_io_modify);
/*
* Copy data from IO memory space to "real" memory space.
* This needs to be optimized.
*/
void _memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
{
unsigned char *t = to;
while (count) {
count--;
*t = readb(from);
t++;
from++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 35 | 71.43% | 2 | 40.00% |
Russell King | 11 | 22.45% | 2 | 40.00% |
Ben Dooks | 3 | 6.12% | 1 | 20.00% |
Total | 49 | 100.00% | 5 | 100.00% |
EXPORT_SYMBOL(_memcpy_fromio);
/*
* Copy data from "real" memory space to IO memory space.
* This needs to be optimized.
*/
void _memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
{
const unsigned char *f = from;
while (count) {
count--;
writeb(*f, to);
f++;
to++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 36 | 72.00% | 3 | 50.00% |
Russell King | 11 | 22.00% | 2 | 33.33% |
Ben Dooks | 3 | 6.00% | 1 | 16.67% |
Total | 50 | 100.00% | 6 | 100.00% |
EXPORT_SYMBOL(_memcpy_toio);
/*
* "memset" on IO memory space.
* This needs to be optimized.
*/
void _memset_io(volatile void __iomem *dst, int c, size_t count)
{
while (count) {
count--;
writeb(c, dst);
dst++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 32 | 88.89% | 2 | 50.00% |
Ben Dooks | 3 | 8.33% | 1 | 25.00% |
Russell King | 1 | 2.78% | 1 | 25.00% |
Total | 36 | 100.00% | 4 | 100.00% |
EXPORT_SYMBOL(_memset_io);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ezequiel García | 148 | 47.74% | 1 | 9.09% |
Linus Torvalds (pre-git) | 118 | 38.06% | 4 | 36.36% |
Russell King | 34 | 10.97% | 4 | 36.36% |
Ben Dooks | 9 | 2.90% | 1 | 9.09% |
Paul Gortmaker | 1 | 0.32% | 1 | 9.09% |
Total | 310 | 100.00% | 11 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.