diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 17:32:24 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 17:32:24 -0400 |
commit | a348a7e6fdbcd2d5192a09719a479bb238fde727 (patch) | |
tree | 5ff94185f4e5a810777469d7fe7832a8ec2d3430 /drivers/sh | |
parent | 808347f6a31792079e345ec865e9cfcb6e8ae6b2 (diff) | |
parent | 28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff) |
Merge commit 'v2.6.31-rc1' into dmaengine
Diffstat (limited to 'drivers/sh')
-rw-r--r-- | drivers/sh/intc.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c index 12d13d99b6f0..3dd231a643b5 100644 --- a/drivers/sh/intc.c +++ b/drivers/sh/intc.c | |||
@@ -20,10 +20,10 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/bootmem.h> | ||
24 | #include <linux/sh_intc.h> | 23 | #include <linux/sh_intc.h> |
25 | #include <linux/sysdev.h> | 24 | #include <linux/sysdev.h> |
26 | #include <linux/list.h> | 25 | #include <linux/list.h> |
26 | #include <linux/topology.h> | ||
27 | 27 | ||
28 | #define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \ | 28 | #define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \ |
29 | ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \ | 29 | ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \ |
@@ -674,7 +674,7 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
674 | unsigned int i, k, smp; | 674 | unsigned int i, k, smp; |
675 | struct intc_desc_int *d; | 675 | struct intc_desc_int *d; |
676 | 676 | ||
677 | d = alloc_bootmem(sizeof(*d)); | 677 | d = kzalloc(sizeof(*d), GFP_NOWAIT); |
678 | 678 | ||
679 | INIT_LIST_HEAD(&d->list); | 679 | INIT_LIST_HEAD(&d->list); |
680 | list_add(&d->list, &intc_list); | 680 | list_add(&d->list, &intc_list); |
@@ -686,9 +686,9 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
686 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) | 686 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) |
687 | d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0; | 687 | d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0; |
688 | #endif | 688 | #endif |
689 | d->reg = alloc_bootmem(d->nr_reg * sizeof(*d->reg)); | 689 | d->reg = kzalloc(d->nr_reg * sizeof(*d->reg), GFP_NOWAIT); |
690 | #ifdef CONFIG_SMP | 690 | #ifdef CONFIG_SMP |
691 | d->smp = alloc_bootmem(d->nr_reg * sizeof(*d->smp)); | 691 | d->smp = kzalloc(d->nr_reg * sizeof(*d->smp), GFP_NOWAIT); |
692 | #endif | 692 | #endif |
693 | k = 0; | 693 | k = 0; |
694 | 694 | ||
@@ -701,7 +701,7 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
701 | } | 701 | } |
702 | 702 | ||
703 | if (desc->prio_regs) { | 703 | if (desc->prio_regs) { |
704 | d->prio = alloc_bootmem(desc->nr_vectors * sizeof(*d->prio)); | 704 | d->prio = kzalloc(desc->nr_vectors * sizeof(*d->prio), GFP_NOWAIT); |
705 | 705 | ||
706 | for (i = 0; i < desc->nr_prio_regs; i++) { | 706 | for (i = 0; i < desc->nr_prio_regs; i++) { |
707 | smp = IS_SMP(desc->prio_regs[i]); | 707 | smp = IS_SMP(desc->prio_regs[i]); |
@@ -711,7 +711,7 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
711 | } | 711 | } |
712 | 712 | ||
713 | if (desc->sense_regs) { | 713 | if (desc->sense_regs) { |
714 | d->sense = alloc_bootmem(desc->nr_vectors * sizeof(*d->sense)); | 714 | d->sense = kzalloc(desc->nr_vectors * sizeof(*d->sense), GFP_NOWAIT); |
715 | 715 | ||
716 | for (i = 0; i < desc->nr_sense_regs; i++) { | 716 | for (i = 0; i < desc->nr_sense_regs; i++) { |
717 | k += save_reg(d, k, desc->sense_regs[i].reg, 0); | 717 | k += save_reg(d, k, desc->sense_regs[i].reg, 0); |
@@ -756,7 +756,7 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
756 | vect2->enum_id = 0; | 756 | vect2->enum_id = 0; |
757 | 757 | ||
758 | if (!intc_evt2irq_table) | 758 | if (!intc_evt2irq_table) |
759 | intc_evt2irq_table = alloc_bootmem(NR_IRQS); | 759 | intc_evt2irq_table = kzalloc(NR_IRQS, GFP_NOWAIT); |
760 | 760 | ||
761 | if (!intc_evt2irq_table) { | 761 | if (!intc_evt2irq_table) { |
762 | pr_warning("intc: cannot allocate evt2irq!\n"); | 762 | pr_warning("intc: cannot allocate evt2irq!\n"); |
@@ -770,11 +770,19 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
770 | /* register the vectors one by one */ | 770 | /* register the vectors one by one */ |
771 | for (i = 0; i < desc->nr_vectors; i++) { | 771 | for (i = 0; i < desc->nr_vectors; i++) { |
772 | struct intc_vect *vect = desc->vectors + i; | 772 | struct intc_vect *vect = desc->vectors + i; |
773 | unsigned int irq = evt2irq(vect->vect); | ||
774 | struct irq_desc *irq_desc; | ||
773 | 775 | ||
774 | if (!vect->enum_id) | 776 | if (!vect->enum_id) |
775 | continue; | 777 | continue; |
776 | 778 | ||
777 | intc_register_irq(desc, d, vect->enum_id, evt2irq(vect->vect)); | 779 | irq_desc = irq_to_desc_alloc_node(irq, numa_node_id()); |
780 | if (unlikely(!irq_desc)) { | ||
781 | printk(KERN_INFO "can not get irq_desc for %d\n", irq); | ||
782 | continue; | ||
783 | } | ||
784 | |||
785 | intc_register_irq(desc, d, vect->enum_id, irq); | ||
778 | } | 786 | } |
779 | } | 787 | } |
780 | 788 | ||