All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/9] x86/ioapic: improve handling of i8259a irq init
@ 2010-02-13  1:40 Pan, Jacob jun
  2010-02-20  1:28 ` [tip:x86/mrst] x86, ioapic: Improve handling of i8259A " tip-bot for Alek Du
  0 siblings, 1 reply; 18+ messages in thread
From: Pan, Jacob jun @ 2010-02-13  1:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Thomas Gleixner, Arjan van de Ven, Barnes, Jesse,
	Du, Alek, Tang, Feng, H. Peter Anvin

>From ab3ae105e88342a26e4a1d46d6dcdff2fb7970fe Mon Sep 17 00:00:00 2001
From: Alek Du <alek.du@intel.com>
Date: Mon, 7 Sep 2009 16:25:45 +0800
Subject: [PATCH 5/9] x86/ioapic: improve handling of i8259a irq init

Since we already track the number of legacy vectors by nr_legacy_irqs, we
can avoid use static vector allocations -- we can use dynamic one.

Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
---
 arch/x86/kernel/apic/io_apic.c |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 53243ca..75265ab 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -140,27 +140,10 @@ static struct irq_pin_list *get_one_free_irq_2_pin(int node)
 
 /* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
 #ifdef CONFIG_SPARSE_IRQ
-static struct irq_cfg irq_cfgx[] = {
+static struct irq_cfg irq_cfgx[NR_IRQS_LEGACY];
 #else
-static struct irq_cfg irq_cfgx[NR_IRQS] = {
+static struct irq_cfg irq_cfgx[NR_IRQS];
 #endif
-	[0]  = { .vector = IRQ0_VECTOR,  },
-	[1]  = { .vector = IRQ1_VECTOR,  },
-	[2]  = { .vector = IRQ2_VECTOR,  },
-	[3]  = { .vector = IRQ3_VECTOR,  },
-	[4]  = { .vector = IRQ4_VECTOR,  },
-	[5]  = { .vector = IRQ5_VECTOR,  },
-	[6]  = { .vector = IRQ6_VECTOR,  },
-	[7]  = { .vector = IRQ7_VECTOR,  },
-	[8]  = { .vector = IRQ8_VECTOR,  },
-	[9]  = { .vector = IRQ9_VECTOR,  },
-	[10] = { .vector = IRQ10_VECTOR, },
-	[11] = { .vector = IRQ11_VECTOR, },
-	[12] = { .vector = IRQ12_VECTOR, },
-	[13] = { .vector = IRQ13_VECTOR, },
-	[14] = { .vector = IRQ14_VECTOR, },
-	[15] = { .vector = IRQ15_VECTOR, },
-};
 
 void __init io_apic_disable_legacy(void)
 {
@@ -181,6 +164,8 @@ int __init arch_early_irq_init(void)
 	node= cpu_to_node(boot_cpu_id);
 
 	for (i = 0; i < count; i++) {
+		if (i < nr_legacy_irqs)
+			cfg[i].vector = IRQ0_VECTOR + i;
 		desc = irq_to_desc(i);
 		desc->chip_data = &cfg[i];
 		zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);
-- 
1.6.5.3


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [tip:x86/mrst] x86, ioapic: Improve handling of i8259A irq init
  2010-02-13  1:40 [PATCH 5/9] x86/ioapic: improve handling of i8259a irq init Pan, Jacob jun
@ 2010-02-20  1:28 ` tip-bot for Alek Du
  2010-02-24  2:49   ` [PATCH] x86: fix compiling warning with legacy_pci_xxx Yinghai Lu
  0 siblings, 1 reply; 18+ messages in thread
From: tip-bot for Alek Du @ 2010-02-20  1:28 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, alek.du, jacob.jun.pan, tglx

Commit-ID:  d39f6495f66616b637260405d0b5dc2656bc490e
Gitweb:     http://git.kernel.org/tip/d39f6495f66616b637260405d0b5dc2656bc490e
Author:     Alek Du <alek.du@intel.com>
AuthorDate: Mon, 7 Sep 2009 16:25:45 +0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 19 Feb 2010 16:25:17 -0800

x86, ioapic: Improve handling of i8259A irq init

Since we already track the number of legacy vectors by nr_legacy_irqs, we
can avoid use static vector allocations -- we can use dynamic one.

Signed-off-by: Alek Du <alek.du@intel.com>
LKML-Reference: <43F901BD926A4E43B106BF17856F07559FB80D01@orsmsx508.amr.corp.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/kernel/apic/io_apic.c |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 53243ca..75265ab 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -140,27 +140,10 @@ static struct irq_pin_list *get_one_free_irq_2_pin(int node)
 
 /* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
 #ifdef CONFIG_SPARSE_IRQ
-static struct irq_cfg irq_cfgx[] = {
+static struct irq_cfg irq_cfgx[NR_IRQS_LEGACY];
 #else
-static struct irq_cfg irq_cfgx[NR_IRQS] = {
+static struct irq_cfg irq_cfgx[NR_IRQS];
 #endif
-	[0]  = { .vector = IRQ0_VECTOR,  },
-	[1]  = { .vector = IRQ1_VECTOR,  },
-	[2]  = { .vector = IRQ2_VECTOR,  },
-	[3]  = { .vector = IRQ3_VECTOR,  },
-	[4]  = { .vector = IRQ4_VECTOR,  },
-	[5]  = { .vector = IRQ5_VECTOR,  },
-	[6]  = { .vector = IRQ6_VECTOR,  },
-	[7]  = { .vector = IRQ7_VECTOR,  },
-	[8]  = { .vector = IRQ8_VECTOR,  },
-	[9]  = { .vector = IRQ9_VECTOR,  },
-	[10] = { .vector = IRQ10_VECTOR, },
-	[11] = { .vector = IRQ11_VECTOR, },
-	[12] = { .vector = IRQ12_VECTOR, },
-	[13] = { .vector = IRQ13_VECTOR, },
-	[14] = { .vector = IRQ14_VECTOR, },
-	[15] = { .vector = IRQ15_VECTOR, },
-};
 
 void __init io_apic_disable_legacy(void)
 {
@@ -181,6 +164,8 @@ int __init arch_early_irq_init(void)
 	node= cpu_to_node(boot_cpu_id);
 
 	for (i = 0; i < count; i++) {
+		if (i < nr_legacy_irqs)
+			cfg[i].vector = IRQ0_VECTOR + i;
 		desc = irq_to_desc(i);
 		desc->chip_data = &cfg[i];
 		zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] x86: fix compiling warning with legacy_pci_xxx
  2010-02-20  1:28 ` [tip:x86/mrst] x86, ioapic: Improve handling of i8259A " tip-bot for Alek Du
