treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / openrisc / kernel / irq.c
blobc38fa863afa8d9d0616e214c8bf0a40af754e790
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * OpenRISC irq.c
5 * Linux architectural port borrowing liberally from similar works of
6 * others. All original copyrights apply as per the original source
7 * declaration.
9 * Modifications for the OpenRISC architecture:
10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
13 #include <linux/interrupt.h>
14 #include <linux/init.h>
15 #include <linux/ftrace.h>
16 #include <linux/irq.h>
17 #include <linux/irqchip.h>
18 #include <linux/export.h>
19 #include <linux/irqflags.h>
21 /* read interrupt enabled status */
22 unsigned long arch_local_save_flags(void)
24 return mfspr(SPR_SR) & (SPR_SR_IEE|SPR_SR_TEE);
26 EXPORT_SYMBOL(arch_local_save_flags);
28 /* set interrupt enabled status */
29 void arch_local_irq_restore(unsigned long flags)
31 mtspr(SPR_SR, ((mfspr(SPR_SR) & ~(SPR_SR_IEE|SPR_SR_TEE)) | flags));
33 EXPORT_SYMBOL(arch_local_irq_restore);
35 void __init init_IRQ(void)
37 irqchip_init();
40 void __irq_entry do_IRQ(struct pt_regs *regs)
42 handle_arch_irq(regs);