diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-25 12:39:36 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-02-16 11:34:21 -0500 |
commit | dade7716925a4e9a31f249f9ca1ed4e2f1495a8c (patch) | |
tree | 0e51408add1efd43547505a68becfaa6b74ff43a /arch/x86/kernel | |
parent | 9d133e5db993d577bd868b54083869fe5479fcff (diff) |
x86: Convert ioapic_lock and vector_lock to raw_spinlock
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 937150e4c06d..d55e43d352b3 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -73,8 +73,8 @@ | |||
73 | */ | 73 | */ |
74 | int sis_apic_bug = -1; | 74 | int sis_apic_bug = -1; |
75 | 75 | ||
76 | static DEFINE_SPINLOCK(ioapic_lock); | 76 | static DEFINE_RAW_SPINLOCK(ioapic_lock); |
77 | static DEFINE_SPINLOCK(vector_lock); | 77 | static DEFINE_RAW_SPINLOCK(vector_lock); |
78 | 78 | ||
79 | /* | 79 | /* |
80 | * # of IRQ routing registers | 80 | * # of IRQ routing registers |
@@ -393,7 +393,7 @@ static bool io_apic_level_ack_pending(struct irq_cfg *cfg) | |||
393 | struct irq_pin_list *entry; | 393 | struct irq_pin_list *entry; |
394 | unsigned long flags; | 394 | unsigned long flags; |
395 | 395 | ||
396 | spin_lock_irqsave(&ioapic_lock, flags); | 396 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
397 | for_each_irq_pin(entry, cfg->irq_2_pin) { | 397 | for_each_irq_pin(entry, cfg->irq_2_pin) { |
398 | unsigned int reg; | 398 | unsigned int reg; |
399 | int pin; | 399 | int pin; |
@@ -402,11 +402,11 @@ static bool io_apic_level_ack_pending(struct irq_cfg *cfg) | |||
402 | reg = io_apic_read(entry->apic, 0x10 + pin*2); | 402 | reg = io_apic_read(entry->apic, 0x10 + pin*2); |
403 | /* Is the remote IRR bit set? */ | 403 | /* Is the remote IRR bit set? */ |
404 | if (reg & IO_APIC_REDIR_REMOTE_IRR) { | 404 | if (reg & IO_APIC_REDIR_REMOTE_IRR) { |
405 | spin_unlock_irqrestore(&ioapic_lock, flags); | 405 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
406 | return true; | 406 | return true; |
407 | } | 407 | } |
408 | } | 408 | } |
409 | spin_unlock_irqrestore(&ioapic_lock, flags); | 409 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
410 | 410 | ||
411 | return false; | 411 | return false; |
412 | } | 412 | } |
@@ -420,10 +420,10 @@ static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin) | |||
420 | { | 420 | { |
421 | union entry_union eu; | 421 | union entry_union eu; |
422 | unsigned long flags; | 422 | unsigned long flags; |
423 | spin_lock_irqsave(&ioapic_lock, flags); | 423 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
424 | eu.w1 = io_apic_read(apic, 0x10 + 2 * pin); | 424 | eu.w1 = io_apic_read(apic, 0x10 + 2 * pin); |
425 | eu.w2 = io_apic_read(apic, 0x11 + 2 * pin); | 425 | eu.w2 = io_apic_read(apic, 0x11 + 2 * pin); |
426 | spin_unlock_irqrestore(&ioapic_lock, flags); | 426 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
427 | return eu.entry; | 427 | return eu.entry; |
428 | } | 428 | } |
429 | 429 | ||
@@ -446,9 +446,9 @@ __ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) | |||
446 | void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) | 446 | void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) |
447 | { | 447 | { |
448 | unsigned long flags; | 448 | unsigned long flags; |
449 | spin_lock_irqsave(&ioapic_lock, flags); | 449 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
450 | __ioapic_write_entry(apic, pin, e); | 450 | __ioapic_write_entry(apic, pin, e); |
451 | spin_unlock_irqrestore(&ioapic_lock, flags); | 451 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
452 | } | 452 | } |
453 | 453 | ||
454 | /* | 454 | /* |
@@ -461,10 +461,10 @@ static void ioapic_mask_entry(int apic, int pin) | |||
461 | unsigned long flags; | 461 | unsigned long flags; |
462 | union entry_union eu = { .entry.mask = 1 }; | 462 | union entry_union eu = { .entry.mask = 1 }; |
463 | 463 | ||
464 | spin_lock_irqsave(&ioapic_lock, flags); | 464 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
465 | io_apic_write(apic, 0x10 + 2*pin, eu.w1); | 465 | io_apic_write(apic, 0x10 + 2*pin, eu.w1); |
466 | io_apic_write(apic, 0x11 + 2*pin, eu.w2); | 466 | io_apic_write(apic, 0x11 + 2*pin, eu.w2); |
467 | spin_unlock_irqrestore(&ioapic_lock, flags); | 467 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
468 | } | 468 | } |
469 | 469 | ||
470 | /* | 470 | /* |
@@ -591,9 +591,9 @@ static void mask_IO_APIC_irq_desc(struct irq_desc *desc) | |||
591 | 591 | ||
592 | BUG_ON(!cfg); | 592 | BUG_ON(!cfg); |
593 | 593 | ||
594 | spin_lock_irqsave(&ioapic_lock, flags); | 594 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
595 | __mask_IO_APIC_irq(cfg); | 595 | __mask_IO_APIC_irq(cfg); |
596 | spin_unlock_irqrestore(&ioapic_lock, flags); | 596 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
597 | } | 597 | } |
598 | 598 | ||
599 | static void unmask_IO_APIC_irq_desc(struct irq_desc *desc) | 599 | static void unmask_IO_APIC_irq_desc(struct irq_desc *desc) |
@@ -601,9 +601,9 @@ static void unmask_IO_APIC_irq_desc(struct irq_desc *desc) | |||
601 | struct irq_cfg *cfg = desc->chip_data; | 601 | struct irq_cfg *cfg = desc->chip_data; |
602 | unsigned long flags; | 602 | unsigned long flags; |
603 | 603 | ||
604 | spin_lock_irqsave(&ioapic_lock, flags); | 604 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
605 | __unmask_IO_APIC_irq(cfg); | 605 | __unmask_IO_APIC_irq(cfg); |
606 | spin_unlock_irqrestore(&ioapic_lock, flags); | 606 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
607 | } | 607 | } |
608 | 608 | ||
609 | static void mask_IO_APIC_irq(unsigned int irq) | 609 | static void mask_IO_APIC_irq(unsigned int irq) |
@@ -1127,12 +1127,12 @@ void lock_vector_lock(void) | |||
1127 | /* Used to the online set of cpus does not change | 1127 | /* Used to the online set of cpus does not change |
1128 | * during assign_irq_vector. | 1128 | * during assign_irq_vector. |
1129 | */ | 1129 | */ |
1130 | spin_lock(&vector_lock); | 1130 | raw_spin_lock(&vector_lock); |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | void unlock_vector_lock(void) | 1133 | void unlock_vector_lock(void) |
1134 | { | 1134 | { |
1135 | spin_unlock(&vector_lock); | 1135 | raw_spin_unlock(&vector_lock); |
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | static int | 1138 | static int |
@@ -1220,9 +1220,9 @@ int assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask) | |||
1220 | int err; | 1220 | int err; |
1221 | unsigned long flags; | 1221 | unsigned long flags; |
1222 | 1222 | ||
1223 | spin_lock_irqsave(&vector_lock, flags); | 1223 | raw_spin_lock_irqsave(&vector_lock, flags); |
1224 | err = __assign_irq_vector(irq, cfg, mask); | 1224 | err = __assign_irq_vector(irq, cfg, mask); |
1225 | spin_unlock_irqrestore(&vector_lock, flags); | 1225 | raw_spin_unlock_irqrestore(&vector_lock, flags); |
1226 | return err; | 1226 | return err; |
1227 | } | 1227 | } |
1228 | 1228 | ||
@@ -1265,7 +1265,7 @@ void __setup_vector_irq(int cpu) | |||
1265 | * assignments that might be happening on another cpu in parallel, | 1265 | * assignments that might be happening on another cpu in parallel, |
1266 | * while we setup our initial vector to irq mappings. | 1266 | * while we setup our initial vector to irq mappings. |
1267 | */ | 1267 | */ |
1268 | spin_lock(&vector_lock); | 1268 | raw_spin_lock(&vector_lock); |
1269 | /* Mark the inuse vectors */ | 1269 | /* Mark the inuse vectors */ |
1270 | for_each_irq_desc(irq, desc) { | 1270 | for_each_irq_desc(irq, desc) { |
1271 | cfg = desc->chip_data; | 1271 | cfg = desc->chip_data; |
@@ -1284,7 +1284,7 @@ void __setup_vector_irq(int cpu) | |||
1284 | if (!cpumask_test_cpu(cpu, cfg->domain)) | 1284 | if (!cpumask_test_cpu(cpu, cfg->domain)) |
1285 | per_cpu(vector_irq, cpu)[vector] = -1; | 1285 | per_cpu(vector_irq, cpu)[vector] = -1; |
1286 | } | 1286 | } |
1287 | spin_unlock(&vector_lock); | 1287 | raw_spin_unlock(&vector_lock); |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | static struct irq_chip ioapic_chip; | 1290 | static struct irq_chip ioapic_chip; |
@@ -1603,14 +1603,14 @@ __apicdebuginit(void) print_IO_APIC(void) | |||
1603 | 1603 | ||
1604 | for (apic = 0; apic < nr_ioapics; apic++) { | 1604 | for (apic = 0; apic < nr_ioapics; apic++) { |
1605 | 1605 | ||
1606 | spin_lock_irqsave(&ioapic_lock, flags); | 1606 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
1607 | reg_00.raw = io_apic_read(apic, 0); | 1607 | reg_00.raw = io_apic_read(apic, 0); |
1608 | reg_01.raw = io_apic_read(apic, 1); | 1608 | reg_01.raw = io_apic_read(apic, 1); |
1609 | if (reg_01.bits.version >= 0x10) | 1609 | if (reg_01.bits.version >= 0x10) |
1610 | reg_02.raw = io_apic_read(apic, 2); | 1610 | reg_02.raw = io_apic_read(apic, 2); |
1611 | if (reg_01.bits.version >= 0x20) | 1611 | if (reg_01.bits.version >= 0x20) |
1612 | reg_03.raw = io_apic_read(apic, 3); | 1612 | reg_03.raw = io_apic_read(apic, 3); |
1613 | spin_unlock_irqrestore(&ioapic_lock, flags); | 1613 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
1614 | 1614 | ||
1615 | printk("\n"); | 1615 | printk("\n"); |
1616 | printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].apicid); | 1616 | printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].apicid); |
@@ -1905,9 +1905,9 @@ void __init enable_IO_APIC(void) | |||
1905 | * The number of IO-APIC IRQ registers (== #pins): | 1905 | * The number of IO-APIC IRQ registers (== #pins): |
1906 | */ | 1906 | */ |
1907 | for (apic = 0; apic < nr_ioapics; apic++) { | 1907 | for (apic = 0; apic < nr_ioapics; apic++) { |
1908 | spin_lock_irqsave(&ioapic_lock, flags); | 1908 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
1909 | reg_01.raw = io_apic_read(apic, 1); | 1909 | reg_01.raw = io_apic_read(apic, 1); |
1910 | spin_unlock_irqrestore(&ioapic_lock, flags); | 1910 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
1911 | nr_ioapic_registers[apic] = reg_01.bits.entries+1; | 1911 | nr_ioapic_registers[apic] = reg_01.bits.entries+1; |
1912 | } | 1912 | } |
1913 | 1913 | ||
@@ -2047,9 +2047,9 @@ void __init setup_ioapic_ids_from_mpc(void) | |||
2047 | for (apic_id = 0; apic_id < nr_ioapics; apic_id++) { | 2047 | for (apic_id = 0; apic_id < nr_ioapics; apic_id++) { |
2048 | 2048 | ||
2049 | /* Read the register 0 value */ | 2049 | /* Read the register 0 value */ |
2050 | spin_lock_irqsave(&ioapic_lock, flags); | 2050 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
2051 | reg_00.raw = io_apic_read(apic_id, 0); | 2051 | reg_00.raw = io_apic_read(apic_id, 0); |
2052 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2052 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
2053 | 2053 | ||
2054 | old_id = mp_ioapics[apic_id].apicid; | 2054 | old_id = mp_ioapics[apic_id].apicid; |
2055 | 2055 | ||
@@ -2108,16 +2108,16 @@ void __init setup_ioapic_ids_from_mpc(void) | |||
2108 | mp_ioapics[apic_id].apicid); | 2108 | mp_ioapics[apic_id].apicid); |
2109 | 2109 | ||
2110 | reg_00.bits.ID = mp_ioapics[apic_id].apicid; | 2110 | reg_00.bits.ID = mp_ioapics[apic_id].apicid; |
2111 | spin_lock_irqsave(&ioapic_lock, flags); | 2111 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
2112 | io_apic_write(apic_id, 0, reg_00.raw); | 2112 | io_apic_write(apic_id, 0, reg_00.raw); |
2113 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2113 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
2114 | 2114 | ||
2115 | /* | 2115 | /* |
2116 | * Sanity check | 2116 | * Sanity check |
2117 | */ | 2117 | */ |
2118 | spin_lock_irqsave(&ioapic_lock, flags); | 2118 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
2119 | reg_00.raw = io_apic_read(apic_id, 0); | 2119 | reg_00.raw = io_apic_read(apic_id, 0); |
2120 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2120 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
2121 | if (reg_00.bits.ID != mp_ioapics[apic_id].apicid) | 2121 | if (reg_00.bits.ID != mp_ioapics[apic_id].apicid) |
2122 | printk("could not set ID!\n"); | 2122 | printk("could not set ID!\n"); |
2123 | else | 2123 | else |
@@ -2200,7 +2200,7 @@ static unsigned int startup_ioapic_irq(unsigned int irq) | |||
2200 | unsigned long flags; | 2200 | unsigned long flags; |
2201 | struct irq_cfg *cfg; | 2201 | struct irq_cfg *cfg; |
2202 | 2202 | ||
2203 | spin_lock_irqsave(&ioapic_lock, flags); | 2203 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
2204 | if (irq < nr_legacy_irqs) { | 2204 | if (irq < nr_legacy_irqs) { |
2205 | disable_8259A_irq(irq); | 2205 | disable_8259A_irq(irq); |
2206 | if (i8259A_irq_pending(irq)) | 2206 | if (i8259A_irq_pending(irq)) |
@@ -2208,7 +2208,7 @@ static unsigned int startup_ioapic_irq(unsigned int irq) | |||
2208 | } | 2208 | } |
2209 | cfg = irq_cfg(irq); | 2209 | cfg = irq_cfg(irq); |
2210 | __unmask_IO_APIC_irq(cfg); | 2210 | __unmask_IO_APIC_irq(cfg); |
2211 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2211 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
2212 | 2212 | ||
2213 | return was_pending; | 2213 | return was_pending; |
2214 | } | 2214 | } |
@@ -2219,9 +2219,9 @@ static int ioapic_retrigger_irq(unsigned int irq) | |||
2219 | struct irq_cfg *cfg = irq_cfg(irq); | 2219 | struct irq_cfg *cfg = irq_cfg(irq); |
2220 | unsigned long flags; | 2220 | unsigned long flags; |
2221 | 2221 | ||
2222 | spin_lock_irqsave(&vector_lock, flags); | 2222 | raw_spin_lock_irqsave(&vector_lock, flags); |
2223 | apic->send_IPI_mask(cpumask_of(cpumask_first(cfg->domain)), cfg->vector); | 2223 | apic->send_IPI_mask(cpumask_of(cpumask_first(cfg->domain)), cfg->vector); |
2224 | spin_unlock_irqrestore(&vector_lock, flags); | 2224 | raw_spin_unlock_irqrestore(&vector_lock, flags); |
2225 | 2225 | ||
2226 | return 1; | 2226 | return 1; |
2227 | } | 2227 | } |
@@ -2314,14 +2314,14 @@ set_ioapic_affinity_irq_desc(struct irq_desc *desc, const struct cpumask *mask) | |||
2314 | irq = desc->irq; | 2314 | irq = desc->irq; |
2315 | cfg = desc->chip_data; | 2315 | cfg = desc->chip_data; |
2316 | 2316 | ||
2317 | spin_lock_irqsave(&ioapic_lock, flags); | 2317 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
2318 | ret = set_desc_affinity(desc, mask, &dest); | 2318 | ret = set_desc_affinity(desc, mask, &dest); |
2319 | if (!ret) { | 2319 | if (!ret) { |
2320 | /* Only the high 8 bits are valid. */ | 2320 | /* Only the high 8 bits are valid. */ |
2321 | dest = SET_APIC_LOGICAL_ID(dest); | 2321 | dest = SET_APIC_LOGICAL_ID(dest); |
2322 | __target_IO_APIC_irq(irq, dest, cfg); | 2322 | __target_IO_APIC_irq(irq, dest, cfg); |
2323 | } | 2323 | } |
2324 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2324 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
2325 | 2325 | ||
2326 | return ret; | 2326 | return ret; |
2327 | } | 2327 | } |
@@ -2549,9 +2549,9 @@ static void eoi_ioapic_irq(struct irq_desc *desc) | |||
2549 | irq = desc->irq; | 2549 | irq = desc->irq; |
2550 | cfg = desc->chip_data; | 2550 | cfg = desc->chip_data; |
2551 | 2551 | ||
2552 | spin_lock_irqsave(&ioapic_lock, flags); | 2552 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
2553 | __eoi_ioapic_irq(irq, cfg); | 2553 | __eoi_ioapic_irq(irq, cfg); |
2554 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2554 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
2555 | } | 2555 | } |
2556 | 2556 | ||
2557 | static void ack_apic_level(unsigned int irq) | 2557 | static void ack_apic_level(unsigned int irq) |
@@ -3133,13 +3133,13 @@ static int ioapic_resume(struct sys_device *dev) | |||
3133 | data = container_of(dev, struct sysfs_ioapic_data, dev); | 3133 | data = container_of(dev, struct sysfs_ioapic_data, dev); |
3134 | entry = data->entry; | 3134 | entry = data->entry; |
3135 | 3135 | ||
3136 | spin_lock_irqsave(&ioapic_lock, flags); | 3136 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
3137 | reg_00.raw = io_apic_read(dev->id, 0); | 3137 | reg_00.raw = io_apic_read(dev->id, 0); |
3138 | if (reg_00.bits.ID != mp_ioapics[dev->id].apicid) { | 3138 | if (reg_00.bits.ID != mp_ioapics[dev->id].apicid) { |
3139 | reg_00.bits.ID = mp_ioapics[dev->id].apicid; | 3139 | reg_00.bits.ID = mp_ioapics[dev->id].apicid; |
3140 | io_apic_write(dev->id, 0, reg_00.raw); | 3140 | io_apic_write(dev->id, 0, reg_00.raw); |
3141 | } | 3141 | } |
3142 | spin_unlock_irqrestore(&ioapic_lock, flags); | 3142 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
3143 | for (i = 0; i < nr_ioapic_registers[dev->id]; i++) | 3143 | for (i = 0; i < nr_ioapic_registers[dev->id]; i++) |
3144 | ioapic_write_entry(dev->id, i, entry[i]); | 3144 | ioapic_write_entry(dev->id, i, entry[i]); |
3145 | 3145 | ||
@@ -3202,7 +3202,7 @@ unsigned int create_irq_nr(unsigned int irq_want, int node) | |||
3202 | if (irq_want < nr_irqs_gsi) | 3202 | if (irq_want < nr_irqs_gsi) |
3203 | irq_want = nr_irqs_gsi; | 3203 | irq_want = nr_irqs_gsi; |
3204 | 3204 | ||
3205 | spin_lock_irqsave(&vector_lock, flags); | 3205 | raw_spin_lock_irqsave(&vector_lock, flags); |
3206 | for (new = irq_want; new < nr_irqs; new++) { | 3206 | for (new = irq_want; new < nr_irqs; new++) { |
3207 | desc_new = irq_to_desc_alloc_node(new, node); | 3207 | desc_new = irq_to_desc_alloc_node(new, node); |
3208 | if (!desc_new) { | 3208 | if (!desc_new) { |
@@ -3221,7 +3221,7 @@ unsigned int create_irq_nr(unsigned int irq_want, int node) | |||
3221 | irq = new; | 3221 | irq = new; |
3222 | break; | 3222 | break; |
3223 | } | 3223 | } |
3224 | spin_unlock_irqrestore(&vector_lock, flags); | 3224 | raw_spin_unlock_irqrestore(&vector_lock, flags); |
3225 | 3225 | ||
3226 | if (irq > 0) { | 3226 | if (irq > 0) { |
3227 | dynamic_irq_init(irq); | 3227 | dynamic_irq_init(irq); |
@@ -3261,9 +3261,9 @@ void destroy_irq(unsigned int irq) | |||
3261 | desc->chip_data = cfg; | 3261 | desc->chip_data = cfg; |
3262 | 3262 | ||
3263 | free_irte(irq); | 3263 | free_irte(irq); |
3264 | spin_lock_irqsave(&vector_lock, flags); | 3264 | raw_spin_lock_irqsave(&vector_lock, flags); |
3265 | __clear_irq_vector(irq, cfg); | 3265 | __clear_irq_vector(irq, cfg); |
3266 | spin_unlock_irqrestore(&vector_lock, flags); | 3266 | raw_spin_unlock_irqrestore(&vector_lock, flags); |
3267 | } | 3267 | } |
3268 | 3268 | ||
3269 | /* | 3269 | /* |
@@ -3800,9 +3800,9 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
3800 | union IO_APIC_reg_01 reg_01; | 3800 | union IO_APIC_reg_01 reg_01; |
3801 | unsigned long flags; | 3801 | unsigned long flags; |
3802 | 3802 | ||
3803 | spin_lock_irqsave(&ioapic_lock, flags); | 3803 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
3804 | reg_01.raw = io_apic_read(ioapic, 1); | 3804 | reg_01.raw = io_apic_read(ioapic, 1); |
3805 | spin_unlock_irqrestore(&ioapic_lock, flags); | 3805 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
3806 | 3806 | ||
3807 | return reg_01.bits.entries; | 3807 | return reg_01.bits.entries; |
3808 | } | 3808 | } |
@@ -3964,9 +3964,9 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id) | |||
3964 | if (physids_empty(apic_id_map)) | 3964 | if (physids_empty(apic_id_map)) |
3965 | apic->ioapic_phys_id_map(&phys_cpu_present_map, &apic_id_map); | 3965 | apic->ioapic_phys_id_map(&phys_cpu_present_map, &apic_id_map); |
3966 | 3966 | ||
3967 | spin_lock_irqsave(&ioapic_lock, flags); | 3967 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
3968 | reg_00.raw = io_apic_read(ioapic, 0); | 3968 | reg_00.raw = io_apic_read(ioapic, 0); |
3969 | spin_unlock_irqrestore(&ioapic_lock, flags); | 3969 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
3970 | 3970 | ||
3971 | if (apic_id >= get_physical_broadcast()) { | 3971 | if (apic_id >= get_physical_broadcast()) { |
3972 | printk(KERN_WARNING "IOAPIC[%d]: Invalid apic_id %d, trying " | 3972 | printk(KERN_WARNING "IOAPIC[%d]: Invalid apic_id %d, trying " |
@@ -4000,10 +4000,10 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id) | |||
4000 | if (reg_00.bits.ID != apic_id) { | 4000 | if (reg_00.bits.ID != apic_id) { |
4001 | reg_00.bits.ID = apic_id; | 4001 | reg_00.bits.ID = apic_id; |
4002 | 4002 | ||
4003 | spin_lock_irqsave(&ioapic_lock, flags); | 4003 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
4004 | io_apic_write(ioapic, 0, reg_00.raw); | 4004 | io_apic_write(ioapic, 0, reg_00.raw); |
4005 | reg_00.raw = io_apic_read(ioapic, 0); | 4005 | reg_00.raw = io_apic_read(ioapic, 0); |
4006 | spin_unlock_irqrestore(&ioapic_lock, flags); | 4006 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
4007 | 4007 | ||
4008 | /* Sanity check */ | 4008 | /* Sanity check */ |
4009 | if (reg_00.bits.ID != apic_id) { | 4009 | if (reg_00.bits.ID != apic_id) { |
@@ -4024,9 +4024,9 @@ int __init io_apic_get_version(int ioapic) | |||
4024 | union IO_APIC_reg_01 reg_01; | 4024 | union IO_APIC_reg_01 reg_01; |
4025 | unsigned long flags; | 4025 | unsigned long flags; |
4026 | 4026 | ||
4027 | spin_lock_irqsave(&ioapic_lock, flags); | 4027 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
4028 | reg_01.raw = io_apic_read(ioapic, 1); | 4028 | reg_01.raw = io_apic_read(ioapic, 1); |
4029 | spin_unlock_irqrestore(&ioapic_lock, flags); | 4029 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
4030 | 4030 | ||
4031 | return reg_01.bits.version; | 4031 | return reg_01.bits.version; |
4032 | } | 4032 | } |