cregit-Linux how code gets into the kernel

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

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

#define _ASM_SCORE_IRQFLAGS_H

#ifndef __ASSEMBLY__

#include <linux/types.h>


static inline unsigned long arch_local_save_flags(void) { unsigned long flags; asm volatile( " mfcr r8, cr0 \n" " nop \n" " nop \n" " mv %0, r8 \n" " nop \n" " nop \n" " nop \n" " nop \n" " nop \n" " ldi r9, 0x1 \n" " and %0, %0, r9 \n" : "=r" (flags) : : "r8", "r9"); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1890.00%150.00%
Chen Liqin210.00%150.00%
Total20100.00%2100.00%


static inline unsigned long arch_local_irq_save(void) { unsigned long flags; asm volatile( " mfcr r8, cr0 \n" " li r9, 0xfffffffe \n" " nop \n" " mv %0, r8 \n" " and r8, r8, r9 \n" " mtcr r8, cr0 \n" " nop \n" " nop \n" " nop \n" " nop \n" " nop \n" : "=r" (flags) : : "r8", "r9", "memory"); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1575.00%133.33%
Chen Liqin525.00%266.67%
Total20100.00%3100.00%


static inline void arch_local_irq_restore(unsigned long flags) { asm volatile( " mfcr r8, cr0 \n" " ldi r9, 0x1 \n" " and %0, %0, r9 \n" " or r8, r8, %0 \n" " mtcr r8, cr0 \n" " nop \n" " nop \n" " nop \n" " nop \n" " nop \n" : : "r"(flags) : "r8", "r9", "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1285.71%150.00%
Chen Liqin214.29%150.00%
Total14100.00%2100.00%


static inline void arch_local_irq_enable(void) { asm volatile( " mfcr r8,cr0 \n" " nop \n" " nop \n" " ori r8,0x1 \n" " mtcr r8,cr0 \n" " nop \n" " nop \n" " nop \n" " nop \n" " nop \n" : : : "r8", "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells975.00%150.00%
Chen Liqin325.00%150.00%
Total12100.00%2100.00%


static inline void arch_local_irq_disable(void) { asm volatile( " mfcr r8,cr0 \n" " nop \n" " nop \n" " srli r8,r8,1 \n" " slli r8,r8,1 \n" " mtcr r8,cr0 \n" " nop \n" " nop \n" " nop \n" " nop \n" " nop \n" : : : "r8", "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1083.33%150.00%
Chen Liqin216.67%150.00%
Total12100.00%2100.00%


static inline bool arch_irqs_disabled_flags(unsigned long flags) { return !(flags & 1); }

Contributors

PersonTokensPropCommitsCommitProp
Chen Liqin1789.47%150.00%
David Howells210.53%150.00%
Total19100.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 /* __ASSEMBLY__ */ #endif /* _ASM_SCORE_IRQFLAGS_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Howells8665.15%125.00%
Chen Liqin4534.09%250.00%
Greg Kroah-Hartman10.76%125.00%
Total132100.00%4100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.