Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2100 → Rev 2101

/trunk/kernel/arch/ia32/src/smp/mps.c
90,7 → 90,7
static bool is_cpu_enabled(index_t i);
static bool is_bsp(index_t i);
static uint8_t get_cpu_apic_id(index_t i);
static int mps_irq_to_pin(int irq);
static int mps_irq_to_pin(unsigned int irq);
 
struct smp_config_operations mps_config_operations = {
.cpu_count = get_cpu_count,
413,11 → 413,11
}
}
 
int mps_irq_to_pin(int irq)
int mps_irq_to_pin(unsigned int irq)
{
unsigned int i;
for(i = 0; i < io_intr_entry_cnt; i++) {
for (i = 0; i < io_intr_entry_cnt; i++) {
if (io_intr_entries[i].src_bus_irq == irq && io_intr_entries[i].intr_type == 0)
return io_intr_entries[i].dst_io_apic_pin;
}
/trunk/kernel/arch/ia32/src/smp/smp.c
170,7 → 170,7
}
}
 
int smp_irq_to_pin(int irq)
int smp_irq_to_pin(unsigned int irq)
{
ASSERT(ops != NULL);
return ops->irq_to_pin(irq);
/trunk/kernel/arch/ia32/src/smp/apic.c
146,7 → 146,7
void apic_init(void)
{
io_apic_id_t idreg;
int i;
unsigned int i;
 
exc_register(VECTOR_APIC_SPUR, "apic_spurious", (iroutine) apic_spurious);
 
172,7 → 172,7
int pin;
if ((pin = smp_irq_to_pin(i)) != -1)
io_apic_change_ioredtbl(pin, DEST_ALL, IVT_IRQBASE+i, LOPRI);
io_apic_change_ioredtbl(pin, DEST_ALL, IVT_IRQBASE + i, LOPRI);
}
/*
534,10 → 534,11
void io_apic_disable_irqs(uint16_t irqmask)
{
io_redirection_reg_t reg;
int i, pin;
unsigned int i;
int pin;
for (i=0;i<16;i++) {
if (irqmask & (1<<i)) {
for (i = 0; i < 16; i++) {
if (irqmask & (1 << i)) {
/*
* Mask the signal input in IO APIC if there is a
* mapping for the respective IRQ number.
544,9 → 545,9
*/
pin = smp_irq_to_pin(i);
if (pin != -1) {
reg.lo = io_apic_read(IOREDTBL + pin*2);
reg.lo = io_apic_read(IOREDTBL + pin * 2);
reg.masked = true;
io_apic_write(IOREDTBL + pin*2, reg.lo);
io_apic_write(IOREDTBL + pin * 2, reg.lo);
}
}
559,11 → 560,12
*/
void io_apic_enable_irqs(uint16_t irqmask)
{
int i, pin;
unsigned int i;
int pin;
io_redirection_reg_t reg;
for (i=0;i<16;i++) {
if (irqmask & (1<<i)) {
for (i = 0;i < 16; i++) {
if (irqmask & (1 << i)) {
/*
* Unmask the signal input in IO APIC if there is a
* mapping for the respective IRQ number.
570,9 → 572,9
*/
pin = smp_irq_to_pin(i);
if (pin != -1) {
reg.lo = io_apic_read(IOREDTBL + pin*2);
reg.lo = io_apic_read(IOREDTBL + pin * 2);
reg.masked = false;
io_apic_write(IOREDTBL + pin*2, reg.lo);
io_apic_write(IOREDTBL + pin * 2, reg.lo);
}
}