Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200585
b: refs/heads/master
c: a4384df
h: refs/heads/master
i:
  200583: 7b66990
v: v3
  • Loading branch information
Eric W. Biederman authored and H. Peter Anvin committed Jun 9, 2010
1 parent c757f44 commit ff32f94
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc4ac7a5f5996712d9123ae4850948c640edb315
refs/heads/master: a4384df3e24579d6292a1b3b41d500349948f30b
4 changes: 2 additions & 2 deletions trunk/arch/x86/include/asm/io_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct mp_ioapic_gsi{
u32 gsi_end;
};
extern struct mp_ioapic_gsi mp_gsi_routing[];
extern u32 gsi_end;
extern u32 gsi_top;
int mp_find_ioapic(u32 gsi);
int mp_find_ioapic_pin(int ioapic, u32 gsi);
void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
Expand All @@ -197,7 +197,7 @@ static const int timer_through_8259 = 0;
static inline void ioapic_init_mappings(void) { }
static inline void ioapic_insert_resources(void) { }
static inline void probe_nr_irqs_gsi(void) { }
#define gsi_end (NR_IRQS_LEGACY - 1)
#define gsi_top (NR_IRQS_LEGACY)
static inline int mp_find_ioapic(u32 gsi) { return 0; }

struct io_apic_irq_attr;
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static unsigned int gsi_to_irq(unsigned int gsi)
if (gsi >= NR_IRQS_LEGACY)
irq = gsi;
else
irq = gsi_end + 1 + gsi;
irq = gsi_top + gsi;

return irq;
}
Expand All @@ -129,10 +129,10 @@ static u32 irq_to_gsi(int irq)

if (irq < NR_IRQS_LEGACY)
gsi = isa_irq_to_gsi[irq];
else if (irq <= gsi_end)
else if (irq < gsi_top)
gsi = irq;
else if (irq <= (gsi_end + NR_IRQS_LEGACY))
gsi = irq - gsi_end;
else if (irq < (gsi_top + NR_IRQS_LEGACY))
gsi = irq - gsi_top;
else
gsi = 0xffffffff;

Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ int nr_ioapics;
/* IO APIC gsi routing info */
struct mp_ioapic_gsi mp_gsi_routing[MAX_IO_APICS];

/* The last gsi number used */
u32 gsi_end;
/* The one past the highest gsi number used */
u32 gsi_top;

/* MP IRQ source entries */
struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES];
Expand Down Expand Up @@ -1035,7 +1035,7 @@ static int pin_2_irq(int idx, int apic, int pin)
if (gsi >= NR_IRQS_LEGACY)
irq = gsi;
else
irq = gsi_end + 1 + gsi;
irq = gsi_top + gsi;
}

#ifdef CONFIG_X86_32
Expand Down Expand Up @@ -3853,7 +3853,7 @@ void __init probe_nr_irqs_gsi(void)
{
int nr;

nr = gsi_end + 1 + NR_IRQS_LEGACY;
nr = gsi_top + NR_IRQS_LEGACY;
if (nr > nr_irqs_gsi)
nr_irqs_gsi = nr;

Expand Down Expand Up @@ -4294,8 +4294,8 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
*/
nr_ioapic_registers[idx] = entries;

if (mp_gsi_routing[idx].gsi_end > gsi_end)
gsi_end = mp_gsi_routing[idx].gsi_end;
if (mp_gsi_routing[idx].gsi_end >= gsi_top)
gsi_top = mp_gsi_routing[idx].gsi_end + 1;

printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
"GSI %d-%d\n", idx, mp_ioapics[idx].apicid,
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static void __init MP_ioapic_info(struct mpc_ioapic *m)
printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n",
m->apicid, m->apicver, m->apicaddr);

mp_register_ioapic(m->apicid, m->apicaddr, gsi_end + 1);
mp_register_ioapic(m->apicid, m->apicaddr, gsi_top);
}

static void print_MP_intsrc_info(struct mpc_intsrc *m)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/sfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table)
pentry = (struct sfi_apic_table_entry *)sb->pentry;

for (i = 0; i < num; i++) {
mp_register_ioapic(i, pentry->phys_addr, gsi_end + 1);
mp_register_ioapic(i, pentry->phys_addr, gsi_top);
pentry++;
}

Expand Down

0 comments on commit ff32f94

Please sign in to comment.