@ 2010-02-24  2:49   ` Yinghai Lu
  2010-02-24  4:17     ` [PATCH] x86: remove left over nr_legacy_irqs Yinghai Lu
                       ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Yinghai Lu @ 2010-02-24  2:49 UTC (permalink / raw)
  To: mingo, hpa, tglx
  Cc: linux-kernel, alek.du, jacob.jun.pan, linux-tip-commits, Suresh Siddha


also remove duplicated cfg[i].vector assigning...

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
 arch/x86/kernel/apic/io_apic.c |    2 --
 arch/x86/kernel/i8259.c        |    6 +++---
 2 files changed, 3 insertions(+), 5 deletions(-)

Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -161,8 +161,6 @@ int __init arch_early_irq_init(void)
 	node= cpu_to_node(boot_cpu_id);
 
 	for (i = 0; i < count; i++) {
-		if (i < legacy_pic->nr_legacy_irqs)
-			cfg[i].vector = IRQ0_VECTOR + i;
 		desc = irq_to_desc(i);
 		desc->chip_data = &cfg[i];
 		zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);
Index: linux-2.6/arch/x86/kernel/i8259.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/i8259.c
+++ linux-2.6/arch/x86/kernel/i8259.c
@@ -371,9 +371,9 @@ static void init_8259A(int auto_eoi)
  * platforms, such as x86 MID.
  */
 
