Changeset 623b49f1 in mainline for kernel/arch/ia32
- Timestamp:
- 2007-01-29T19:22:04Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1004b37
- Parents:
- 7d07bf3
- Location:
- kernel/arch/ia32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/smp/smp.h
r7d07bf3 r623b49f1 44 44 bool (*cpu_bootstrap)(index_t i); /**< Check whether the processor of index i is BSP. */ 45 45 uint8_t (*cpu_apic_id)(index_t i); /**< Return APIC ID of the processor of index i. */ 46 int (*irq_to_pin)( int irq); /**< Return mapping between irq and APIC pin. */46 int (*irq_to_pin)(unsigned int irq); /**< Return mapping between irq and APIC pin. */ 47 47 }; 48 48 49 extern int smp_irq_to_pin( int irq);49 extern int smp_irq_to_pin(unsigned int irq); 50 50 51 51 #endif -
kernel/arch/ia32/src/smp/apic.c
r7d07bf3 r623b49f1 147 147 { 148 148 io_apic_id_t idreg; 149 int i;149 unsigned int i; 150 150 151 151 exc_register(VECTOR_APIC_SPUR, "apic_spurious", (iroutine) apic_spurious); … … 173 173 174 174 if ((pin = smp_irq_to_pin(i)) != -1) 175 io_apic_change_ioredtbl(pin, DEST_ALL, IVT_IRQBASE +i, LOPRI);175 io_apic_change_ioredtbl(pin, DEST_ALL, IVT_IRQBASE + i, LOPRI); 176 176 } 177 177 … … 535 535 { 536 536 io_redirection_reg_t reg; 537 int i, pin; 538 539 for (i=0;i<16;i++) { 540 if (irqmask & (1<<i)) { 537 unsigned int i; 538 int pin; 539 540 for (i = 0; i < 16; i++) { 541 if (irqmask & (1 << i)) { 541 542 /* 542 543 * Mask the signal input in IO APIC if there is a … … 545 546 pin = smp_irq_to_pin(i); 546 547 if (pin != -1) { 547 reg.lo = io_apic_read(IOREDTBL + pin *2);548 reg.lo = io_apic_read(IOREDTBL + pin * 2); 548 549 reg.masked = true; 549 io_apic_write(IOREDTBL + pin *2, reg.lo);550 io_apic_write(IOREDTBL + pin * 2, reg.lo); 550 551 } 551 552 … … 560 561 void io_apic_enable_irqs(uint16_t irqmask) 561 562 { 562 int i, pin; 563 unsigned int i; 564 int pin; 563 565 io_redirection_reg_t reg; 564 566 565 for (i =0;i<16;i++) {566 if (irqmask & (1 <<i)) {567 for (i = 0;i < 16; i++) { 568 if (irqmask & (1 << i)) { 567 569 /* 568 570 * Unmask the signal input in IO APIC if there is a … … 571 573 pin = smp_irq_to_pin(i); 572 574 if (pin != -1) { 573 reg.lo = io_apic_read(IOREDTBL + pin *2);575 reg.lo = io_apic_read(IOREDTBL + pin * 2); 574 576 reg.masked = false; 575 io_apic_write(IOREDTBL + pin *2, reg.lo);577 io_apic_write(IOREDTBL + pin * 2, reg.lo); 576 578 } 577 579 -
kernel/arch/ia32/src/smp/mps.c
r7d07bf3 r623b49f1 91 91 static bool is_bsp(index_t i); 92 92 static uint8_t get_cpu_apic_id(index_t i); 93 static int mps_irq_to_pin( int irq);93 static int mps_irq_to_pin(unsigned int irq); 94 94 95 95 struct smp_config_operations mps_config_operations = { … … 414 414 } 415 415 416 int mps_irq_to_pin( int irq)416 int mps_irq_to_pin(unsigned int irq) 417 417 { 418 418 unsigned int i; 419 419 420 for (i = 0; i < io_intr_entry_cnt; i++) {420 for (i = 0; i < io_intr_entry_cnt; i++) { 421 421 if (io_intr_entries[i].src_bus_irq == irq && io_intr_entries[i].intr_type == 0) 422 422 return io_intr_entries[i].dst_io_apic_pin; -
kernel/arch/ia32/src/smp/smp.c
r7d07bf3 r623b49f1 171 171 } 172 172 173 int smp_irq_to_pin( int irq)173 int smp_irq_to_pin(unsigned int irq) 174 174 { 175 175 ASSERT(ops != NULL);
Note:
See TracChangeset
for help on using the changeset viewer.