* [PATCH] irq: make sure irq_desc for legacy irq get correct node setting [not found] <20090826214323.GC25536@elte.hu> @ 2009-08-26 23:20 ` Yinghai Lu 2009-08-26 23:20 ` [PATCH] irq: add irq_node Yinghai Lu 2009-08-29 13:58 ` [tip:irq/core] irq: Make sure irq_desc for legacy irq get correct node setting tip-bot for Yinghai Lu 0 siblings, 2 replies; 6+ 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 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] 6+ 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 2009-08-26 23:21 ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu 2009-08-29 13:58 ` [tip:irq/core] irq: Add irq_node() primitive tip-bot for Yinghai Lu 2009-08-29 13:58 ` [tip:irq/core] irq: Make sure irq_desc for legacy irq get correct node setting tip-bot for Yinghai Lu 1 sibling, 2 replies; 6+ 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] 6+ messages in thread
* [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 2009-08-26 23:20 ` [PATCH] irq: add irq_node Yinghai Lu @ 2009-08-26 23:21 ` Yinghai Lu 2009-08-29 13:58 ` [tip:irq/core] pci/intr_remapping: Allocate irq_iommu on node tip-bot for Yinghai Lu 2009-08-29 13:58 ` [tip:irq/core] irq: Add irq_node() primitive tip-bot for Yinghai Lu 1 sibling, 1 reply; 6+ messages in thread From: Yinghai Lu @ 2009-08-26 23:21 UTC (permalink / raw) To: Ingo Molnar, Jesse Barnes, H. Peter Anvin, Thomas Gleixner, linux-kernel Cc: Andrew Morton make it use node from irq_desc. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.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] 6+ messages in thread
* [tip:irq/core] pci/intr_remapping: Allocate irq_iommu on node 2009-08-26 23:21 ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu @ 2009-08-29 13:58 ` tip-bot for Yinghai Lu 0 siblings, 0 replies; 6+ messages in thread From: tip-bot for Yinghai Lu @ 2009-08-29 13:58 UTC (permalink / raw) To: linux-tip-commits Cc: linux-kernel, hpa, mingo, yinghai, akpm, jbarnes, tglx, mingo Commit-ID: 70590ea75b7f9ef4846b0b0f4400e8338dbcc7eb Gitweb: http://git.kernel.org/tip/70590ea75b7f9ef4846b0b0f4400e8338dbcc7eb Author: Yinghai Lu <yinghai@kernel.org> AuthorDate: Wed, 26 Aug 2009 16:21:54 -0700 Committer: Ingo Molnar <mingo@elte.hu> CommitDate: Sat, 29 Aug 2009 15:53:01 +0200 pci/intr_remapping: Allocate irq_iommu on node make it use the node from irq_desc. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <4A95C392.5050903@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> --- drivers/pci/intr_remapping.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 4f5b871..4480364 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c @@ -55,15 +55,12 @@ static struct irq_2_iommu *irq_2_iommu(unsigned int irq) 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_alloc_node(unsigned int irq, int node) 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] 6+ messages in thread
* [tip:irq/core] irq: Add irq_node() primitive 2009-08-26 23:20 ` [PATCH] irq: add irq_node Yinghai Lu 2009-08-26 23:21 ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu @ 2009-08-29 13:58 ` tip-bot for Yinghai Lu 1 sibling, 0 replies; 6+ messages in thread From: tip-bot for Yinghai Lu @ 2009-08-29 13:58 UTC (permalink / raw) To: linux-tip-commits Cc: linux-kernel, hpa, mingo, yinghai, jbarnes, akpm, tglx, mingo Commit-ID: 5bfb5b51382f4bd01d9ced11503264d2cc74fe41 Gitweb: http://git.kernel.org/tip/5bfb5b51382f4bd01d9ced11503264d2cc74fe41 Author: Yinghai Lu <yinghai@kernel.org> AuthorDate: Wed, 26 Aug 2009 16:20:48 -0700 Committer: Ingo Molnar <mingo@elte.hu> CommitDate: Sat, 29 Aug 2009 15:53:00 +0200 irq: Add irq_node() primitive ... to return irq_desc node info without #ifdefs at the callsites. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> LKML-Reference: <4A95C350.8060308@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> --- include/linux/irqnr.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index ec87b21..7bf89bc 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h @@ -41,6 +41,12 @@ extern struct irq_desc *irq_to_desc(unsigned int irq); ; \ 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] 6+ messages in thread
* [tip:irq/core] irq: Make sure irq_desc for legacy irq get correct node setting 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 @ 2009-08-29 13:58 ` tip-bot for Yinghai Lu 1 sibling, 0 replies; 6+ messages in thread From: tip-bot for Yinghai Lu @ 2009-08-29 13:58 UTC (permalink / raw) To: linux-tip-commits Cc: linux-kernel, hpa, mingo, yinghai, jbarnes, akpm, tglx, mingo Commit-ID: 372e24b0cb764ec55b4cf3408a95ae40a29e5b96 Gitweb: http://git.kernel.org/tip/372e24b0cb764ec55b4cf3408a95ae40a29e5b96 Author: Yinghai Lu <yinghai@kernel.org> AuthorDate: Wed, 26 Aug 2009 16:20:13 -0700 Committer: Ingo Molnar <mingo@elte.hu> CommitDate: Sat, 29 Aug 2009 15:53:00 +0200 irq: Make sure irq_desc for legacy irq get correct node setting when there is no ram on node 0. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> LKML-Reference: <4A95C32D.5040605@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> --- kernel/irq/handle.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 065205b..a81cf80 100644 --- a/kernel/irq/handle.c +++ b/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] 6+ messages in thread
end of thread, other threads:[~2009-08-29 13:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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
2009-08-26 23:21 ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu
2009-08-29 13:58 ` [tip:irq/core] pci/intr_remapping: Allocate irq_iommu on node tip-bot for Yinghai Lu
2009-08-29 13:58 ` [tip:irq/core] irq: Add irq_node() primitive tip-bot for Yinghai Lu
2009-08-29 13:58 ` [tip:irq/core] irq: Make sure irq_desc for legacy irq get correct node setting tip-bot for Yinghai Lu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome