]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/irq: utilize RCU instead of irq_lock_sparse() in show_msi_interrupt()
authorPingfan Liu <kernelfans@gmail.com>
Fri, 22 Apr 2022 10:02:12 +0000 (18:02 +0800)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 27 Apr 2022 10:53:34 +0000 (12:53 +0200)
As demonstrated by commit f2b4ffb9d2c5 ("genirq: Speedup
show_interrupts()"), irq_desc can be accessed safely in RCU read section.

Hence here resorting to rcu read lock to get rid of irq_lock_sparse().

Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Link: https://lore.kernel.org/r/20220422100212.22666-1-kernelfans@gmail.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/irq.c

index 3033f616e256939a8d62db8ab90a7a623bddabe2..45393919fe615cb9da6799d60d7e4bbcecc2f048 100644 (file)
@@ -205,7 +205,7 @@ static void show_msi_interrupt(struct seq_file *p, int irq)
        unsigned long flags;
        int cpu;
 
-       irq_lock_sparse();
+       rcu_read_lock();
        desc = irq_to_desc(irq);
        if (!desc)
                goto out;
@@ -224,7 +224,7 @@ static void show_msi_interrupt(struct seq_file *p, int irq)
        seq_putc(p, '\n');
        raw_spin_unlock_irqrestore(&desc->lock, flags);
 out:
-       irq_unlock_sparse();
+       rcu_read_unlock();
 }
 
 /*