diff options
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/fsl_rio.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/ipic.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 9 | ||||
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe_ic.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/uic.c | 3 |
6 files changed, 10 insertions, 16 deletions
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 39db9d1155d2..cbb3bed75d3c 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -965,7 +965,7 @@ static inline void fsl_rio_info(struct device *dev, u32 ccsr) | |||
965 | break; | 965 | break; |
966 | default: | 966 | default: |
967 | str = "Unknown"; | 967 | str = "Unknown"; |
968 | break;; | 968 | break; |
969 | } | 969 | } |
970 | dev_info(dev, "Hardware port width: %s\n", str); | 970 | dev_info(dev, "Hardware port width: %s\n", str); |
971 | 971 | ||
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/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index daefc93ddffe..6ff9d71b4c0d 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -1531,7 +1531,7 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port, | |||
1531 | */ | 1531 | */ |
1532 | 1532 | ||
1533 | /* Calculate window size */ | 1533 | /* Calculate window size */ |
1534 | sa = (0xffffffffffffffffull << ilog2(ep_size));; | 1534 | sa = (0xffffffffffffffffull << ilog2(ep_size)); |
1535 | 1535 | ||
1536 | /* Setup BAR0 */ | 1536 | /* Setup BAR0 */ |
1537 | out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa)); | 1537 | out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa)); |
@@ -1550,7 +1550,7 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port, | |||
1550 | out_le32(mbase + PCI_BASE_ADDRESS_1, RES_TO_U32_HIGH(ep_addr)); | 1550 | out_le32(mbase + PCI_BASE_ADDRESS_1, RES_TO_U32_HIGH(ep_addr)); |
1551 | } else { | 1551 | } else { |
1552 | /* Calculate window size */ | 1552 | /* Calculate window size */ |
1553 | sa = (0xffffffffffffffffull << ilog2(size));; | 1553 | sa = (0xffffffffffffffffull << ilog2(size)); |
1554 | if (res->flags & IORESOURCE_PREFETCH) | 1554 | if (res->flags & IORESOURCE_PREFETCH) |
1555 | sa |= 0x8; | 1555 | sa |= 0x8; |
1556 | 1556 | ||
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))) { |