blob: ef909dd4b40c4b6a38251f32b22ef65459c6e02a [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001// SPDX-License-Identifier: GPL-2.0-only
Vineet Guptaac4c2442013-01-18 15:12:16 +05302/*
3 * Copyright (C) 2011-12 Synopsys, Inc. (www.synopsys.com)
Vineet Guptaac4c2442013-01-18 15:12:16 +05304 */
5
6#include <linux/interrupt.h>
Vineet Guptac93d8b82013-04-11 14:47:36 +05307#include <linux/irqchip.h>
Vineet Gupta03a6d282013-01-18 15:12:26 +05308#include <asm/mach_desc.h>
Vineet Gupta286130e2015-10-14 14:38:02 +05309#include <asm/smp.h>
Vineet Guptabacdf482013-01-18 15:12:18 +053010
11/*
Vineet Guptabacdf482013-01-18 15:12:18 +053012 * Late Interrupt system init called from start_kernel for Boot CPU only
13 *
14 * Since slab must already be initialized, platforms can start doing any
15 * needed request_irq( )s
16 */
17void __init init_IRQ(void)
18{
Vineet Gupta4c82f282015-10-13 08:48:54 +053019 /*
20 * process the entire interrupt tree in one go
21 * Any external intc will be setup provided DT chains them
22 * properly
23 */
Vineet Guptac93d8b82013-04-11 14:47:36 +053024 irqchip_init();
25
Vineet Gupta41195d22013-01-18 15:12:23 +053026#ifdef CONFIG_SMP
Vineet Gupta286130e2015-10-14 14:38:02 +053027 /* a SMP H/w block could do IPI IRQ request here */
Noam Camusb474a022015-12-16 03:10:27 +020028 if (plat_smp_ops.init_per_cpu)
29 plat_smp_ops.init_per_cpu(smp_processor_id());
Alexey Brodkin2f24ef72017-11-29 11:21:45 +030030#endif
Vineet Gupta286130e2015-10-14 14:38:02 +053031
Vineet Gupta575a9d42015-12-17 12:22:21 +053032 if (machine_desc->init_per_cpu)
33 machine_desc->init_per_cpu(smp_processor_id());
Vineet Guptabacdf482013-01-18 15:12:18 +053034}
35
36/*
37 * "C" Entry point for any ARC ISR, called from low level vector handler
38 * @irq is the vector number read from ICAUSE reg of on-chip intc
39 */
Vineet Gupta1b0ccb82016-01-01 15:12:54 +053040void arch_do_IRQ(unsigned int hwirq, struct pt_regs *regs)
Vineet Guptabacdf482013-01-18 15:12:18 +053041{
Vineet Gupta1b0ccb82016-01-01 15:12:54 +053042 handle_domain_irq(NULL, hwirq, regs);
Vineet Guptabacdf482013-01-18 15:12:18 +053043}