diff options
Diffstat (limited to 'arch/powerpc/sysdev/mpic_msi.c')
-rw-r--r-- | arch/powerpc/sysdev/mpic_msi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/sysdev/mpic_msi.c b/arch/powerpc/sysdev/mpic_msi.c index b076793033c2..d272a52ecd24 100644 --- a/arch/powerpc/sysdev/mpic_msi.c +++ b/arch/powerpc/sysdev/mpic_msi.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/bootmem.h> | ||
13 | #include <linux/bitmap.h> | 12 | #include <linux/bitmap.h> |
14 | #include <linux/msi.h> | 13 | #include <linux/msi.h> |
15 | #include <asm/mpic.h> | 14 | #include <asm/mpic.h> |
@@ -117,16 +116,17 @@ static int mpic_msi_reserve_dt_hwirqs(struct mpic *mpic) | |||
117 | int i, len; | 116 | int i, len; |
118 | const u32 *p; | 117 | const u32 *p; |
119 | 118 | ||
120 | p = of_get_property(mpic->of_node, "msi-available-ranges", &len); | 119 | p = of_get_property(mpic->irqhost->of_node, |
120 | "msi-available-ranges", &len); | ||
121 | if (!p) { | 121 | if (!p) { |
122 | pr_debug("mpic: no msi-available-ranges property found on %s\n", | 122 | pr_debug("mpic: no msi-available-ranges property found on %s\n", |
123 | mpic->of_node->full_name); | 123 | mpic->irqhost->of_node->full_name); |
124 | return -ENODEV; | 124 | return -ENODEV; |
125 | } | 125 | } |
126 | 126 | ||
127 | if (len % 8 != 0) { | 127 | if (len % 8 != 0) { |
128 | printk(KERN_WARNING "mpic: Malformed msi-available-ranges " | 128 | printk(KERN_WARNING "mpic: Malformed msi-available-ranges " |
129 | "property on %s\n", mpic->of_node->full_name); | 129 | "property on %s\n", mpic->irqhost->of_node->full_name); |
130 | return -EINVAL; | 130 | return -EINVAL; |
131 | } | 131 | } |
132 | 132 | ||
@@ -151,10 +151,7 @@ int mpic_msi_init_allocator(struct mpic *mpic) | |||
151 | size = BITS_TO_LONGS(mpic->irq_count) * sizeof(long); | 151 | size = BITS_TO_LONGS(mpic->irq_count) * sizeof(long); |
152 | pr_debug("mpic: allocator bitmap size is 0x%x bytes\n", size); | 152 | pr_debug("mpic: allocator bitmap size is 0x%x bytes\n", size); |
153 | 153 | ||
154 | if (mem_init_done) | 154 | mpic->hwirq_bitmap = alloc_maybe_bootmem(size, GFP_KERNEL); |
155 | mpic->hwirq_bitmap = kmalloc(size, GFP_KERNEL); | ||
156 | else | ||
157 | mpic->hwirq_bitmap = alloc_bootmem(size); | ||
158 | 155 | ||
159 | if (!mpic->hwirq_bitmap) { | 156 | if (!mpic->hwirq_bitmap) { |
160 | pr_debug("mpic: ENOMEM allocating allocator bitmap!\n"); | 157 | pr_debug("mpic: ENOMEM allocating allocator bitmap!\n"); |