Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158639
b: refs/heads/master
c: ffc4383
h: refs/heads/master
i:
  158637: a5fd23d
  158635: d78f138
  158631: 2378ea8
  158623: 12e47c2
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Aug 26, 2009
1 parent dc7e98a commit b189ec6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 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: 8f3e1df48baf728bbb0f242c9dff9c9d7108218a
refs/heads/master: ffc438366c2660a6a811b94ba33229bf217f8254
26 changes: 11 additions & 15 deletions trunk/arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4053,7 +4053,7 @@ void __init setup_ioapic_dest(void)

static struct resource *ioapic_resources;

static struct resource * __init ioapic_setup_resources(void)
static struct resource * __init ioapic_setup_resources(int nr_ioapics)
{
unsigned long n;
struct resource *res;
Expand All @@ -4069,15 +4069,13 @@ static struct resource * __init ioapic_setup_resources(void)
mem = alloc_bootmem(n);
res = (void *)mem;

if (mem != NULL) {
mem += sizeof(struct resource) * nr_ioapics;
mem += sizeof(struct resource) * nr_ioapics;

for (i = 0; i < nr_ioapics; i++) {
res[i].name = mem;
res[i].flags = IORESOURCE_MEM | IORESOURCE_BUSY;
sprintf(mem, "IOAPIC %u", i);
mem += IOAPIC_RESOURCE_NAME_SIZE;
}
for (i = 0; i < nr_ioapics; i++) {
res[i].name = mem;
res[i].flags = IORESOURCE_MEM | IORESOURCE_BUSY;
sprintf(mem, "IOAPIC %u", i);
mem += IOAPIC_RESOURCE_NAME_SIZE;
}

ioapic_resources = res;
Expand All @@ -4091,7 +4089,7 @@ void __init ioapic_init_mappings(void)
struct resource *ioapic_res;
int i;

ioapic_res = ioapic_setup_resources();
ioapic_res = ioapic_setup_resources(nr_ioapics);
for (i = 0; i < nr_ioapics; i++) {
if (smp_found_config) {
ioapic_phys = mp_ioapics[i].apicaddr;
Expand Down Expand Up @@ -4120,11 +4118,9 @@ void __init ioapic_init_mappings(void)
__fix_to_virt(idx), ioapic_phys);
idx++;

if (ioapic_res != NULL) {
ioapic_res->start = ioapic_phys;
ioapic_res->end = ioapic_phys + (4 * 1024) - 1;
ioapic_res++;
}
ioapic_res->start = ioapic_phys;
ioapic_res->end = ioapic_phys + (4 * 1024) - 1;
ioapic_res++;
}
}

Expand Down

0 comments on commit b189ec6

Please sign in to comment.