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
67/*67/*
68 * Number of interrupts per specific IRQ source, since bootup68 * Number of interrupts per specific IRQ source, since bootup
69 */69 */
70extern unsigned int kstat_irqs(unsigned int irq);
71extern unsigned int kstat_irqs_usr(unsigned int irq);70extern unsigned int kstat_irqs_usr(unsigned int irq);
72 71
73/*72/*
kernel/irq/irqdesc.c+6−13
@@ -924,15 +924,7 @@ static bool irq_is_nmi(struct irq_desc *desc) · 923 unmodified lines
924 return desc->istate & IRQS_NMI;924 return desc->istate & IRQS_NMI;
925}925}
926 926
927/**927static unsigned int kstat_irqs(unsigned int irq)
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 */
935unsigned int kstat_irqs(unsigned int irq)
936{928{
937 struct irq_desc *desc = irq_to_desc(irq);929 struct irq_desc *desc = irq_to_desc(irq);
938 unsigned int sum = 0;930 unsigned int sum = 0;
@@ -951,13 +943,14 @@ unsigned int kstat_irqs(unsigned int irq) · 12 unmodified lines
951}943}
952 944
953/**945/**
954 * kstat_irqs_usr - Get the statistics for an interrupt946 * kstat_irqs_usr - Get the statistics for an interrupt from thread context
955 * @irq: The interrupt number947 * @irq: The interrupt number
956 *948 *
957 * Returns the sum of interrupt counts on all cpus since boot for @irq.949 * 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.950 *
959 * It uses rcu since a concurrent removal of an interrupt descriptor is951 * It uses rcu to protect the access since a concurrent removal of an
960 * observing an rcu grace period before delayed_free_desc()/irq_kobj_release().952 * interrupt descriptor is observing an rcu grace period before
953 * delayed_free_desc()/irq_kobj_release().
961 */954 */
962unsigned int kstat_irqs_usr(unsigned int irq)955unsigned int kstat_irqs_usr(unsigned int irq)
963{956{

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