Skip to content

Commit fc1d08a

Browse files
afzalmamgregkh
authored andcommitted
s390/irq: replace setup_irq() by request_irq()
[ Upstream commit 8719b6d ] 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: <20200304005049.5291-1-afzal.mohd.ma@gmail.com> [heiko.carstens@de.ibm.com: replace pr_err with panic] Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 37b972b commit fc1d08a

3 files changed

Lines changed: 6 additions & 18 deletions

File tree

arch/s390/kernel/irq.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,6 @@ static irqreturn_t do_ext_interrupt(int irq, void *dummy)
294294
return IRQ_HANDLED;
295295
}
296296

297-
static struct irqaction external_interrupt = {
298-
.name = "EXT",
299-
.handler = do_ext_interrupt,
300-
};
301-
302297
void __init init_ext_interrupts(void)
303298
{
304299
int idx;
@@ -308,7 +303,8 @@ void __init init_ext_interrupts(void)
308303

309304
irq_set_chip_and_handler(EXT_INTERRUPT,
310305
&dummy_irq_chip, handle_percpu_irq);
311-
setup_irq(EXT_INTERRUPT, &external_interrupt);
306+
if (request_irq(EXT_INTERRUPT, do_ext_interrupt, 0, "EXT", NULL))
307+
panic("Failed to register EXT interrupt\n");
312308
}
313309

314310
static DEFINE_SPINLOCK(irq_subclass_lock);

drivers/s390/cio/airq.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,12 @@ static irqreturn_t do_airq_interrupt(int irq, void *dummy)
105105
return IRQ_HANDLED;
106106
}
107107

108-
static struct irqaction airq_interrupt = {
109-
.name = "AIO",
110-
.handler = do_airq_interrupt,
111-
};
112-
113108
void __init init_airq_interrupts(void)
114109
{
115110
irq_set_chip_and_handler(THIN_INTERRUPT,
116111
&dummy_irq_chip, handle_percpu_irq);
117-
setup_irq(THIN_INTERRUPT, &airq_interrupt);
112+
if (request_irq(THIN_INTERRUPT, do_airq_interrupt, 0, "AIO", NULL))
113+
panic("Failed to register AIO interrupt\n");
118114
}
119115

120116
static inline unsigned long iv_size(unsigned long bits)

drivers/s390/cio/cio.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,16 +563,12 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy)
563563
return IRQ_HANDLED;
564564
}
565565

566-
static struct irqaction io_interrupt = {
567-
.name = "I/O",
568-
.handler = do_cio_interrupt,
569-
};
570-
571566
void __init init_cio_interrupts(void)
572567
{
573568
irq_set_chip_and_handler(IO_INTERRUPT,
574569
&dummy_irq_chip, handle_percpu_irq);
575-
setup_irq(IO_INTERRUPT, &io_interrupt);
570+
if (request_irq(IO_INTERRUPT, do_cio_interrupt, 0, "I/O", NULL))
571+
panic("Failed to register I/O interrupt\n");
576572
}
577573

578574
#ifdef CONFIG_CCW_CONSOLE

0 commit comments

Comments
 (0)