Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249883
b: refs/heads/master
c: 4c79185
h: refs/heads/master
i:
  249881: c05d080
  249879: 602e341
v: v3
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed May 20, 2011
1 parent 7476bda commit 039463d
Show file tree
Hide file tree
Showing 2 changed files with 14 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: b64ce24daffb634b5b3133a2e411bd4de50654e8
refs/heads/master: 4c79185cdb1425fb74241d0be772ff1a9913091a
27 changes: 13 additions & 14 deletions trunk/arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ int mp_irq_entries;
/* GSI interrupts */
static int nr_irqs_gsi = NR_IRQS_LEGACY;

/*
* Saved I/O APIC state during suspend/resume.
*/
static struct IO_APIC_route_entry *ioapic_saved_data[MAX_IO_APICS];

#if defined (CONFIG_MCA) || defined (CONFIG_EISA)
int mp_bus_id_to_type[MAX_MP_BUSSES];
#endif
Expand Down Expand Up @@ -179,6 +184,14 @@ int __init arch_early_irq_init(void)
io_apic_irqs = ~0UL;
}

for (i = 0; i < nr_ioapics; i++) {
ioapic_saved_data[i] =
kzalloc(sizeof(struct IO_APIC_route_entry) *
nr_ioapic_registers[i], GFP_KERNEL);
if (!ioapic_saved_data[i])
pr_err("IOAPIC %d: suspend/resume impossible!\n", i);
}

cfg = irq_cfgx;
count = ARRAY_SIZE(irq_cfgx);
node = cpu_to_node(0);
Expand Down Expand Up @@ -2918,8 +2931,6 @@ static int __init io_apic_bug_finalize(void)

late_initcall(io_apic_bug_finalize);

static struct IO_APIC_route_entry *ioapic_saved_data[MAX_IO_APICS];

static void suspend_ioapic(int ioapic_id)
{
struct IO_APIC_route_entry *saved_data = ioapic_saved_data[ioapic_id];
Expand Down Expand Up @@ -2978,18 +2989,6 @@ static struct syscore_ops ioapic_syscore_ops = {

static int __init ioapic_init_ops(void)
{
int i;

for (i = 0; i < nr_ioapics; i++) {
unsigned int size;

size = nr_ioapic_registers[i]
* sizeof(struct IO_APIC_route_entry);
ioapic_saved_data[i] = kzalloc(size, GFP_KERNEL);
if (!ioapic_saved_data[i])
pr_err("IOAPIC %d: suspend/resume impossible!\n", i);
}

register_syscore_ops(&ioapic_syscore_ops);

return 0;
Expand Down

0 comments on commit 039463d

Please sign in to comment.