cregit-Linux how code gets into the kernel

Release 4.14 arch/m68k/include/asm/irqflags.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _M68K_IRQFLAGS_H

#define _M68K_IRQFLAGS_H

#include <linux/types.h>
#include <linux/preempt.h>
#include <asm/thread_info.h>
#include <asm/entry.h>


static inline unsigned long arch_local_save_flags(void) { unsigned long flags; asm volatile ("movew %%sr,%0" : "=d" (flags) : : "memory"); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells20100.00%1100.00%
Total20100.00%1100.00%


static inline void arch_local_irq_disable(void) { #ifdef CONFIG_COLDFIRE asm volatile ( "move %/sr,%%d0 \n\t" "ori.l #0x0700,%%d0 \n\t" "move %%d0,%/sr \n" : /* no outputs */ : : "cc", "%d0", "memory"); #else asm volatile ("oriw #0x0700,%%sr" : : : "memory"); #endif }

Contributors

PersonTokensPropCommitsCommitProp
David Howells24100.00%1100.00%
Total24100.00%1100.00%


static inline void arch_local_irq_enable(void) { #if defined(CONFIG_COLDFIRE) asm volatile ( "move %/sr,%%d0 \n\t" "andi.l #0xf8ff,%%d0 \n\t" "move %%d0,%/sr \n" : /* no outputs */ : : "cc", "%d0", "memory"); #else # if defined(CONFIG_MMU) if (MACH_IS_Q40 || !hardirq_count()) # endif asm volatile ( "andiw %0,%%sr" : : "i" (ALLOWINT) : "memory"); #endif }

Contributors

PersonTokensPropCommitsCommitProp
David Howells43100.00%1100.00%
Total43100.00%1100.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
David Howells23100.00%1100.00%
Total23100.00%1100.00%


static inline void arch_local_irq_restore(unsigned long flags) { asm volatile ("movew %0,%%sr" : : "d" (flags) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells14100.00%1100.00%
Total14100.00%1100.00%


static inline bool arch_irqs_disabled_flags(unsigned long flags) { if (MACH_IS_ATARI) { /* Ignore HSYNC = ipl 2 on Atari */ return (flags & ~(ALLOWINT | 0x200)) != 0; } return (flags & ~ALLOWINT) != 0; }

Contributors

PersonTokensPropCommitsCommitProp
Geert Uytterhoeven2150.00%150.00%
David Howells2150.00%150.00%
Total42100.00%2100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
David Howells16100.00%1100.00%
Total16100.00%1100.00%

#endif /* _M68K_IRQFLAGS_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Howells18289.22%133.33%
Geert Uytterhoeven2110.29%133.33%
Greg Kroah-Hartman10.49%133.33%
Total204100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.