diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-19 07:52:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-24 02:32:16 -0400 |
commit | c1b1a5f1f1b2612b69b67381b223bce9f8ec4da5 (patch) | |
tree | e95abb7a3dbd0ca6c341c44f2b69dd174fd03bec /arch/sparc64/kernel/of_device.c | |
parent | 0c49a573ea93f777fd27f26b7853e7bf5a20e1a3 (diff) |
[SPARC64]: NUMA device infrastructure.
Record and propagate NUMA information for devices.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/of_device.c')
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 0fd9db95b896..9e58e8cba1c3 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/mod_devicetable.h> | 6 | #include <linux/mod_devicetable.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/irq.h> | ||
9 | #include <linux/of_device.h> | 10 | #include <linux/of_device.h> |
10 | #include <linux/of_platform.h> | 11 | #include <linux/of_platform.h> |
11 | 12 | ||
@@ -660,6 +661,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
660 | struct device_node *dp = op->node; | 661 | struct device_node *dp = op->node; |
661 | struct device_node *pp, *ip; | 662 | struct device_node *pp, *ip; |
662 | unsigned int orig_irq = irq; | 663 | unsigned int orig_irq = irq; |
664 | int nid; | ||
663 | 665 | ||
664 | if (irq == 0xffffffff) | 666 | if (irq == 0xffffffff) |
665 | return irq; | 667 | return irq; |
@@ -672,7 +674,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
672 | printk("%s: direct translate %x --> %x\n", | 674 | printk("%s: direct translate %x --> %x\n", |
673 | dp->full_name, orig_irq, irq); | 675 | dp->full_name, orig_irq, irq); |
674 | 676 | ||
675 | return irq; | 677 | goto out; |
676 | } | 678 | } |
677 | 679 | ||
678 | /* Something more complicated. Walk up to the root, applying | 680 | /* Something more complicated. Walk up to the root, applying |
@@ -744,6 +746,14 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
744 | printk("%s: Apply IRQ trans [%s] %x --> %x\n", | 746 | printk("%s: Apply IRQ trans [%s] %x --> %x\n", |
745 | op->node->full_name, ip->full_name, orig_irq, irq); | 747 | op->node->full_name, ip->full_name, orig_irq, irq); |
746 | 748 | ||
749 | out: | ||
750 | nid = of_node_to_nid(dp); | ||
751 | if (nid != -1) { | ||
752 | cpumask_t numa_mask = node_to_cpumask(nid); | ||
753 | |||
754 | irq_set_affinity(irq, numa_mask); | ||
755 | } | ||
756 | |||
747 | return irq; | 757 | return irq; |
748 | } | 758 | } |
749 | 759 | ||