Release 4.11 arch/avr32/include/asm/irqflags.h
/*
* Copyright (C) 2004-2006 Atmel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_AVR32_IRQFLAGS_H
#define __ASM_AVR32_IRQFLAGS_H
#include <linux/types.h>
#include <asm/sysreg.h>
static inline unsigned long arch_local_save_flags(void)
{
return sysreg_read(SR);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 15 | 93.75% | 1 | 50.00% |
David Howells | 1 | 6.25% | 1 | 50.00% |
Total | 16 | 100.00% | 2 | 100.00% |
/*
* This will restore ALL status register flags, not only the interrupt
* mask flag.
*
* The empty asm statement informs the compiler of this fact while
* also serving as a barrier.
*/
static inline void arch_local_irq_restore(unsigned long flags)
{
sysreg_write(SR, flags);
asm volatile("" : : : "memory", "cc");
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 20 | 95.24% | 1 | 50.00% |
David Howells | 1 | 4.76% | 1 | 50.00% |
Total | 21 | 100.00% | 2 | 100.00% |
static inline void arch_local_irq_disable(void)
{
asm volatile("ssrf %0" : : "n"(SYSREG_GM_OFFSET) : "memory");
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 11 | 91.67% | 1 | 50.00% |
David Howells | 1 | 8.33% | 1 | 50.00% |
Total | 12 | 100.00% | 2 | 100.00% |
static inline void arch_local_irq_enable(void)
{
asm volatile("csrf %0" : : "n"(SYSREG_GM_OFFSET) : "memory");
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 11 | 91.67% | 1 | 50.00% |
David Howells | 1 | 8.33% | 1 | 50.00% |
Total | 12 | 100.00% | 2 | 100.00% |
static inline bool arch_irqs_disabled_flags(unsigned long flags)
{
return (flags & SYSREG_BIT(GM)) != 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 21 | 91.30% | 1 | 50.00% |
David Howells | 2 | 8.70% | 1 | 50.00% |
Total | 23 | 100.00% | 2 | 100.00% |
static inline bool arch_irqs_disabled(void)
{
return arch_irqs_disabled_flags(arch_local_save_flags());
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 11 | 68.75% | 1 | 50.00% |
David Howells | 5 | 31.25% | 1 | 50.00% |
Total | 16 | 100.00% | 2 | 100.00% |
static inline unsigned long arch_local_irq_save(void)
{
unsigned long flags = arch_local_save_flags();
arch_local_irq_disable();
return flags;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 20 | 86.96% | 1 | 50.00% |
David Howells | 3 | 13.04% | 1 | 50.00% |
Total | 23 | 100.00% | 2 | 100.00% |
#endif /* __ASM_AVR32_IRQFLAGS_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Håvard Skinnemoen | 123 | 87.86% | 1 | 50.00% |
David Howells | 17 | 12.14% | 1 | 50.00% |
Total | 140 | 100.00% | 2 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.