blob: 62b185057c040157132386aaee6ff56eaaebcf25 [file] [log] [blame]
Vineet Guptaac4c2442013-01-18 15:12:16 +05301/*
2 * Copyright (C) 2011-12 Synopsys, Inc. (www.synopsys.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */
9
10#include <linux/interrupt.h>
Vineet Guptac93d8b82013-04-11 14:47:36 +053011#include <linux/irqchip.h>
Vineet Gupta03a6d282013-01-18 15:12:26 +053012#include <asm/mach_desc.h>
Vineet Gupta286130e2015-10-14 14:38:02 +053013#include <asm/smp.h>
Vineet Guptabacdf482013-01-18 15:12:18 +053014
15/*
Vineet Guptabacdf482013-01-18 15:12:18 +053016 * Late Interrupt system init called from start_kernel for Boot CPU only
17 *
18 * Since slab must already be initialized, platforms can start doing any
19 * needed request_irq( )s
20 */
21void __init init_IRQ(void)
22{
Vineet Gupta4c82f282015-10-13 08:48:54 +053023 /*
24 * process the entire interrupt tree in one go
25 * Any external intc will be setup provided DT chains them
26 * properly
27 */
Vineet Guptac93d8b82013-04-11 14:47:36 +053028 irqchip_init();
29
Vineet Gupta41195d22013-01-18 15:12:23 +053030#ifdef CONFIG_SMP
Vineet Gupta286130e2015-10-14 14:38:02 +053031 /* a SMP H/w block could do IPI IRQ request here */
Noam Camusb474a022015-12-16 03:10:27 +020032 if (plat_smp_ops.init_per_cpu)
33 plat_smp_ops.init_per_cpu(smp_processor_id());
Alexey Brodkin2f24ef742017-11-29 11:21:45 +030034#endif
Vineet Gupta286130e2015-10-14 14:38:02 +053035
Vineet Gupta575a9d42015-12-17 12:22:21 +053036 if (machine_desc->init_per_cpu)
37 machine_desc->init_per_cpu(smp_processor_id());
Vineet Guptabacdf482013-01-18 15:12:18 +053038}
39
40/*
41 * "C" Entry point for any ARC ISR, called from low level vector handler
42 * @irq is the vector number read from ICAUSE reg of on-chip intc
43 */
Vineet Gupta1b0ccb82016-01-01 15:12:54 +053044void arch_do_IRQ(unsigned int hwirq, struct pt_regs *regs)
Vineet Guptabacdf482013-01-18 15:12:18 +053045{
Vineet Gupta1b0ccb82016-01-01 15:12:54 +053046 handle_domain_irq(NULL, hwirq, regs);
Vineet Guptabacdf482013-01-18 15:12:18 +053047}