cregit-Linux how code gets into the kernel

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

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen1593.75%150.00%
David Howells16.25%150.00%
Total16100.00%2100.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

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen2095.24%150.00%
David Howells14.76%150.00%
Total21100.00%2100.00%


static inline void arch_local_irq_disable(void) { asm volatile("ssrf %0" : : "n"(SYSREG_GM_OFFSET) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen1191.67%150.00%
David Howells18.33%150.00%
Total12100.00%2100.00%


static inline void arch_local_irq_enable(void) { asm volatile("csrf %0" : : "n"(SYSREG_GM_OFFSET) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen1191.67%150.00%
David Howells18.33%150.00%
Total12100.00%2100.00%


static inline bool arch_irqs_disabled_flags(unsigned long flags) { return (flags & SYSREG_BIT(GM)) != 0; }

Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen2191.30%150.00%
David Howells28.70%150.00%
Total23100.00%2100.00%


static inline bool arch_irqs_disabled(void) { return arch_irqs_disabled_flags(arch_local_save_flags()); }

Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen1168.75%150.00%
David Howells531.25%150.00%
Total16100.00%2100.00%


static inline unsigned long arch_local_irq_save(void) { unsigned long flags = arch_local_save_flags(); arch_local_irq_disable(); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen2086.96%150.00%
David Howells313.04%150.00%
Total23100.00%2100.00%

#endif /* __ASM_AVR32_IRQFLAGS_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen12387.86%150.00%
David Howells1712.14%150.00%
Total140100.00%2100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.