Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145646
b: refs/heads/master
c: 948cd52
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt authored and Ingo Molnar committed May 23, 2009
1 parent 1320ffa commit 304f1a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c6f18fc81565967da20f2d4a3922cdba33f8e2b
refs/heads/master: 948cd52906baf1f92aeea2f9b5c515db1b2e592a
18 changes: 14 additions & 4 deletions trunk/kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/irq.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/random.h>
#include <linux/interrupt.h>
Expand Down Expand Up @@ -81,11 +82,16 @@ static struct irq_desc irq_desc_init = {
.lock = __SPIN_LOCK_UNLOCKED(irq_desc_init.lock),
};

void init_kstat_irqs(struct irq_desc *desc, int node, int nr)
void __ref init_kstat_irqs(struct irq_desc *desc, int node, int nr)
{
void *ptr;

ptr = kzalloc_node(nr * sizeof(*desc->kstat_irqs), GFP_ATOMIC, node);
if (slab_is_available())
ptr = kzalloc_node(nr * sizeof(*desc->kstat_irqs),
GFP_ATOMIC, node);
else
ptr = alloc_bootmem_node(NODE_DATA(node),
nr * sizeof(*desc->kstat_irqs));

/*
* don't overwite if can not get new one
Expand Down Expand Up @@ -186,7 +192,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
return NULL;
}

struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node)
struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)
{
struct irq_desc *desc;
unsigned long flags;
Expand All @@ -208,7 +214,11 @@ struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node)
if (desc)
goto out_unlock;

desc = kzalloc_node(sizeof(*desc), GFP_ATOMIC, node);
if (slab_is_available())
desc = kzalloc_node(sizeof(*desc), GFP_ATOMIC, node);
else
desc = alloc_bootmem_node(NODE_DATA(node), sizeof(*desc));

printk(KERN_DEBUG " alloc irq_desc for %d on node %d\n", irq, node);
if (!desc) {
printk(KERN_ERR "can not alloc irq_desc\n");
Expand Down

0 comments on commit 304f1a6

Please sign in to comment.