Skip to content

Commit

Permalink
s390/irq: utilize RCU instead of irq_lock_sparse() in show_msi_interr…
Browse files Browse the repository at this point in the history
…upt()

As demonstrated by commit 74bdf78 ("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>
  • Loading branch information
Pingfan Liu authored and Heiko Carstens committed Apr 27, 2022
1 parent 9a07731 commit 6260f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/s390/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}

/*
Expand Down

0 comments on commit 6260f64

Please sign in to comment.