diff options
author | afzal mohammed <afzal.mohd.ma@gmail.com> | 2020-03-04 03:41:11 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2020-03-04 05:40:26 +0300 |
commit | 98060484e2328a4d29b62eb42ef31219a4629587 (patch) | |
tree | f0ae7c518d95a8eb18c7b7b40a849c99b3dd1200 /arch/xtensa/kernel/smp.c | |
parent | 98d54f81e36ba3bf92172791eba5ca5bd813989b (diff) | |
download | linux-98060484e2328a4d29b62eb42ef31219a4629587.tar.xz |
xtensa: replace setup_irq() by request_irq()
request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.
Per tglx[1], setup_irq() existed in olden days when allocators were not
ready by the time early interrupts were initialized.
Hence replace setup_irq() by request_irq().
[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
Message-Id: <20200304004112.3848-1-afzal.mohd.ma@gmail.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/smp.c')
-rw-r--r-- | arch/xtensa/kernel/smp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index 83b244ce61ee..cd85a7a2722b 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c @@ -53,16 +53,12 @@ static void system_flush_invalidate_dcache_range(unsigned long start, #define IPI_IRQ 0 static irqreturn_t ipi_interrupt(int irq, void *dev_id); -static struct irqaction ipi_irqaction = { - .handler = ipi_interrupt, - .flags = IRQF_PERCPU, - .name = "ipi", -}; void ipi_init(void) { unsigned irq = irq_create_mapping(NULL, IPI_IRQ); - setup_irq(irq, &ipi_irqaction); + if (request_irq(irq, ipi_interrupt, IRQF_PERCPU, "ipi", NULL)) + pr_err("Failed to request irq %u (ipi)\n", irq); } static inline unsigned int get_core_count(void) |