Commit 11b6aa95 authored by Paul Mundt's avatar Paul Mundt

sh: intc: alloc_bootmem() -> kzalloc() conversion.

Now that the slab allocators are available much earlier, this triggers a
the slab_is_available() warning when registering the interrupt
controller. Convert to kzalloc() with GFP_NOWAIT, as per the generic
changes.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 19470e18
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/bootmem.h>
#include <linux/sh_intc.h> #include <linux/sh_intc.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -675,7 +674,7 @@ void __init register_intc_controller(struct intc_desc *desc) ...@@ -675,7 +674,7 @@ void __init register_intc_controller(struct intc_desc *desc)
unsigned int i, k, smp; unsigned int i, k, smp;
struct intc_desc_int *d; struct intc_desc_int *d;
d = alloc_bootmem(sizeof(*d)); d = kzalloc(sizeof(*d), GFP_NOWAIT);
INIT_LIST_HEAD(&d->list); INIT_LIST_HEAD(&d->list);
list_add(&d->list, &intc_list); list_add(&d->list, &intc_list);
...@@ -687,9 +686,9 @@ void __init register_intc_controller(struct intc_desc *desc) ...@@ -687,9 +686,9 @@ void __init register_intc_controller(struct intc_desc *desc)
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0; d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0;
#endif #endif
d->reg = alloc_bootmem(d->nr_reg * sizeof(*d->reg)); d->reg = kzalloc(d->nr_reg * sizeof(*d->reg), GFP_NOWAIT);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
d->smp = alloc_bootmem(d->nr_reg * sizeof(*d->smp)); d->smp = kzalloc(d->nr_reg * sizeof(*d->smp), GFP_NOWAIT);
#endif #endif
k = 0; k = 0;
...@@ -702,7 +701,7 @@ void __init register_intc_controller(struct intc_desc *desc) ...@@ -702,7 +701,7 @@ void __init register_intc_controller(struct intc_desc *desc)
} }
if (desc->prio_regs) { if (desc->prio_regs) {
d->prio = alloc_bootmem(desc->nr_vectors * sizeof(*d->prio)); d->prio = kzalloc(desc->nr_vectors * sizeof(*d->prio), GFP_NOWAIT);
for (i = 0; i < desc->nr_prio_regs; i++) { for (i = 0; i < desc->nr_prio_regs; i++) {
smp = IS_SMP(desc->prio_regs[i]); smp = IS_SMP(desc->prio_regs[i]);
...@@ -712,7 +711,7 @@ void __init register_intc_controller(struct intc_desc *desc) ...@@ -712,7 +711,7 @@ void __init register_intc_controller(struct intc_desc *desc)
} }
if (desc->sense_regs) { if (desc->sense_regs) {
d->sense = alloc_bootmem(desc->nr_vectors * sizeof(*d->sense)); d->sense = kzalloc(desc->nr_vectors * sizeof(*d->sense), GFP_NOWAIT);
for (i = 0; i < desc->nr_sense_regs; i++) { for (i = 0; i < desc->nr_sense_regs; i++) {
k += save_reg(d, k, desc->sense_regs[i].reg, 0); k += save_reg(d, k, desc->sense_regs[i].reg, 0);
...@@ -757,7 +756,7 @@ void __init register_intc_controller(struct intc_desc *desc) ...@@ -757,7 +756,7 @@ void __init register_intc_controller(struct intc_desc *desc)
vect2->enum_id = 0; vect2->enum_id = 0;
if (!intc_evt2irq_table) if (!intc_evt2irq_table)
intc_evt2irq_table = alloc_bootmem(NR_IRQS); intc_evt2irq_table = kzalloc(NR_IRQS, GFP_NOWAIT);
if (!intc_evt2irq_table) { if (!intc_evt2irq_table) {
pr_warning("intc: cannot allocate evt2irq!\n"); pr_warning("intc: cannot allocate evt2irq!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment