aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/82xx/pq2ads-pci-pic.c2
-rw-r--r--arch/powerpc/sysdev/ipic.c4
-rw-r--r--arch/powerpc/sysdev/mpic.c9
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_ic.c4
-rw-r--r--arch/powerpc/sysdev/uic.c3
5 files changed, 8 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
index ddf0bdc0fc8b..7ee979f323d1 100644
--- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
+++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
@@ -147,7 +147,7 @@ int __init pq2ads_pci_init_irq(void)
147 goto out; 147 goto out;
148 } 148 }
149 149
150 priv = alloc_bootmem(sizeof(struct pq2ads_pci_pic)); 150 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
151 if (!priv) { 151 if (!priv) {
152 of_node_put(np); 152 of_node_put(np);
153 ret = -ENOMEM; 153 ret = -ENOMEM;
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index a86d3ce01ead..69e2630c9062 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -728,12 +728,10 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
728 if (ret) 728 if (ret)
729 return NULL; 729 return NULL;
730 730
731 ipic = alloc_bootmem(sizeof(struct ipic)); 731 ipic = kzalloc(sizeof(*ipic), GFP_KERNEL);
732 if (ipic == NULL) 732 if (ipic == NULL)
733 return NULL; 733 return NULL;
734 734
735 memset(ipic, 0, sizeof(struct ipic));
736
737 ipic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, 735 ipic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR,
738 NR_IPIC_INTS, 736 NR_IPIC_INTS,
739 &ipic_host_ops, 0); 737 &ipic_host_ops, 0);
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}
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index 63cdf9887f36..074905c3ee5a 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -333,12 +333,10 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags,
333 if (ret) 333 if (ret)
334 return; 334 return;
335 335
336 qe_ic = alloc_bootmem(sizeof(struct qe_ic)); 336 qe_ic = kzalloc(sizeof(*qe_ic), GFP_KERNEL);
337 if (qe_ic == NULL) 337 if (qe_ic == NULL)
338 return; 338 return;
339 339
340 memset(qe_ic, 0, sizeof(struct qe_ic));
341
342 qe_ic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, 340 qe_ic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR,
343 NR_QE_IC_INTS, &qe_ic_host_ops, 0); 341 NR_QE_IC_INTS, &qe_ic_host_ops, 0);
344 if (qe_ic->irqhost == NULL) 342 if (qe_ic->irqhost == NULL)
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
index d35405c59434..466ce9ace127 100644
--- a/arch/powerpc/sysdev/uic.c
+++ b/arch/powerpc/sysdev/uic.c
@@ -258,11 +258,10 @@ static struct uic * __init uic_init_one(struct device_node *node)
258 258
259 BUG_ON(! of_device_is_compatible(node, "ibm,uic")); 259 BUG_ON(! of_device_is_compatible(node, "ibm,uic"));
260 260
261 uic = alloc_bootmem(sizeof(*uic)); 261 uic = kzalloc(sizeof(*uic), GFP_KERNEL);
262 if (! uic) 262 if (! uic)
263 return NULL; /* FIXME: panic? */ 263 return NULL; /* FIXME: panic? */
264 264
265 memset(uic, 0, sizeof(*uic));
266 spin_lock_init(&uic->lock); 265 spin_lock_init(&uic->lock);
267 indexp = of_get_property(node, "cell-index", &len); 266 indexp = of_get_property(node, "cell-index", &len);
268 if (!indexp || (len != sizeof(u32))) { 267 if (!indexp || (len != sizeof(u32))) {