diff options
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index d46de1f0f3ee..3981ae4cb58e 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -508,9 +508,8 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic) | |||
508 | printk(KERN_INFO "mpic: Setting up HT PICs workarounds for U3/U4\n"); | 508 | printk(KERN_INFO "mpic: Setting up HT PICs workarounds for U3/U4\n"); |
509 | 509 | ||
510 | /* Allocate fixups array */ | 510 | /* Allocate fixups array */ |
511 | mpic->fixups = alloc_bootmem(128 * sizeof(struct mpic_irq_fixup)); | 511 | mpic->fixups = kzalloc(128 * sizeof(*mpic->fixups), GFP_KERNEL); |
512 | BUG_ON(mpic->fixups == NULL); | 512 | BUG_ON(mpic->fixups == NULL); |
513 | memset(mpic->fixups, 0, 128 * sizeof(struct mpic_irq_fixup)); | ||
514 | 513 | ||
515 | /* Init spinlock */ | 514 | /* Init spinlock */ |
516 | spin_lock_init(&mpic->fixup_lock); | 515 | spin_lock_init(&mpic->fixup_lock); |
@@ -1109,9 +1108,8 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1109 | psize /= 4; | 1108 | psize /= 4; |
1110 | bits = intvec_top + 1; | 1109 | bits = intvec_top + 1; |
1111 | mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long); | 1110 | mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long); |
1112 | mpic->protected = alloc_bootmem(mapsize); | 1111 | mpic->protected = kzalloc(mapsize, GFP_KERNEL); |
1113 | BUG_ON(mpic->protected == NULL); | 1112 | BUG_ON(mpic->protected == NULL); |
1114 | memset(mpic->protected, 0, mapsize); | ||
1115 | for (i = 0; i < psize; i++) { | 1113 | for (i = 0; i < psize; i++) { |
1116 | if (psrc[i] > intvec_top) | 1114 | if (psrc[i] > intvec_top) |
1117 | continue; | 1115 | continue; |
@@ -1353,7 +1351,8 @@ void __init mpic_init(struct mpic *mpic) | |||
1353 | 1351 | ||
1354 | #ifdef CONFIG_PM | 1352 | #ifdef CONFIG_PM |
1355 | /* allocate memory to save mpic state */ | 1353 | /* allocate memory to save mpic state */ |
1356 | mpic->save_data = alloc_bootmem(mpic->num_sources * sizeof(struct mpic_irq_save)); | 1354 | mpic->save_data = kmalloc(mpic->num_sources * sizeof(*mpic->save_data), |
1355 | GFP_KERNEL); | ||
1357 | BUG_ON(mpic->save_data == NULL); | 1356 | BUG_ON(mpic->save_data == NULL); |
1358 | #endif | 1357 | #endif |
1359 | } | 1358 | } |