mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	It appears that openrisc copied arm64's GENERIC_IRQ_MULTI_HANDLER code (which came from arm). Cnvert it to use the generic version. Signed-off-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Stafford Horne <shorne@gmail.com> Cc: linux@armlinux.org.uk Cc: catalin.marinas@arm.com Cc: Will Deacon <will.deacon@arm.com> Cc: jonas@southpole.se Cc: stefan.kristiansson@saunalahti.fi Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: Arnd Bergmann <arnd@arndb.de> Cc: nicolas.pitre@linaro.org Cc: vladimir.murzin@arm.com Cc: keescook@chromium.org Cc: jinb.park7@gmail.com Cc: yamada.masahiro@socionext.com Cc: alexandre.belloni@bootlin.com Cc: pombredanne@nexb.com Cc: Greg KH <gregkh@linuxfoundation.org> Cc: kstewart@linuxfoundation.org Cc: jhogan@kernel.org Cc: mark.rutland@arm.com Cc: ard.biesheuvel@linaro.org Cc: james.morse@arm.com Cc: linux-arm-kernel@lists.infradead.org Cc: openrisc@lists.librecores.org Link: https://lkml.kernel.org/r/20180622170126.6308-5-palmer@sifive.com
		
			
				
	
	
		
			47 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * OpenRISC irq.c
 | 
						|
 *
 | 
						|
 * Linux architectural port borrowing liberally from similar works of
 | 
						|
 * others.  All original copyrights apply as per the original source
 | 
						|
 * declaration.
 | 
						|
 *
 | 
						|
 * Modifications for the OpenRISC architecture:
 | 
						|
 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
 | 
						|
 *
 | 
						|
 *      This program is free software; you can redistribute it and/or
 | 
						|
 *      modify it under the terms of the GNU General Public License
 | 
						|
 *      as published by the Free Software Foundation; either version
 | 
						|
 *      2 of the License, or (at your option) any later version.
 | 
						|
 */
 | 
						|
 | 
						|
#include <linux/interrupt.h>
 | 
						|
#include <linux/init.h>
 | 
						|
#include <linux/ftrace.h>
 | 
						|
#include <linux/irq.h>
 | 
						|
#include <linux/irqchip.h>
 | 
						|
#include <linux/export.h>
 | 
						|
#include <linux/irqflags.h>
 | 
						|
 | 
						|
/* read interrupt enabled status */
 | 
						|
unsigned long arch_local_save_flags(void)
 | 
						|
{
 | 
						|
	return mfspr(SPR_SR) & (SPR_SR_IEE|SPR_SR_TEE);
 | 
						|
}
 | 
						|
EXPORT_SYMBOL(arch_local_save_flags);
 | 
						|
 | 
						|
/* set interrupt enabled status */
 | 
						|
void arch_local_irq_restore(unsigned long flags)
 | 
						|
{
 | 
						|
	mtspr(SPR_SR, ((mfspr(SPR_SR) & ~(SPR_SR_IEE|SPR_SR_TEE)) | flags));
 | 
						|
}
 | 
						|
EXPORT_SYMBOL(arch_local_irq_restore);
 | 
						|
 | 
						|
void __init init_IRQ(void)
 | 
						|
{
 | 
						|
	irqchip_init();
 | 
						|
}
 | 
						|
 | 
						|
void __irq_entry do_IRQ(struct pt_regs *regs)
 | 
						|
{
 | 
						|
	handle_arch_irq(regs);
 | 
						|
}
 |