-static void __init legacy_pic_noop(void) { };
-static void __init legacy_pic_uint_noop(unsigned int unused) { };
-static void __init legacy_pic_int_noop(int unused) { };
+static void legacy_pic_noop(void) { };
+static void legacy_pic_uint_noop(unsigned int unused) { };
+static void legacy_pic_int_noop(int unused) { };
 
 static struct irq_chip dummy_pic_chip  = {
 	.name = "dummy pic",

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] x86: remove left over nr_legacy_irqs
  2010-02-24  2:49   ` [PATCH] x86: fix compiling warning with legacy_pci_xxx Yinghai Lu
@ 2010-02-24  4:17     ` Yinghai Lu
  2010-02-24  4:27       ` [PATCH -v2] " Yinghai Lu
  2010-02-24  8:09     ` [tip:x86/mrst] x86, legacy_irq: Remove duplicate vector assigment tip-bot for Yinghai Lu
  2010-02-24 19:04     ` tip-bot for Yinghai Lu
  2 siblings, 1 reply; 18+ messages in thread
From: Yinghai Lu @ 2010-02-24  4:17 UTC (permalink / raw)
  To: mingo, hpa, tglx; +Cc: linux-kernel, alek.du, jacob.jun.pan, Suresh Siddha



already in legacy_pic

Singed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/include/asm/irq.h |    1 -
 arch/x86/kernel/irqinit.c  |    7 ++-----
 2 files changed, 2 insertions(+), 6 deletions(-)

Index: linux-2.6/arch/x86/include/asm/irq.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/irq.h
+++ linux-2.6/arch/x86/include/asm/irq.h
@@ -48,6 +48,5 @@ extern DECLARE_BITMAP(used_vectors, NR_V
 extern int vector_used_by_percpu_irq(unsigned int vector);
 
 extern void init_ISA_irqs(void);
-extern int nr_legacy_irqs;
 
 #endif /* _ASM_X86_IRQ_H */
Index: linux-2.6/arch/x86/kernel/irqinit.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/irqinit.c
+++ linux-2.6/arch/x86/kernel/irqinit.c
@@ -99,9 +99,6 @@ int vector_used_by_percpu_irq(unsigned i
 	return 0;
 }
 
-/* Number of legacy interrupts */
-int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
-
 void __init init_ISA_irqs(void)
 {
 	int i;
@@ -114,7 +111,7 @@ void __init init_ISA_irqs(void)
 	/*
 	 * 16 old-style INTA-cycle interrupts:
 	 */
-	for (i = 0; i < NR_IRQS_LEGACY; i++) {
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++) {
 		struct irq_desc *desc = irq_to_desc(i);
 
 		desc->status = IRQ_DISABLED;
@@ -138,7 +135,7 @@ void __init init_IRQ(void)
 	 * then this vector space can be freed and re-used dynamically as the
 	 * irq's migrate etc.
 	 */
-	for (i = 0; i < nr_legacy_irqs; i++)
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
 		per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i;
 
 	x86_init.irqs.intr_init();

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -v2] x86: remove left over nr_legacy_irqs
  2010-02-24  4:17     ` [PATCH] x86: remove left over nr_legacy_irqs Yinghai Lu
@ 2010-02-24  4:27       ` Yinghai Lu
  2010-02-24  8:09         ` [tip:x86/mrst] x86, legacy_irq: Remove " tip-bot for Yinghai Lu
                           ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Yinghai Lu @ 2010-02-24  4:27 UTC (permalink / raw)
  To: mingo, hpa, tglx; +Cc: linux-kernel, alek.du, jacob.jun.pan, Suresh Siddha

already in legacy_pic

-v2: there is one in ioapic_.c

Singed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/include/asm/irq.h     |    1 -
 arch/x86/kernel/apic/io_apic.c |    2 +-
 arch/x86/kernel/irqinit.c      |    7 ++-----
 3 files changed, 3 insertions(+), 7 deletions(-)

