diff options
author | Milton Miller <miltonm@bga.com> | 2011-05-24 16:34:17 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-25 23:38:59 -0400 |
commit | 3d1b5e206a4f0ce46f2aa138590738c5d8e118ac (patch) | |
tree | 23e10e1c4d3a89bdb6c870998e3b4843358e75b8 /arch/powerpc | |
parent | 8142f032a90680ed2fb080ca694ffe9509276361 (diff) |
powerpc/irq: Always free duplicate IRQ_LEGACY hosts
Since kmem caches are allocated before init_IRQ as noted in 3af259d155
(powerpc: Radix trees are available before init_IRQ), we now call
kmalloc in all cases and can can always call kfree if we are asked
to allocate a duplicate or conflicting IRQ_HOST_MAP_LEGACY host.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index f2fd6539d8bf..0df255414836 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -557,15 +557,8 @@ struct irq_host *irq_alloc_host(struct device_node *of_node, | |||
557 | if (revmap_type == IRQ_HOST_MAP_LEGACY) { | 557 | if (revmap_type == IRQ_HOST_MAP_LEGACY) { |
558 | if (irq_map[0].host != NULL) { | 558 | if (irq_map[0].host != NULL) { |
559 | raw_spin_unlock_irqrestore(&irq_big_lock, flags); | 559 | raw_spin_unlock_irqrestore(&irq_big_lock, flags); |
560 | /* If we are early boot, we can't free the structure, | 560 | of_node_put(host->of_node); |
561 | * too bad... | 561 | kfree(host); |
562 | * this will be fixed once slab is made available early | ||
563 | * instead of the current cruft | ||
564 | */ | ||
565 | if (mem_init_done) { | ||
566 | of_node_put(host->of_node); | ||
567 | kfree(host); | ||
568 | } | ||
569 | return NULL; | 562 | return NULL; |
570 | } | 563 | } |
571 | irq_map[0].host = host; | 564 | irq_map[0].host = host; |