1 // SPDX-License-Identifier: GPL-2.0-or-later << 2 /* 1 /* 3 * OpenRISC irq.c !! 2 * irq.c 4 * 3 * 5 * Linux architectural port borrowing liberall !! 4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com> 6 * others. All original copyrights apply as p << 7 * declaration. << 8 * 5 * 9 * Modifications for the OpenRISC architecture !! 6 * This file is subject to the terms and conditions of the GNU General Public 10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@s !! 7 * License. See the file COPYING in the main directory of this archive >> 8 * for more details. 11 */ 9 */ 12 10 13 #include <linux/interrupt.h> !! 11 #include <linux/types.h> 14 #include <linux/init.h> 12 #include <linux/init.h> 15 #include <linux/ftrace.h> !! 13 #include <linux/kernel.h> >> 14 #include <linux/kernel_stat.h> >> 15 #include <linux/interrupt.h> 16 #include <linux/irq.h> 16 #include <linux/irq.h> 17 #include <linux/irqchip.h> !! 17 #include <linux/seq_file.h> 18 #include <linux/export.h> !! 18 #include <asm/traps.h> 19 #include <linux/irqflags.h> << 20 19 21 /* read interrupt enabled status */ !! 20 asmlinkage void do_IRQ(int irq, struct pt_regs *regs) 22 unsigned long arch_local_save_flags(void) << 23 { 21 { 24 return mfspr(SPR_SR) & (SPR_SR_IEE|SPR !! 22 struct pt_regs *oldregs = set_irq_regs(regs); 25 } << 26 EXPORT_SYMBOL(arch_local_save_flags); << 27 23 28 /* set interrupt enabled status */ !! 24 irq_enter(); 29 void arch_local_irq_restore(unsigned long flag !! 25 generic_handle_irq(irq); 30 { !! 26 irq_exit(); 31 mtspr(SPR_SR, ((mfspr(SPR_SR) & ~(SPR_ !! 27 >> 28 set_irq_regs(oldregs); 32 } 29 } 33 EXPORT_SYMBOL(arch_local_irq_restore); << 34 30 35 void __init init_IRQ(void) !! 31 >> 32 /* The number of spurious interrupts */ >> 33 atomic_t irq_err_count; >> 34 >> 35 int arch_show_interrupts(struct seq_file *p, int prec) 36 { 36 { 37 irqchip_init(); !! 37 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); >> 38 return 0; 38 } 39 } 39 40
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.