cregit-Linux how code gets into the kernel

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

/*
 * Copyright (C) 2006 Atmark Techno, Inc.
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License. See the file "COPYING" in the main directory of this archive
 * for more details.
 */

#ifndef _ASM_MICROBLAZE_IRQFLAGS_H

#define _ASM_MICROBLAZE_IRQFLAGS_H

#include <linux/types.h>
#include <asm/registers.h>

#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR


static inline notrace unsigned long arch_local_irq_save(void) { unsigned long flags; asm volatile(" msrclr %0, %1 \n" " nop \n" : "=r"(flags) : "i"(MSR_IE) : "memory"); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1885.71%133.33%
Michal Simek29.52%133.33%
Steven Rostedt14.76%133.33%
Total21100.00%3100.00%


static inline notrace void arch_local_irq_disable(void) { /* this uses r0 without declaring it - is that correct? */ asm volatile(" msrclr r0, %0 \n" " nop \n" : : "i"(MSR_IE) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1392.86%150.00%
Steven Rostedt17.14%150.00%
Total14100.00%2100.00%


static inline notrace void arch_local_irq_enable(void) { /* this uses r0 without declaring it - is that correct? */ asm volatile(" msrset r0, %0 \n" " nop \n" : : "i"(MSR_IE) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1392.86%150.00%
Steven Rostedt17.14%150.00%
Total14100.00%2100.00%

#else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
static inline notrace unsigned long arch_local_irq_save(void) { unsigned long flags, tmp; asm volatile (" mfs %0, rmsr \n" " nop \n" " andi %1, %0, %2 \n" " mts rmsr, %1 \n" " nop \n" : "=r"(flags), "=r"(tmp) : "i"(~MSR_IE) : "memory"); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells2086.96%133.33%
Michal Simek28.70%133.33%
Steven Rostedt14.35%133.33%
Total23100.00%3100.00%


static inline notrace void arch_local_irq_disable(void) { unsigned long tmp; asm volatile(" mfs %0, rmsr \n" " nop \n" " andi %0, %0, %1 \n" " mts rmsr, %0 \n" " nop \n" : "=r"(tmp) : "i"(~MSR_IE) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1694.12%150.00%
Steven Rostedt15.88%150.00%
Total17100.00%2100.00%


static inline notrace void arch_local_irq_enable(void) { unsigned long tmp; asm volatile(" mfs %0, rmsr \n" " nop \n" " ori %0, %0, %1 \n" " mts rmsr, %0 \n" " nop \n" : "=r"(tmp) : "i"(MSR_IE) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1694.12%150.00%
Steven Rostedt15.88%150.00%
Total17100.00%2100.00%

#endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
static inline notrace unsigned long arch_local_save_flags(void) { unsigned long flags; asm volatile(" mfs %0, rmsr \n" " nop \n" : "=r"(flags) : : "memory"); return flags; }

Contributors

PersonTokensPropCommitsCommitProp
Michal Simek1885.71%250.00%
David Howells29.52%125.00%
Steven Rostedt14.76%125.00%
Total21100.00%4100.00%


static inline notrace void arch_local_irq_restore(unsigned long flags) { asm volatile(" mts rmsr, %0 \n" " nop \n" : : "r"(flags) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1173.33%133.33%
Michal Simek320.00%133.33%
Steven Rostedt16.67%133.33%
Total15100.00%3100.00%


static inline notrace bool arch_irqs_disabled_flags(unsigned long flags) { return (flags & MSR_IE) == 0; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells1780.95%133.33%
Michal Simek314.29%133.33%
Steven Rostedt14.76%133.33%
Total21100.00%3100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
David Howells1694.12%150.00%
Steven Rostedt15.88%150.00%
Total17100.00%2100.00%

#endif /* _ASM_MICROBLAZE_IRQFLAGS_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Howells14470.24%120.00%
Michal Simek5124.88%360.00%
Steven Rostedt104.88%120.00%
Total205100.00%5100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.