diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 53243ca7816d..c86591b906fa 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3228,12 +3228,9 @@ unsigned int create_irq_nr(unsigned int irq_want, int node) | |||
3228 | } | 3228 | } |
3229 | spin_unlock_irqrestore(&vector_lock, flags); | 3229 | spin_unlock_irqrestore(&vector_lock, flags); |
3230 | 3230 | ||
3231 | if (irq > 0) { | 3231 | if (irq > 0) |
3232 | dynamic_irq_init(irq); | 3232 | dynamic_irq_init_keep_chip_data(irq); |
3233 | /* restore it, in case dynamic_irq_init clear it */ | 3233 | |
3234 | if (desc_new) | ||
3235 | desc_new->chip_data = cfg_new; | ||
3236 | } | ||
3237 | return irq; | 3234 | return irq; |
3238 | } | 3235 | } |
3239 | 3236 | ||
@@ -3256,17 +3253,12 @@ void destroy_irq(unsigned int irq) | |||
3256 | { | 3253 | { |
3257 | unsigned long flags; | 3254 | unsigned long flags; |
3258 | struct irq_cfg *cfg; | 3255 | struct irq_cfg *cfg; |
3259 | struct irq_desc *desc; | ||
3260 | 3256 | ||
3261 | /* store it, in case dynamic_irq_cleanup clear it */ | 3257 | dynamic_irq_cleanup_keep_chip_data(irq); |
3262 | desc = irq_to_desc(irq); | ||
3263 | cfg = desc->chip_data; | ||
3264 | dynamic_irq_cleanup(irq); | ||
3265 | /* connect back irq_cfg */ | ||
3266 | desc->chip_data = cfg; | ||
3267 | 3258 | ||
3268 | free_irte(irq); | 3259 | free_irte(irq); |
3269 | spin_lock_irqsave(&vector_lock, flags); | 3260 | spin_lock_irqsave(&vector_lock, flags); |
3261 | cfg = irq_to_desc(irq)->chip_data; | ||
3270 | __clear_irq_vector(irq, cfg); | 3262 | __clear_irq_vector(irq, cfg); |
3271 | spin_unlock_irqrestore(&vector_lock, flags); | 3263 | spin_unlock_irqrestore(&vector_lock, flags); |
3272 | } | 3264 | } |