Index: linux-2.6/arch/x86/include/asm/irq.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/irq.h
+++ linux-2.6/arch/x86/include/asm/irq.h
@@ -48,6 +48,5 @@ extern DECLARE_BITMAP(used_vectors, NR_V
 extern int vector_used_by_percpu_irq(unsigned int vector);
 
 extern void init_ISA_irqs(void);
-extern int nr_legacy_irqs;
 
 #endif /* _ASM_X86_IRQ_H */
Index: linux-2.6/arch/x86/kernel/irqinit.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/irqinit.c
+++ linux-2.6/arch/x86/kernel/irqinit.c
@@ -99,9 +99,6 @@ int vector_used_by_percpu_irq(unsigned i
 	return 0;
 }
 
-/* Number of legacy interrupts */
-int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
-
 void __init init_ISA_irqs(void)
 {
 	int i;
@@ -114,7 +111,7 @@ void __init init_ISA_irqs(void)
 	/*
 	 * 16 old-style INTA-cycle interrupts:
 	 */
-	for (i = 0; i < NR_IRQS_LEGACY; i++) {
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++) {
 		struct irq_desc *desc = irq_to_desc(i);
 
 		desc->status = IRQ_DISABLED;
@@ -138,7 +135,7 @@ void __init init_IRQ(void)
 	 * then this vector space can be freed and re-used dynamically as the
 	 * irq's migrate etc.
 	 */
-	for (i = 0; i < nr_legacy_irqs; i++)
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
 		per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i;
 
 	x86_init.irqs.intr_init();
Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -1438,7 +1438,7 @@ static void setup_IO_APIC_irq(int apic_i
 	 * controllers like 8259. Now that IO-APIC can handle this irq, update
 	 * the cfg->domain.
 	 */
-	if (irq < nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
+	if (irq < legacy_pic->nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
 		apic->vector_allocation_domain(0, cfg->domain);
 
 	if (assign_irq_vector(irq, cfg, apic->target_cpus()))

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [tip:x86/mrst] x86, legacy_irq: Remove left over nr_legacy_irqs
  2010-02-24  4:27       ` [PATCH -v2] " Yinghai Lu
@ 2010-02-24  8:09         ` tip-bot for Yinghai Lu
  2010-02-24 19:04         ` tip-bot for Yinghai Lu
  2010-02-24 20:39         ` [PATCH] x86/pci: exclude mrst pci code for other platform Yinghai Lu
  2 siblings, 0 replies; 18+ messages in thread
From: tip-bot for Yinghai Lu @ 2010-02-24  8:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, tglx

Commit-ID:  0c0cbde569b9ae2b05234669d5188c6f10616a42
Gitweb:     http://git.kernel.org/tip/0c0cbde569b9ae2b05234669d5188c6f10616a42
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Tue, 23 Feb 2010 20:27:48 -0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Tue, 23 Feb 2010 23:20:15 -0800

x86, legacy_irq: Remove left over nr_legacy_irqs

nr_legacy_irqs and its ilk have moved to legacy_pic.

-v2: there is one in ioapic_.c

Singed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B84AAC4.2020204@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/include/asm/irq.h     |    1 -
 arch/x86/kernel/apic/io_apic.c |    2 +-
 arch/x86/kernel/irqinit.c      |    7 ++-----
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 2622927..5458380 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -48,6 +48,5 @@ extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
 extern int vector_used_by_percpu_irq(unsigned int vector);
 
 extern void init_ISA_irqs(void);
-extern int nr_legacy_irqs;
 
 #endif /* _ASM_X86_IRQ_H */
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8c848b5..b9d08f0 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1440,7 +1440,7 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq
 	 * controllers like 8259. Now that IO-APIC can handle this irq, update
 	 * the cfg->domain.
 	 */
-	if (irq < nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
+	if (irq < legacy_pic->nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
 		apic->vector_allocation_domain(0, cfg->domain);
 
 	if (assign_irq_vector(irq, cfg, apic->target_cpus()))
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index d2f787b..ef257fc 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -99,9 +99,6 @@ int vector_used_by_percpu_irq(unsigned int vector)
 	return 0;
 }
 
-/* Number of legacy interrupts */
-int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
-
 void __init init_ISA_irqs(void)
 {
 	int i;
@@ -114,7 +111,7 @@ void __init init_ISA_irqs(void)
 	/*
 	 * 16 old-style INTA-cycle interrupts:
 	 */
-	for (i = 0; i < NR_IRQS_LEGACY; i++) {
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++) {
 		struct irq_desc *desc = irq_to_desc(i);
 
 		desc->status = IRQ_DISABLED;
@@ -138,7 +135,7 @@ void __init init_IRQ(void)
 	 * then this vector space can be freed and re-used dynamically as the
 	 * irq's migrate etc.
 	 */
-	for (i = 0; i < nr_legacy_irqs; i++)
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
 		per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i;
 
 	x86_init.irqs.intr_init();

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [tip:x86/mrst] x86, legacy_irq: Remove duplicate vector assigment
  2010-02-24  2:49   ` [PATCH] x86: fix compiling warning with legacy_pci_xxx Yinghai Lu
  2010-02-24  4:17     ` [PATCH] x86: remove left over nr_legacy_irqs Yinghai Lu
@ 2010-02-24  8:09     ` tip-bot for Yinghai Lu
  2010-02-24 19:04     ` tip-bot for Yinghai Lu
  2 siblings, 0 replies; 18+ messages in thread
From: tip-bot for Yinghai Lu @ 2010-02-24  8:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, tglx

Commit-ID:  8cdf5dcab80d5933b048118368caf75df21d2788
Gitweb:     http://git.kernel.org/tip/8cdf5dcab80d5933b048118368caf75df21d2788
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Tue, 23 Feb 2010 18:49:04 -0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Tue, 23 Feb 2010 23:23:29 -0800

x86, legacy_irq: Remove duplicate vector assigment

Remove duplicated cfg[i].vector assignment.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B8493A0.6080501@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/kernel/apic/io_apic.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index b9d08f0..b758d49 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -161,8 +161,6 @@ int __init arch_early_irq_init(void)
 	node= cpu_to_node(boot_cpu_id);
 
 	for (i = 0; i < count; i++) {
-		if (i < legacy_pic->nr_legacy_irqs)
-			cfg[i].vector = IRQ0_VECTOR + i;
 		desc = irq_to_desc(i);
 		desc->chip_data = &cfg[i];
 		zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [tip:x86/mrst] x86, legacy_irq: Remove left over nr_legacy_irqs
  2010-02-24  4:27       ` [PATCH -v2] " Yinghai Lu
  2010-02-24  8:09         ` [tip:x86/mrst] x86, legacy_irq: Remove " tip-bot for Yinghai Lu
@ 2010-02-24 19:04         ` tip-bot for Yinghai Lu
  2010-02-24 20:39         ` [PATCH] x86/pci: exclude mrst pci code for other platform Yinghai Lu
  2 siblings, 0 replies; 18+ messages in thread
From: tip-bot for Yinghai Lu @ 2010-02-24 19:04 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, tglx

Commit-ID:  28c6a0ba30457380b140d9d7a61530eda8969180
Gitweb:     http://git.kernel.org/tip/28c6a0ba30457380b140d9d7a61530eda8969180
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Tue, 23 Feb 2010 20:27:48 -0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Wed, 24 Feb 2010 11:01:34 -0800

x86, legacy_irq: Remove left over nr_legacy_irqs

nr_legacy_irqs and its ilk have moved to legacy_pic.

-v2: there is one in ioapic_.c

Singed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B84AAC4.2020204@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/include/asm/irq.h     |    1 -
 arch/x86/kernel/apic/io_apic.c |    2 +-
 arch/x86/kernel/irqinit.c      |    7 ++-----
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 2622927..5458380 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -48,6 +48,5 @@ extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
 extern int vector_used_by_percpu_irq(unsigned int vector);
 
 extern void init_ISA_irqs(void);
-extern int nr_legacy_irqs;
 
 #endif /* _ASM_X86_IRQ_H */
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8c848b5..b9d08f0 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1440,7 +1440,7 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq
 	 * controllers like 8259. Now that IO-APIC can handle this irq, update
 	 * the cfg->domain.
 	 */
-	if (irq < nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
+	if (irq < legacy_pic->nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
 		apic->vector_allocation_domain(0, cfg->domain);
 
 	if (assign_irq_vector(irq, cfg, apic->target_cpus()))
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index d2f787b..ef257fc 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -99,9 +99,6 @@ int vector_used_by_percpu_irq(unsigned int vector)
 	return 0;
 }
 
-/* Number of legacy interrupts */
-int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
-
 void __init init_ISA_irqs(void)
 {
 	int i;
@@ -114,7 +111,7 @@ void __init init_ISA_irqs(void)
 	/*
 	 * 16 old-style INTA-cycle interrupts:
 	 */
-	for (i = 0; i < NR_IRQS_LEGACY; i++) {
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++) {
 		struct irq_desc *desc = irq_to_desc(i);
 
 		desc->status = IRQ_DISABLED;
@@ -138,7 +135,7 @@ void __init init_IRQ(void)
 	 * then this vector space can be freed and re-used dynamically as the
 	 * irq's migrate etc.
 	 */
-	for (i = 0; i < nr_legacy_irqs; i++)
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
 		per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i;
 
 	x86_init.irqs.intr_init();

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [tip:x86/mrst] x86, legacy_irq: Remove duplicate vector assigment
  2010-02-24  2:49   ` [PATCH] x86: fix compiling warning with legacy_pci_xxx Yinghai Lu
  2010-02-24  4:17     ` [PATCH] x86: remove left over nr_legacy_irqs Yinghai Lu
  2010-02-24  8:09     ` [tip:x86/mrst] x86, legacy_irq: Remove duplicate vector assigment tip-bot for Yinghai Lu
@ 2010-02-24 19:04     ` tip-bot for Yinghai Lu
  2 siblings, 0 replies; 18+ messages in thread
From: tip-bot for Yinghai Lu @ 2010-02-24 19:04 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, tglx

Commit-ID:  9eeeb09edba1e3544526611663472743ca584d36
Gitweb:     http://git.kernel.org/tip/9eeeb09edba1e3544526611663472743ca584d36
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Tue, 23 Feb 2010 18:49:04 -0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Wed, 24 Feb 2010 11:01:34 -0800

x86, legacy_irq: Remove duplicate vector assigment

Remove duplicated cfg[i].vector assignment.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B8493A0.6080501@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/kernel/apic/io_apic.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index b9d08f0..b758d49 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -161,8 +161,6 @@ int __init arch_early_irq_init(void)
 	node= cpu_to_node(boot_cpu_id);
 
 	for (i = 0; i < count; i++) {
-		if (i < legacy_pic->nr_legacy_irqs)
-			cfg[i].vector = IRQ0_VECTOR + i;
 		desc = irq_to_desc(i);
 		desc->chip_data = &cfg[i];
 		zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] x86/pci: exclude mrst pci code for other platform
  2010-02-24  4:27       ` [PATCH -v2] " Yinghai Lu
  2010-02-24  8:09         ` [tip:x86/mrst] x86, legacy_irq: Remove " tip-bot for Yinghai Lu
  2010-02-24 19:04         ` tip-bot for Yinghai Lu
@ 2010-02-24 20:39         ` Yinghai Lu
  2010-02-24 21:03           ` Pan, Jacob jun
  2010-02-25 22:27           ` [tip:x86/mrst] x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n tip-bot for Yinghai Lu
  2 siblings, 2 replies; 18+ messages in thread
From: Yinghai Lu @ 2010-02-24 20:39 UTC (permalink / raw)
  To: mingo, hpa, tglx
  Cc: linux-kernel, alek.du, jacob.jun.pan, Suresh Siddha, Jesse Barnes



Signed-off-by: Yinghai Lu <yinghai@kernel.org>

diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
index ab637f9..131e4da 100644
--- a/arch/x86/pci/Makefile
+++ b/arch/x86/pci/Makefile
@@ -13,7 +13,8 @@ obj-$(CONFIG_X86_VISWS)		+= visws.o
 
 obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
 
-obj-y				+= common.o early.o mrst.o
+obj-y				+= common.o early.o
+obj-$(CONFIG_X86_MRST)		+= mrst.o
 obj-y				+= amd_bus.o bus_numa.o
 
 ifeq ($(CONFIG_PCI_DEBUG),y)

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* RE: [PATCH] x86/pci: exclude mrst pci code for other platform
  2010-02-24 20:39         ` [PATCH] x86/pci: exclude mrst pci code for other platform Yinghai Lu
@ 2010-02-24 21:03           ` Pan, Jacob jun
  2010-02-24 21:44             ` H. Peter Anvin
  2010-02-25 22:27           ` [tip:x86/mrst] x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n tip-bot for Yinghai Lu
  1 sibling, 1 reply; 18+ messages in thread
From: Pan, Jacob jun @ 2010-02-24 21:03 UTC (permalink / raw)
  To: Yinghai Lu, mingo, hpa, tglx
  Cc: linux-kernel, Du, Alek, Siddha, Suresh B, Jesse Barnes

Our goal is to have a binary compatible kernel runs on Moorestown and PC, can
we keep the Moorestown PCI code for this purpose?

>-----Original Message-----
>From: Yinghai Lu [mailto:yinghai@kernel.org]
>Sent: Wednesday, February 24, 2010 12:40 PM
>To: mingo@redhat.com; hpa@zytor.com; tglx@linutronix.de
>Cc: linux-kernel@vger.kernel.org; Du, Alek; Pan, Jacob jun; Siddha, Suresh B;
>Jesse Barnes
>Subject: [PATCH] x86/pci: exclude mrst pci code for other platform
>
>
>
>Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
>diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
>index ab637f9..131e4da 100644
>--- a/arch/x86/pci/Makefile
>+++ b/arch/x86/pci/Makefile
>@@ -13,7 +13,8 @@ obj-$(CONFIG_X86_VISWS)		+= visws.o
>
> obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
>
>-obj-y				+= common.o early.o mrst.o
>+obj-y				+= common.o early.o
>+obj-$(CONFIG_X86_MRST)		+= mrst.o
> obj-y				+= amd_bus.o bus_numa.o
>
> ifeq ($(CONFIG_PCI_DEBUG),y)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] x86/pci: exclude mrst pci code for other platform
  2010-02-24 21:03           ` Pan, Jacob jun
@ 2010-02-24 21:44             ` H. Peter Anvin
  2010-02-24 22:10               ` Yinghai Lu
  0 siblings, 1 reply; 18+ messages in thread
From: H. Peter Anvin @ 2010-02-24 21:44 UTC (permalink / raw)
  To: Pan, Jacob jun
  Cc: Yinghai Lu, mingo, tglx, linux-kernel, Du, Alek, Siddha,
	Suresh B, Jesse Barnes

On 02/24/2010 01:03 PM, Pan, Jacob jun wrote:
> Our goal is to have a binary compatible kernel runs on Moorestown and PC, can
> we keep the Moorestown PCI code for this purpose?

CONFIG_X86_MRST is supposed to reflect the *ability* to run on
Moorestown, not the *requirement* of running on Moorestown.  As such,
Yinghai's patch seems correct to me.

If you cannot boot a kernel with CONFIG_X86_MRST=y on PC hardware, that
is a bug which should be fixed.

	-hpa


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] x86/pci: exclude mrst pci code for other platform
  2010-02-24 21:44             ` H. Peter Anvin
@ 2010-02-24 22:10               ` Yinghai Lu
  2010-02-24 22:31                 ` H. Peter Anvin
  0 siblings, 1 reply; 18+ messages in thread
From: Yinghai Lu @ 2010-02-24 22:10 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Pan, Jacob jun, mingo, tglx, linux-kernel, Du, Alek, Siddha,
	Suresh B, Jesse Barnes

On 02/24/2010 01:44 PM, H. Peter Anvin wrote:
> On 02/24/2010 01:03 PM, Pan, Jacob jun wrote:
>> Our goal is to have a binary compatible kernel runs on Moorestown and PC, can
>> we keep the Moorestown PCI code for this purpose?
> 
> CONFIG_X86_MRST is supposed to reflect the *ability* to run on
> Moorestown, not the *requirement* of running on Moorestown.  As such,
> Yinghai's patch seems correct to me.
> 
> If you cannot boot a kernel with CONFIG_X86_MRST=y on PC hardware, that
> is a bug which should be fixed.

yes, at 64 bit doesn't need that code yet.

that pci_fixed_bar_fixup cause my nehalem-ex box warm reset...

YH

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] x86/pci: exclude mrst pci code for other platform
  2010-02-24 22:10               ` Yinghai Lu
@ 2010-02-24 22:31                 ` H. Peter Anvin
  2010-02-24 22:42                   ` Yinghai Lu
  0 siblings, 1 reply; 18+ messages in thread
From: H. Peter Anvin @ 2010-02-24 22:31 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Pan, Jacob jun, mingo, tglx, linux-kernel, Du, Alek, Siddha,
	Suresh B, Jesse Barnes

On 02/24/2010 02:10 PM, Yinghai Lu wrote:
> On 02/24/2010 01:44 PM, H. Peter Anvin wrote:
>> On 02/24/2010 01:03 PM, Pan, Jacob jun wrote:
>>> Our goal is to have a binary compatible kernel runs on Moorestown and PC, can
>>> we keep the Moorestown PCI code for this purpose?
>>
>> CONFIG_X86_MRST is supposed to reflect the *ability* to run on
>> Moorestown, not the *requirement* of running on Moorestown.  As such,
>> Yinghai's patch seems correct to me.
>>
>> If you cannot boot a kernel with CONFIG_X86_MRST=y on PC hardware, that
>> is a bug which should be fixed.
> 
> yes, at 64 bit doesn't need that code yet.
> 
> that pci_fixed_bar_fixup cause my nehalem-ex box warm reset...
> 

There was a fix for that earlier today, did you pick that up?

	-hpa


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] x86/pci: exclude mrst pci code for other platform
  2010-02-24 22:31                 ` H. Peter Anvin
@ 2010-02-24 22:42                   ` Yinghai Lu
  2010-02-25  0:41                     ` [PATCH] x86/mrst: add dependencies for Moorestown Pan, Jacob jun
  0 siblings, 1 reply; 18+ messages in thread
From: Yinghai Lu @ 2010-02-24 22:42 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Pan, Jacob jun, mingo, tglx, linux-kernel, Du, Alek, Siddha,
	Suresh B, Jesse Barnes

On 02/24/2010 02:31 PM, H. Peter Anvin wrote:
> On 02/24/2010 02:10 PM, Yinghai Lu wrote:
>> On 02/24/2010 01:44 PM, H. Peter Anvin wrote:
>>> On 02/24/2010 01:03 PM, Pan, Jacob jun wrote:
>>>> Our goal is to have a binary compatible kernel runs on Moorestown and PC, can
>>>> we keep the Moorestown PCI code for this purpose?
>>>
>>> CONFIG_X86_MRST is supposed to reflect the *ability* to run on
>>> Moorestown, not the *requirement* of running on Moorestown.  As such,
>>> Yinghai's patch seems correct to me.
>>>
>>> If you cannot boot a kernel with CONFIG_X86_MRST=y on PC hardware, that
>>> is a bug which should be fixed.
>>
>> yes, at 64 bit doesn't need that code yet.
>>
>> that pci_fixed_bar_fixup cause my nehalem-ex box warm reset...
>>
> 
> There was a fix for that earlier today, did you pick that up?

seem you rebase tip/x86/mrst, and remove the /* */ for that pci quirks...

Yinghai

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] x86/mrst: add dependencies for Moorestown
  2010-02-24 22:42                   ` Yinghai Lu
@ 2010-02-25  0:41                     ` Pan, Jacob jun
  2010-02-25  6:01                       ` Yinghai Lu
  0 siblings, 1 reply; 18+ messages in thread
From: Pan, Jacob jun @ 2010-02-25  0:41 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: mingo, tglx, linux-kernel, Du, Alek, Siddha, Suresh B,
	Jesse Barnes, Yinghai Lu

Moorestown platform depends on IOAPIC, specify dependency correctly.

Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
---
 arch/x86/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0ab2dce..b50788d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -388,8 +388,10 @@ config X86_ELAN
 
 config X86_MRST
        bool "Moorestown MID platform"
+	depends on PCI_IOAPIC
 	depends on X86_32
 	depends on X86_EXTENDED_PLATFORM
+	depends on X86_IO_APIC
 	select APB_TIMER
 	---help---
 	  Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] x86/mrst: add dependencies for Moorestown
  2010-02-25  0:41                     ` [PATCH] x86/mrst: add dependencies for Moorestown Pan, Jacob jun
@ 2010-02-25  6:01                       ` Yinghai Lu
  0 siblings, 0 replies; 18+ messages in thread
From: Yinghai Lu @ 2010-02-25  6:01 UTC (permalink / raw)
  To: Pan, Jacob jun
  Cc: H. Peter Anvin, mingo, tglx, linux-kernel, Du, Alek, Siddha,
	Suresh B, Jesse Barnes

On 02/24/2010 04:41 PM, Pan, Jacob jun wrote:
> Moorestown platform depends on IOAPIC, specify dependency correctly.
> 
> Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
> ---
>  arch/x86/Kconfig |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 0ab2dce..b50788d 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -388,8 +388,10 @@ config X86_ELAN
>  
>  config X86_MRST
>         bool "Moorestown MID platform"
> +	depends on PCI_IOAPIC
>  	depends on X86_32
>  	depends on X86_EXTENDED_PLATFORM
> +	depends on X86_IO_APIC
>  	select APB_TIMER
>  	---help---
>  	  Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin

so mrst is
1) SMP or not?
2) if is not SMP, does it still have MADT?

YH

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [tip:x86/mrst] x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n
  2010-02-24 20:39         ` [PATCH] x86/pci: exclude mrst pci code for other platform Yinghai Lu
  2010-02-24 21:03           ` Pan, Jacob jun
@ 2010-02-25 22:27           ` tip-bot for Yinghai Lu
  1 sibling, 0 replies; 18+ messages in thread
From: tip-bot for Yinghai Lu @ 2010-02-25 22:27 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, tglx

Commit-ID:  722a639fd2cec44501c04ae32af57fd822c5a2d5
Gitweb:     http://git.kernel.org/tip/722a639fd2cec44501c04ae32af57fd822c5a2d5
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Wed, 24 Feb 2010 12:39:37 -0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 25 Feb 2010 14:26:43 -0800

x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n

If we don't have any Moorestown CPU support compiled in, we don't need
the Moorestown PCI support either.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B858E89.7040807@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/pci/Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
index 4753ebc..56caf2a 100644
--- a/arch/x86/pci/Makefile
+++ b/arch/x86/pci/Makefile
@@ -13,7 +13,9 @@ obj-$(CONFIG_X86_VISWS)		+= visws.o
 
 obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
 
-obj-y				+= common.o early.o mrst.o
+obj-$(CONFIG_X86_MRST)		+= mrst.o
+
+obj-y				+= common.o early.o
 obj-y				+= amd_bus.o
 obj-$(CONFIG_X86_64)		+= bus_numa.o
 

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-02-25 22:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13  1:40 [PATCH 5/9] x86/ioapic: improve handling of i8259a irq init Pan, Jacob jun
2010-02-20  1:28 ` [tip:x86/mrst] x86, ioapic: Improve handling of i8259A " tip-bot for Alek Du
2010-02-24  2:49   ` [PATCH] x86: fix compiling warning with legacy_pci_xxx Yinghai Lu
2010-02-24  4:17     ` [PATCH] x86: remove left over nr_legacy_irqs Yinghai Lu
2010-02-24  4:27       ` [PATCH -v2] " Yinghai Lu
2010-02-24  8:09         ` [tip:x86/mrst] x86, legacy_irq: Remove " tip-bot for Yinghai Lu
2010-02-24 19:04         ` tip-bot for Yinghai Lu
2010-02-24 20:39         ` [PATCH] x86/pci: exclude mrst pci code for other platform Yinghai Lu
2010-02-24 21:03           ` Pan, Jacob jun
2010-02-24 21:44             ` H. Peter Anvin
2010-02-24 22:10               ` Yinghai Lu
2010-02-24 22:31                 ` H. Peter Anvin
2010-02-24 22:42                   ` Yinghai Lu
2010-02-25  0:41                     ` [PATCH] x86/mrst: add dependencies for Moorestown Pan, Jacob jun
2010-02-25  6:01                       ` Yinghai Lu
2010-02-25 22:27           ` [tip:x86/mrst] x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n tip-bot for Yinghai Lu
2010-02-24  8:09     ` [tip:x86/mrst] x86, legacy_irq: Remove duplicate vector assigment tip-bot for Yinghai Lu
2010-02-24 19:04     ` tip-bot for 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.