diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/io_apic_64.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 65b6840e1820..cd01f3aa17ba 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -167,11 +167,10 @@ static inline void io_apic_modify(unsigned int apic, unsigned int value) | |||
167 | writel(value, &io_apic->data); | 167 | writel(value, &io_apic->data); |
168 | } | 168 | } |
169 | 169 | ||
170 | static int io_apic_level_ack_pending(unsigned int irq) | 170 | static bool io_apic_level_ack_pending(unsigned int irq) |
171 | { | 171 | { |
172 | struct irq_pin_list *entry; | 172 | struct irq_pin_list *entry; |
173 | unsigned long flags; | 173 | unsigned long flags; |
174 | int pending = 0; | ||
175 | 174 | ||
176 | spin_lock_irqsave(&ioapic_lock, flags); | 175 | spin_lock_irqsave(&ioapic_lock, flags); |
177 | entry = irq_2_pin + irq; | 176 | entry = irq_2_pin + irq; |
@@ -184,13 +183,17 @@ static int io_apic_level_ack_pending(unsigned int irq) | |||
184 | break; | 183 | break; |
185 | reg = io_apic_read(entry->apic, 0x10 + pin*2); | 184 | reg = io_apic_read(entry->apic, 0x10 + pin*2); |
186 | /* Is the remote IRR bit set? */ | 185 | /* Is the remote IRR bit set? */ |
187 | pending |= (reg >> 14) & 1; | 186 | if ((reg >> 14) & 1) { |
187 | spin_unlock_irqrestore(&ioapic_lock, flags); | ||
188 | return true; | ||
189 | } | ||
188 | if (!entry->next) | 190 | if (!entry->next) |
189 | break; | 191 | break; |
190 | entry = irq_2_pin + entry->next; | 192 | entry = irq_2_pin + entry->next; |
191 | } | 193 | } |
192 | spin_unlock_irqrestore(&ioapic_lock, flags); | 194 | spin_unlock_irqrestore(&ioapic_lock, flags); |
193 | return pending; | 195 | |
196 | return false; | ||
194 | } | 197 | } |
195 | 198 | ||
196 | /* | 199 | /* |