History

genirq: Make kstat_irqs() static

No more users outside the core code.

Thomas Gleixner committed 5 years ago

Commit 26c19d01 parent bb0e5192 files · +6 −14Browse files

Unified · Split

2 files
  1. include/linux/kernel_stat.h +0 −1
  2. kernel/irq/irqdesc.c +6 −13
include/linux/kernel_stat.h+0−1
@@ -67,7 +67,6 @@ static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) · 66 unmodified lines
6767 /*
6868 * Number of interrupts per specific IRQ source, since bootup
6969 */
70−extern unsigned int kstat_irqs(unsigned int irq);
7170 extern unsigned int kstat_irqs_usr(unsigned int irq);
7271
7372 /*
kernel/irq/irqdesc.c+6−13
@@ -924,15 +924,7 @@ static bool irq_is_nmi(struct irq_desc *desc) · 923 unmodified lines
924924 return desc->istate & IRQS_NMI;
925925 }
926926
927−/**
928− * kstat_irqs - Get the statistics for an interrupt
929− * @irq: The interrupt number
930− *
931− * Returns the sum of interrupt counts on all cpus since boot for
932− * @irq. The caller must ensure that the interrupt is not removed
933− * concurrently.
934− */
935−unsigned int kstat_irqs(unsigned int irq)
927+static unsigned int kstat_irqs(unsigned int irq)
936928 {
937929 struct irq_desc *desc = irq_to_desc(irq);
938930 unsigned int sum = 0;
@@ -951,13 +943,14 @@ unsigned int kstat_irqs(unsigned int irq) · 12 unmodified lines
951943 }
952944
953945 /**
954− * kstat_irqs_usr - Get the statistics for an interrupt
946+ * kstat_irqs_usr - Get the statistics for an interrupt from thread context
955947 * @irq: The interrupt number
956948 *
957949 * Returns the sum of interrupt counts on all cpus since boot for @irq.
958− * Contrary to kstat_irqs() this can be called from any context.
959− * It uses rcu since a concurrent removal of an interrupt descriptor is
960− * observing an rcu grace period before delayed_free_desc()/irq_kobj_release().
950+ *
951+ * It uses rcu to protect the access since a concurrent removal of an
952+ * interrupt descriptor is observing an rcu grace period before
953+ * delayed_free_desc()/irq_kobj_release().
961954 */
962955 unsigned int kstat_irqs_usr(unsigned int irq)
963956 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t