* [PATCH] irq: make sure irq_desc for legacy irq get correct node setting
@ 2009-08-14 1:43 Yinghai Lu
2009-08-14 1:44 ` [PATCH] irq: add irq_node Yinghai Lu
0 siblings, 1 reply; 7+ messages in thread
From: Yinghai Lu @ 2009-08-14 1:43 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton; +Cc: linux-kernel
when there is no ram on node 0
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
kernel/irq/handle.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -161,7 +161,7 @@ int __init early_irq_init(void)
desc = irq_desc_legacy;
legacy_count = ARRAY_SIZE(irq_desc_legacy);
- node = first_online_node;
+ node = first_online_node;
/* allocate irq_desc_ptrs array based on nr_irqs */
irq_desc_ptrs = kcalloc(nr_irqs, sizeof(void *), GFP_NOWAIT);
@@ -172,6 +172,9 @@ int __init early_irq_init(void)
for (i = 0; i < legacy_count; i++) {
desc[i].irq = i;
+#ifdef CONFIG_SMP
+ desc[i].node = node;
+#endif
desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids;
lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
alloc_desc_masks(&desc[i], node, true);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] irq: add irq_node
2009-08-14 1:43 [PATCH] irq: make sure irq_desc for legacy irq get correct node setting Yinghai Lu
@ 2009-08-14 1:44 ` Yinghai Lu
2009-08-14 1:47 ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu
0 siblings, 1 reply; 7+ messages in thread
From: Yinghai Lu @ 2009-08-14 1:44 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
Jesse Barnes
Cc: linux-kernel, linux-pci
to return irq_desc node info
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
include/linux/irqnr.h | 6 ++++++
1 file changed, 6 insertions(+)
Index: linux-2.6/include/linux/irqnr.h
===================================================================
--- linux-2.6.orig/include/linux/irqnr.h
+++ linux-2.6/include/linux/irqnr.h
@@ -41,6 +41,12 @@ extern struct irq_desc *irq_to_desc(unsi
; \
else
+#ifdef CONFIG_SMP
+#define irq_node(irq) (irq_to_desc(irq)->node)
+#else
+#define irq_node(irq) 0
+#endif
+
#endif /* CONFIG_GENERIC_HARDIRQS */
#define for_each_irq_nr(irq) \
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3
2009-08-14 1:44 ` [PATCH] irq: add irq_node Yinghai Lu
@ 2009-08-14 1:47 ` Yinghai Lu
2009-08-25 18:48 ` Jesse Barnes
0 siblings, 1 reply; 7+ messages in thread
From: Yinghai Lu @ 2009-08-14 1:47 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
Jesse Barnes
Cc: linux-kernel, linux-pci, Suresh Siddha
make it use node from irq_desc.
v3: use irq_node
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/intr_remapping.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
Index: linux-2.6/drivers/pci/intr_remapping.c
===================================================================
--- linux-2.6.orig/drivers/pci/intr_remapping.c
+++ linux-2.6/drivers/pci/intr_remapping.c
@@ -55,15 +55,12 @@ static struct irq_2_iommu *irq_2_iommu(u
return desc->irq_2_iommu;
}
-static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node)
+static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
{
struct irq_desc *desc;
struct irq_2_iommu *irq_iommu;
- /*
- * alloc irq desc if not allocated already.
- */
- desc = irq_to_desc_alloc_node(irq, node);
+ desc = irq_to_desc(irq);
if (!desc) {
printk(KERN_INFO "can not get irq_desc for %d\n", irq);
return NULL;
@@ -72,16 +69,11 @@ static struct irq_2_iommu *irq_2_iommu_a
irq_iommu = desc->irq_2_iommu;
if (!irq_iommu)
- desc->irq_2_iommu = get_one_free_irq_2_iommu(node);
+ desc->irq_2_iommu = get_one_free_irq_2_iommu(irq_node(irq));
return desc->irq_2_iommu;
}
-static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
-{
- return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id));
-}
-
#else /* !CONFIG_SPARSE_IRQ */
static struct irq_2_iommu irq_2_iommuX[NR_IRQS];
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3
2009-08-14 1:47 ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu
@ 2009-08-25 18:48 ` Jesse Barnes
2009-08-26 7:31 ` Ingo Molnar
0 siblings, 1 reply; 7+ messages in thread
From: Jesse Barnes @ 2009-08-25 18:48 UTC (permalink / raw)
To: Yinghai Lu
Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
linux-kernel, linux-pci, Suresh Siddha
Ingo, I assume you took these two?
Thanks,
Jesse
On Thu, 13 Aug 2009 18:47:06 -0700
Yinghai Lu <yinghai@kernel.org> wrote:
>
> make it use node from irq_desc.
> v3: use irq_node
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> drivers/pci/intr_remapping.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> Index: linux-2.6/drivers/pci/intr_remapping.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/intr_remapping.c
> +++ linux-2.6/drivers/pci/intr_remapping.c
> @@ -55,15 +55,12 @@ static struct irq_2_iommu *irq_2_iommu(u
> return desc->irq_2_iommu;
> }
>
> -static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq,
> int node) +static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int
> irq) {
> struct irq_desc *desc;
> struct irq_2_iommu *irq_iommu;
>
> - /*
> - * alloc irq desc if not allocated already.
> - */
> - desc = irq_to_desc_alloc_node(irq, node);
> + desc = irq_to_desc(irq);
> if (!desc) {
> printk(KERN_INFO "can not get irq_desc for %d\n",
> irq); return NULL;
> @@ -72,16 +69,11 @@ static struct irq_2_iommu *irq_2_iommu_a
> irq_iommu = desc->irq_2_iommu;
>
> if (!irq_iommu)
> - desc->irq_2_iommu = get_one_free_irq_2_iommu(node);
> + desc->irq_2_iommu =
> get_one_free_irq_2_iommu(irq_node(irq));
> return desc->irq_2_iommu;
> }
>
> -static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
> -{
> - return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id));
> -}
> -
> #else /* !CONFIG_SPARSE_IRQ */
>
> static struct irq_2_iommu irq_2_iommuX[NR_IRQS];
>
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3
2009-08-25 18:48 ` Jesse Barnes
@ 2009-08-26 7:31 ` Ingo Molnar
2009-08-26 16:42 ` Jesse Barnes
0 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2009-08-26 7:31 UTC (permalink / raw)
To: Jesse Barnes
Cc: Yinghai Lu, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
linux-kernel, linux-pci, Suresh Siddha
* Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Ingo, I assume you took these two?
not yet - was waiting on noises from you and David. So the series
looks good to you from a PCI perspective and i can add your
acked-by? Would go into the IRQ tree.
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3
2009-08-26 7:31 ` Ingo Molnar
@ 2009-08-26 16:42 ` Jesse Barnes
0 siblings, 0 replies; 7+ messages in thread
From: Jesse Barnes @ 2009-08-26 16:42 UTC (permalink / raw)
To: Ingo Molnar
Cc: Yinghai Lu, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
linux-kernel, linux-pci, Suresh Siddha
On Wed, 26 Aug 2009 09:31:01 +0200
Ingo Molnar <mingo@elte.hu> wrote:
>
> * Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
>
> > Ingo, I assume you took these two?
>
> not yet - was waiting on noises from you and David. So the series
> looks good to you from a PCI perspective and i can add your
> acked-by? Would go into the IRQ tree.
Yeah, latest ones look good.
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] irq: add irq_node
2009-08-26 23:20 ` [PATCH] irq: make sure irq_desc for legacy irq get correct node setting Yinghai Lu
@ 2009-08-26 23:20 ` Yinghai Lu
0 siblings, 0 replies; 7+ messages in thread
From: Yinghai Lu @ 2009-08-26 23:20 UTC (permalink / raw)
To: Ingo Molnar, Jesse Barnes, H. Peter Anvin, Thomas Gleixner, linux-kernel
Cc: Andrew Morton
to return irq_desc node info
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
include/linux/irqnr.h | 6 ++++++
1 file changed, 6 insertions(+)
Index: linux-2.6/include/linux/irqnr.h
===================================================================
--- linux-2.6.orig/include/linux/irqnr.h
+++ linux-2.6/include/linux/irqnr.h
@@ -41,6 +41,12 @@ extern struct irq_desc *irq_to_desc(unsi
; \
else
+#ifdef CONFIG_SMP
+#define irq_node(irq) (irq_to_desc(irq)->node)
+#else
+#define irq_node(irq) 0
+#endif
+
#endif /* CONFIG_GENERIC_HARDIRQS */
#define for_each_irq_nr(irq) \
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-08-26 23:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-14 1:43 [PATCH] irq: make sure irq_desc for legacy irq get correct node setting Yinghai Lu
2009-08-14 1:44 ` [PATCH] irq: add irq_node Yinghai Lu
2009-08-14 1:47 ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu
2009-08-25 18:48 ` Jesse Barnes
2009-08-26 7:31 ` Ingo Molnar
2009-08-26 16:42 ` Jesse Barnes
[not found] <20090826214323.GC25536@elte.hu>
2009-08-26 23:20 ` [PATCH] irq: make sure irq_desc for legacy irq get correct node setting Yinghai Lu
2009-08-26 23:20 ` [PATCH] irq: add irq_node Yinghai Lu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.