Skip to content

Commit 2579a4e

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
x86/ioapic: Rename misnamed functions
ioapic_irqd_[un]mask() are misnomers as both functions do way more than masking and unmasking the interrupt line. Both deal with the moving the affinity of the interrupt within interrupt context. The mask/unmask is just a tiny part of the functionality. Rename them to ioapic_prepare/finish_move(), fixup the call sites and rename the related variables in the code to reflect what this is about. No functional change. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sebastian Siewior <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent df43934 commit 2579a4e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/x86/kernel/apic/io_apic.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,7 @@ static bool io_apic_level_ack_pending(struct mp_chip_data *data)
17251725
return false;
17261726
}
17271727

1728-
static inline bool ioapic_irqd_mask(struct irq_data *data)
1728+
static inline bool ioapic_prepare_move(struct irq_data *data)
17291729
{
17301730
/* If we are moving the IRQ we need to mask it */
17311731
if (unlikely(irqd_is_setaffinity_pending(data))) {
@@ -1736,9 +1736,9 @@ static inline bool ioapic_irqd_mask(struct irq_data *data)
17361736
return false;
17371737
}
17381738

1739-
static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)
1739+
static inline void ioapic_finish_move(struct irq_data *data, bool moveit)
17401740
{
1741-
if (unlikely(masked)) {
1741+
if (unlikely(moveit)) {
17421742
/* Only migrate the irq if the ack has been received.
17431743
*
17441744
* On rare occasions the broadcast level triggered ack gets
@@ -1773,11 +1773,11 @@ static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)
17731773
}
17741774
}
17751775
#else
1776-
static inline bool ioapic_irqd_mask(struct irq_data *data)
1776+
static inline bool ioapic_prepare_move(struct irq_data *data)
17771777
{
17781778
return false;
17791779
}
1780-
static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)
1780+
static inline void ioapic_finish_move(struct irq_data *data, bool moveit)
17811781
{
17821782
}
17831783
#endif
@@ -1786,11 +1786,11 @@ static void ioapic_ack_level(struct irq_data *irq_data)
17861786
{
17871787
struct irq_cfg *cfg = irqd_cfg(irq_data);
17881788
unsigned long v;
1789-
bool masked;
1789+
bool moveit;
17901790
int i;
17911791

17921792
irq_complete_move(cfg);
1793-
masked = ioapic_irqd_mask(irq_data);
1793+
moveit = ioapic_prepare_move(irq_data);
17941794

17951795
/*
17961796
* It appears there is an erratum which affects at least version 0x11
@@ -1845,7 +1845,7 @@ static void ioapic_ack_level(struct irq_data *irq_data)
18451845
eoi_ioapic_pin(cfg->vector, irq_data->chip_data);
18461846
}
18471847

1848-
ioapic_irqd_unmask(irq_data, masked);
1848+
ioapic_finish_move(irq_data, moveit);
18491849
}
18501850

18511851
static void ioapic_ir_ack_level(struct irq_data *irq_data)

0 commit comments

Comments
 (0)