All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-17 12:07 ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: linuxppc-dev, linux-kernel, Mel Gorman

KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
it's not set, there are numerous small build errors. This is a small series
of patches to allow CONFIG_XICS to be unset in the config.

XICS appears to be some sort of interrupt controller but I'm not sure how
common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
universally requires CONFIG_XICS, the better path might be to force it to
be set.

Testing was building with make oldconfig a configuration from 2.6.31 on
a PPC970.

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

* [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-17 12:07 ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: Mel Gorman, linuxppc-dev, linux-kernel

KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
it's not set, there are numerous small build errors. This is a small series
of patches to allow CONFIG_XICS to be unset in the config.

XICS appears to be some sort of interrupt controller but I'm not sure how
common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
universally requires CONFIG_XICS, the better path might be to force it to
be set.

Testing was building with make oldconfig a configuration from 2.6.31 on
a PPC970.

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

* [PATCH 1/4] powerpc: Add Kconfig dependency for PCI_MSI as needed by XICS
  2009-11-17 12:07 ` Mel Gorman
@ 2009-11-17 12:07   ` Mel Gorman
  -1 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: linuxppc-dev, linux-kernel, Mel Gorman

It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that
happens, the kernel fails to build with

arch/powerpc/platforms/built-in.o: In function `.xics_startup':
xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq'
make: *** [.tmp_vmlinux1] Error 1

This patch adds the dependency in KConfig.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 04a8061..21a1fa1 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -52,7 +52,7 @@ config PPC_UDBG_BEAT
 	default n
 
 config XICS
-	depends on PPC_PSERIES
+	depends on PPC_PSERIES && PCI_MSI
 	bool
 	default y
 
-- 
1.6.5


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

* [PATCH 1/4] powerpc: Add Kconfig dependency for PCI_MSI as needed by XICS
@ 2009-11-17 12:07   ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: Mel Gorman, linuxppc-dev, linux-kernel

It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that
happens, the kernel fails to build with

arch/powerpc/platforms/built-in.o: In function `.xics_startup':
xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq'
make: *** [.tmp_vmlinux1] Error 1

This patch adds the dependency in KConfig.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 04a8061..21a1fa1 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -52,7 +52,7 @@ config PPC_UDBG_BEAT
 	default n
 
 config XICS
-	depends on PPC_PSERIES
+	depends on PPC_PSERIES && PCI_MSI
 	bool
 	default y
 
-- 
1.6.5

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

* [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure
  2009-11-17 12:07 ` Mel Gorman
@ 2009-11-17 12:07   ` Mel Gorman
  -1 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: linuxppc-dev, linux-kernel, Mel Gorman

If CONFIG_XICS is not set but CONFIG_PPC_PSERIES is, then the kernel
fails to build with

arch/powerpc/platforms/pseries/smp.c: In function ‘smp_init_pseries_xics’:
arch/powerpc/platforms/pseries/smp.c:202: error: ‘pSeries_xics_smp_ops’ undeclared (first use in this function)
arch/powerpc/platforms/pseries/smp.c:202: error: (Each undeclared identifier is reported only once
arch/powerpc/platforms/pseries/smp.c:202: error: for each function it appears in.)
make[2]: *** [arch/powerpc/platforms/pseries/smp.o] Error 1

As CONFIG_XICS is not always necessary, this patch allows the kernel to
build but the system will panic at runtime if it is found that XICS is
required.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/pseries/smp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 440000c..da78ea5 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -199,7 +199,11 @@ void __init smp_init_pseries_mpic(void)
 
 void __init smp_init_pseries_xics(void)
 {
+#ifdef CONFIG_XICS
 	smp_ops = &pSeries_xics_smp_ops;
+#else
+	panic("Support for platform ppc-xicp not configured");
+#endif
 
 	smp_init_pseries();
 }
-- 
1.6.5


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

* [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure
@ 2009-11-17 12:07   ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: Mel Gorman, linuxppc-dev, linux-kernel

If CONFIG_XICS is not set but CONFIG_PPC_PSERIES is, then the kernel
fails to build with

arch/powerpc/platforms/pseries/smp.c: In function ‘smp_init_pseries_xics’:
arch/powerpc/platforms/pseries/smp.c:202: error: ‘pSeries_xics_smp_ops’ undeclared (first use in this function)
arch/powerpc/platforms/pseries/smp.c:202: error: (Each undeclared identifier is reported only once
arch/powerpc/platforms/pseries/smp.c:202: error: for each function it appears in.)
make[2]: *** [arch/powerpc/platforms/pseries/smp.o] Error 1

As CONFIG_XICS is not always necessary, this patch allows the kernel to
build but the system will panic at runtime if it is found that XICS is
required.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/pseries/smp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 440000c..da78ea5 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -199,7 +199,11 @@ void __init smp_init_pseries_mpic(void)
 
 void __init smp_init_pseries_xics(void)
 {
+#ifdef CONFIG_XICS
 	smp_ops = &pSeries_xics_smp_ops;
+#else
+	panic("Support for platform ppc-xicp not configured");
+#endif
 
 	smp_init_pseries();
 }
-- 
1.6.5

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

* [PATCH 3/4] powerpc: Only define smp_pSeries_cpu_bootable when CONFIG_XICS is set
  2009-11-17 12:07 ` Mel Gorman
@ 2009-11-17 12:07   ` Mel Gorman
  -1 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: linuxppc-dev, linux-kernel, Mel Gorman

If CONFIG_XICS is set, then smp_pSeries_cpu_bootable() is unnecessary.
As warnings are treated as errors, this fails to build.

This patch only defines smp_pSeries_cpu_bootable() when CONFIG_XICS is
set.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/pseries/smp.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index da78ea5..62b1141 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -130,6 +130,15 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
 	paca[nr].cpu_start = 1;
 }
 
+#ifdef CONFIG_MPIC
+static struct smp_ops_t pSeries_mpic_smp_ops = {
+	.message_pass	= smp_mpic_message_pass,
+	.probe		= smp_mpic_probe,
+	.kick_cpu	= smp_pSeries_kick_cpu,
+	.setup_cpu	= smp_mpic_setup_cpu,
+};
+#endif
+#ifdef CONFIG_XICS
 static int smp_pSeries_cpu_bootable(unsigned int nr)
 {
 	/* Special case - we inhibit secondary thread startup
@@ -142,15 +151,7 @@ static int smp_pSeries_cpu_bootable(unsigned int nr)
 
 	return 1;
 }
-#ifdef CONFIG_MPIC
-static struct smp_ops_t pSeries_mpic_smp_ops = {
-	.message_pass	= smp_mpic_message_pass,
-	.probe		= smp_mpic_probe,
-	.kick_cpu	= smp_pSeries_kick_cpu,
-	.setup_cpu	= smp_mpic_setup_cpu,
-};
-#endif
-#ifdef CONFIG_XICS
+
 static struct smp_ops_t pSeries_xics_smp_ops = {
 	.message_pass	= smp_xics_message_pass,
 	.probe		= smp_xics_probe,
-- 
1.6.5


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

* [PATCH 3/4] powerpc: Only define smp_pSeries_cpu_bootable when CONFIG_XICS is set
@ 2009-11-17 12:07   ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: Mel Gorman, linuxppc-dev, linux-kernel

If CONFIG_XICS is set, then smp_pSeries_cpu_bootable() is unnecessary.
As warnings are treated as errors, this fails to build.

This patch only defines smp_pSeries_cpu_bootable() when CONFIG_XICS is
set.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/pseries/smp.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index da78ea5..62b1141 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -130,6 +130,15 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
 	paca[nr].cpu_start = 1;
 }
 
+#ifdef CONFIG_MPIC
+static struct smp_ops_t pSeries_mpic_smp_ops = {
+	.message_pass	= smp_mpic_message_pass,
+	.probe		= smp_mpic_probe,
+	.kick_cpu	= smp_pSeries_kick_cpu,
+	.setup_cpu	= smp_mpic_setup_cpu,
+};
+#endif
+#ifdef CONFIG_XICS
 static int smp_pSeries_cpu_bootable(unsigned int nr)
 {
 	/* Special case - we inhibit secondary thread startup
@@ -142,15 +151,7 @@ static int smp_pSeries_cpu_bootable(unsigned int nr)
 
 	return 1;
 }
-#ifdef CONFIG_MPIC
-static struct smp_ops_t pSeries_mpic_smp_ops = {
-	.message_pass	= smp_mpic_message_pass,
-	.probe		= smp_mpic_probe,
-	.kick_cpu	= smp_pSeries_kick_cpu,
-	.setup_cpu	= smp_mpic_setup_cpu,
-};
-#endif
-#ifdef CONFIG_XICS
+
 static struct smp_ops_t pSeries_xics_smp_ops = {
 	.message_pass	= smp_xics_message_pass,
 	.probe		= smp_xics_probe,
-- 
1.6.5

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

* [PATCH 4/4] powerpc: Avoid reference to XICS-related functions when CONFIG_XICS is not set
  2009-11-17 12:07 ` Mel Gorman
@ 2009-11-17 12:07   ` Mel Gorman
  -1 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: linuxppc-dev, linux-kernel, Mel Gorman

Calls to XICS-related functions is open-coded in a number of places even
when CONFIG_XICS is not set resulting in build failures such as

arch/powerpc/platforms/built-in.o: In function `.pseries_kexec_cpu_down_xics':
kexec.c:(.text+0x15558): undefined reference to `.xics_kexec_teardown_cpu'
arch/powerpc/platforms/built-in.o: In function `.pseries_cpu_disable': hotplug-cpu.c:(.text+0x16104): undefined reference to `.xics_migrate_irqs_away'
arch/powerpc/platforms/built-in.o: In function `.pseries_mach_cpu_die': hotplug-cpu.c:(.text+0x1615c): undefined reference to `.xics_teardown_cpu'
arch/powerpc/platforms/built-in.o: In function `.pseries_xics_init_IRQ': setup.c:(.init.text+0x4590): undefined reference to `.xics_init_IRQ'
make: *** [.tmp_vmlinux1] Error 1

This patch fixes up a number of references such as those described above.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/pseries/hotplug-cpu.c |    2 ++
 arch/powerpc/platforms/pseries/kexec.c       |    7 +++++++
 arch/powerpc/platforms/pseries/setup.c       |    7 +++++++
 arch/powerpc/platforms/pseries/xics.h        |    8 +++++++-
 4 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index ebff6d9..a2957d6 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -58,7 +58,9 @@ static void pseries_mach_cpu_die(void)
 {
 	local_irq_disable();
 	idle_task_exit();
+#ifdef CONFIG_XICS
 	xics_teardown_cpu();
+#endif
 	unregister_slb_shadow(hard_smp_processor_id(), __pa(get_slb_shadow()));
 	rtas_stop_self();
 	/* Should never get here... */
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
index 53cbd53..ab79947 100644
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -51,6 +51,7 @@ void __init setup_kexec_cpu_down_mpic(void)
 	ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
 }
 
+#ifdef CONFIG_XICS
 static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
 {
 	pseries_kexec_cpu_down(crash_shutdown, secondary);
@@ -61,6 +62,12 @@ void __init setup_kexec_cpu_down_xics(void)
 {
 	ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
 }
+#else
+void __init setup_kexec_cpu_down_xics(void)
+{
+	BUG();
+}
+#endif
 
 static int __init pseries_kexec_setup(void)
 {
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index ca5f2e1..a925fbb 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -210,11 +210,18 @@ static void __init pseries_mpic_init_IRQ(void)
 	pseries_setup_i8259_cascade();
 }
 
+#ifdef CONFIG_XICS
 static void __init pseries_xics_init_IRQ(void)
 {
 	xics_init_IRQ();
 	pseries_setup_i8259_cascade();
 }
+#else
+static void __init pseries_xics_init_IRQ(void)
+{
+	BUG();
+}
+#endif
 
 static void pseries_lpar_enable_pmcs(void)
 {
diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h
index d1d5a83..d0a618d 100644
--- a/arch/powerpc/platforms/pseries/xics.h
+++ b/arch/powerpc/platforms/pseries/xics.h
@@ -16,8 +16,14 @@ extern void xics_init_IRQ(void);
 extern void xics_setup_cpu(void);
 extern void xics_teardown_cpu(void);
 extern void xics_kexec_teardown_cpu(int secondary);
-extern void xics_migrate_irqs_away(void);
 extern int smp_xics_probe(void);
 extern void smp_xics_message_pass(int target, int msg);
+#ifdef CONFIG_XICS
+extern void xics_migrate_irqs_away(void);
+#else
+static inline void xics_migrate_irqs_away(void)
+{
+	BUG();
+}
 
 #endif /* _POWERPC_KERNEL_XICS_H */
-- 
1.6.5


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

* [PATCH 4/4] powerpc: Avoid reference to XICS-related functions when CONFIG_XICS is not set
@ 2009-11-17 12:07   ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 12:07 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt
  Cc: Mel Gorman, linuxppc-dev, linux-kernel

Calls to XICS-related functions is open-coded in a number of places even
when CONFIG_XICS is not set resulting in build failures such as

arch/powerpc/platforms/built-in.o: In function `.pseries_kexec_cpu_down_xics':
kexec.c:(.text+0x15558): undefined reference to `.xics_kexec_teardown_cpu'
arch/powerpc/platforms/built-in.o: In function `.pseries_cpu_disable': hotplug-cpu.c:(.text+0x16104): undefined reference to `.xics_migrate_irqs_away'
arch/powerpc/platforms/built-in.o: In function `.pseries_mach_cpu_die': hotplug-cpu.c:(.text+0x1615c): undefined reference to `.xics_teardown_cpu'
arch/powerpc/platforms/built-in.o: In function `.pseries_xics_init_IRQ': setup.c:(.init.text+0x4590): undefined reference to `.xics_init_IRQ'
make: *** [.tmp_vmlinux1] Error 1

This patch fixes up a number of references such as those described above.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
 arch/powerpc/platforms/pseries/hotplug-cpu.c |    2 ++
 arch/powerpc/platforms/pseries/kexec.c       |    7 +++++++
 arch/powerpc/platforms/pseries/setup.c       |    7 +++++++
 arch/powerpc/platforms/pseries/xics.h        |    8 +++++++-
 4 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index ebff6d9..a2957d6 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -58,7 +58,9 @@ static void pseries_mach_cpu_die(void)
 {
 	local_irq_disable();
 	idle_task_exit();
+#ifdef CONFIG_XICS
 	xics_teardown_cpu();
+#endif
 	unregister_slb_shadow(hard_smp_processor_id(), __pa(get_slb_shadow()));
 	rtas_stop_self();
 	/* Should never get here... */
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
index 53cbd53..ab79947 100644
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -51,6 +51,7 @@ void __init setup_kexec_cpu_down_mpic(void)
 	ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
 }
 
+#ifdef CONFIG_XICS
 static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
 {
 	pseries_kexec_cpu_down(crash_shutdown, secondary);
@@ -61,6 +62,12 @@ void __init setup_kexec_cpu_down_xics(void)
 {
 	ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
 }
+#else
+void __init setup_kexec_cpu_down_xics(void)
+{
+	BUG();
+}
+#endif
 
 static int __init pseries_kexec_setup(void)
 {
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index ca5f2e1..a925fbb 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -210,11 +210,18 @@ static void __init pseries_mpic_init_IRQ(void)
 	pseries_setup_i8259_cascade();
 }
 
+#ifdef CONFIG_XICS
 static void __init pseries_xics_init_IRQ(void)
 {
 	xics_init_IRQ();
 	pseries_setup_i8259_cascade();
 }
+#else
+static void __init pseries_xics_init_IRQ(void)
+{
+	BUG();
+}
+#endif
 
 static void pseries_lpar_enable_pmcs(void)
 {
diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h
index d1d5a83..d0a618d 100644
--- a/arch/powerpc/platforms/pseries/xics.h
+++ b/arch/powerpc/platforms/pseries/xics.h
@@ -16,8 +16,14 @@ extern void xics_init_IRQ(void);
 extern void xics_setup_cpu(void);
 extern void xics_teardown_cpu(void);
 extern void xics_kexec_teardown_cpu(int secondary);
-extern void xics_migrate_irqs_away(void);
 extern int smp_xics_probe(void);
 extern void smp_xics_message_pass(int target, int msg);
+#ifdef CONFIG_XICS
+extern void xics_migrate_irqs_away(void);
+#else
+static inline void xics_migrate_irqs_away(void)
+{
+	BUG();
+}
 
 #endif /* _POWERPC_KERNEL_XICS_H */
-- 
1.6.5

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
  2009-11-17 12:07 ` Mel Gorman
@ 2009-11-17 12:39   ` Michael Ellerman
  -1 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:39 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev,
	linux-kernel, Michael Neuling

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> it's not set, there are numerous small build errors. This is a small series
> of patches to allow CONFIG_XICS to be unset in the config.
> 
> XICS appears to be some sort of interrupt controller but I'm not sure how
> common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> universally requires CONFIG_XICS, the better path might be to force it to
> be set.

It is indeed 'some sort of interrupt controller' :)

All the virtualised PSERIES systems have, or appear to have, a XICS. So
it's pretty common.

I think the only time you see an MPIC is on older machines, and even
then maybe only if you're running bare metal.

So it is pretty much required for a PSERIES kernel, but perhaps there
are cases where the BML guys want to be able to turn it off.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-17 12:39   ` Michael Ellerman
  0 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:39 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Michael Neuling, Paul Mackerras, linux-kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> it's not set, there are numerous small build errors. This is a small series
> of patches to allow CONFIG_XICS to be unset in the config.
> 
> XICS appears to be some sort of interrupt controller but I'm not sure how
> common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> universally requires CONFIG_XICS, the better path might be to force it to
> be set.

It is indeed 'some sort of interrupt controller' :)

All the virtualised PSERIES systems have, or appear to have, a XICS. So
it's pretty common.

I think the only time you see an MPIC is on older machines, and even
then maybe only if you're running bare metal.

So it is pretty much required for a PSERIES kernel, but perhaps there
are cases where the BML guys want to be able to turn it off.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 1/4] powerpc: Add Kconfig dependency for PCI_MSI as needed by XICS
  2009-11-17 12:07   ` Mel Gorman
@ 2009-11-17 12:40     ` Michael Ellerman
  -1 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:40 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that
> happens, the kernel fails to build with
> 
> arch/powerpc/platforms/built-in.o: In function `.xics_startup':
> xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq'
> make: *** [.tmp_vmlinux1] Error 1
> 
> This patch adds the dependency in KConfig.

Actually we should ifdef the code instead, XICS doesn't require MSI -
that code chunk just needs to be conditional.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 1/4] powerpc: Add Kconfig dependency for PCI_MSI as needed by XICS
@ 2009-11-17 12:40     ` Michael Ellerman
  0 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:40 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Paul Mackerras, linux-kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that
> happens, the kernel fails to build with
> 
> arch/powerpc/platforms/built-in.o: In function `.xics_startup':
> xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq'
> make: *** [.tmp_vmlinux1] Error 1
> 
> This patch adds the dependency in KConfig.

Actually we should ifdef the code instead, XICS doesn't require MSI -
that code chunk just needs to be conditional.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure
  2009-11-17 12:07   ` Mel Gorman
@ 2009-11-17 12:45     ` Michael Ellerman
  -1 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:45 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> If CONFIG_XICS is not set but CONFIG_PPC_PSERIES is, then the kernel
> fails to build with
> 
> arch/powerpc/platforms/pseries/smp.c: In function ‘smp_init_pseries_xics’:
> arch/powerpc/platforms/pseries/smp.c:202: error: ‘pSeries_xics_smp_ops’ undeclared (first use in this function)
> arch/powerpc/platforms/pseries/smp.c:202: error: (Each undeclared identifier is reported only once
> arch/powerpc/platforms/pseries/smp.c:202: error: for each function it appears in.)
> make[2]: *** [arch/powerpc/platforms/pseries/smp.o] Error 1
> 
> As CONFIG_XICS is not always necessary, this patch allows the kernel to
> build but the system will panic at runtime if it is found that XICS is
> required.
> 
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> ---
>  arch/powerpc/platforms/pseries/smp.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
> index 440000c..da78ea5 100644
> --- a/arch/powerpc/platforms/pseries/smp.c
> +++ b/arch/powerpc/platforms/pseries/smp.c
> @@ -199,7 +199,11 @@ void __init smp_init_pseries_mpic(void)
>  
>  void __init smp_init_pseries_xics(void)
>  {
> +#ifdef CONFIG_XICS
>  	smp_ops = &pSeries_xics_smp_ops;
> +#else
> +	panic("Support for platform ppc-xicp not configured");
> +#endif
>  
>  	smp_init_pseries();
>  }

I think it'd be neater to just ifdef the whole block in
pseries_discover_pic(), or move it out and ifdef that. That'd avoid
referencing pseries_xics_init_IRQ() and setup_kexec_cpu_down_xics()
also.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure
@ 2009-11-17 12:45     ` Michael Ellerman
  0 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:45 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Paul Mackerras, linux-kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> If CONFIG_XICS is not set but CONFIG_PPC_PSERIES is, then the kernel
> fails to build with
> 
> arch/powerpc/platforms/pseries/smp.c: In function ‘smp_init_pseries_xics’:
> arch/powerpc/platforms/pseries/smp.c:202: error: ‘pSeries_xics_smp_ops’ undeclared (first use in this function)
> arch/powerpc/platforms/pseries/smp.c:202: error: (Each undeclared identifier is reported only once
> arch/powerpc/platforms/pseries/smp.c:202: error: for each function it appears in.)
> make[2]: *** [arch/powerpc/platforms/pseries/smp.o] Error 1
> 
> As CONFIG_XICS is not always necessary, this patch allows the kernel to
> build but the system will panic at runtime if it is found that XICS is
> required.
> 
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> ---
>  arch/powerpc/platforms/pseries/smp.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
> index 440000c..da78ea5 100644
> --- a/arch/powerpc/platforms/pseries/smp.c
> +++ b/arch/powerpc/platforms/pseries/smp.c
> @@ -199,7 +199,11 @@ void __init smp_init_pseries_mpic(void)
>  
>  void __init smp_init_pseries_xics(void)
>  {
> +#ifdef CONFIG_XICS
>  	smp_ops = &pSeries_xics_smp_ops;
> +#else
> +	panic("Support for platform ppc-xicp not configured");
> +#endif
>  
>  	smp_init_pseries();
>  }

I think it'd be neater to just ifdef the whole block in
pseries_discover_pic(), or move it out and ifdef that. That'd avoid
referencing pseries_xics_init_IRQ() and setup_kexec_cpu_down_xics()
also.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 3/4] powerpc: Only define smp_pSeries_cpu_bootable when CONFIG_XICS is set
  2009-11-17 12:07   ` Mel Gorman
@ 2009-11-17 12:47     ` Michael Ellerman
  -1 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:47 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> If CONFIG_XICS is set, then smp_pSeries_cpu_bootable() is unnecessary.
> As warnings are treated as errors, this fails to build.
> 
> This patch only defines smp_pSeries_cpu_bootable() when CONFIG_XICS is
> set.

I'm not sure, but I would guess that was just an oversight by whoever
added the cpu_bootable check. By which I mean it should be in the mpic
ops as well - avoiding the need for any ifdefery.

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 3/4] powerpc: Only define smp_pSeries_cpu_bootable when CONFIG_XICS is set
@ 2009-11-17 12:47     ` Michael Ellerman
  0 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:47 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Paul Mackerras, linux-kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> If CONFIG_XICS is set, then smp_pSeries_cpu_bootable() is unnecessary.
> As warnings are treated as errors, this fails to build.
> 
> This patch only defines smp_pSeries_cpu_bootable() when CONFIG_XICS is
> set.

I'm not sure, but I would guess that was just an oversight by whoever
added the cpu_bootable check. By which I mean it should be in the mpic
ops as well - avoiding the need for any ifdefery.

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
  2009-11-17 12:39   ` Michael Ellerman
@ 2009-11-17 12:52     ` Michael Ellerman
  -1 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:52 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Michael Neuling, Paul Mackerras, linux-kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]

On Tue, 2009-11-17 at 23:39 +1100, Michael Ellerman wrote:
> On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> > KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> > it's not set, there are numerous small build errors. This is a small series
> > of patches to allow CONFIG_XICS to be unset in the config.
> > 
> > XICS appears to be some sort of interrupt controller but I'm not sure how
> > common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> > universally requires CONFIG_XICS, the better path might be to force it to
> > be set.
> 
> It is indeed 'some sort of interrupt controller' :)
> 
> All the virtualised PSERIES systems have, or appear to have, a XICS. So
> it's pretty common.
> 
> I think the only time you see an MPIC is on older machines, and even
> then maybe only if you're running bare metal.
> 
> So it is pretty much required for a PSERIES kernel, but perhaps there
> are cases where the BML guys want to be able to turn it off.

In fact this series makes me wonder whether we can drop support for a
single kernel image with pseries XICS & MPIC support.

If we could drop that requirement we could have a single set of names,
ie. API, for the irq routines and build either the XICS or MPIC
versions.

That would avoid all the code that needs a setup_foo_xics() and
setup_foo_mpic() - it'd just be setup_foo(), implemented by either the
XICS or MPIC code.

cheers



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-17 12:52     ` Michael Ellerman
  0 siblings, 0 replies; 31+ messages in thread
From: Michael Ellerman @ 2009-11-17 12:52 UTC (permalink / raw)
  To: Mel Gorman; +Cc: linuxppc-dev, Michael Neuling, Paul Mackerras, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]

On Tue, 2009-11-17 at 23:39 +1100, Michael Ellerman wrote:
> On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> > KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> > it's not set, there are numerous small build errors. This is a small series
> > of patches to allow CONFIG_XICS to be unset in the config.
> > 
> > XICS appears to be some sort of interrupt controller but I'm not sure how
> > common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> > universally requires CONFIG_XICS, the better path might be to force it to
> > be set.
> 
> It is indeed 'some sort of interrupt controller' :)
> 
> All the virtualised PSERIES systems have, or appear to have, a XICS. So
> it's pretty common.
> 
> I think the only time you see an MPIC is on older machines, and even
> then maybe only if you're running bare metal.
> 
> So it is pretty much required for a PSERIES kernel, but perhaps there
> are cases where the BML guys want to be able to turn it off.

In fact this series makes me wonder whether we can drop support for a
single kernel image with pseries XICS & MPIC support.

If we could drop that requirement we could have a single set of names,
ie. API, for the irq routines and build either the XICS or MPIC
versions.

That would avoid all the code that needs a setup_foo_xics() and
setup_foo_mpic() - it'd just be setup_foo(), implemented by either the
XICS or MPIC code.

cheers



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
  2009-11-17 12:39   ` Michael Ellerman
@ 2009-11-17 13:25     ` Mel Gorman
  -1 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 13:25 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev,
	linux-kernel, Michael Neuling

On Tue, Nov 17, 2009 at 11:39:04PM +1100, Michael Ellerman wrote:
> On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> > KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> > it's not set, there are numerous small build errors. This is a small series
> > of patches to allow CONFIG_XICS to be unset in the config.
> > 
> > XICS appears to be some sort of interrupt controller but I'm not sure how
> > common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> > universally requires CONFIG_XICS, the better path might be to force it to
> > be set.
> 
> It is indeed 'some sort of interrupt controller' :)
> 
> All the virtualised PSERIES systems have, or appear to have, a XICS. So
> it's pretty common.
> 
> I think the only time you see an MPIC is on older machines, and even
> then maybe only if you're running bare metal.
> 
> So it is pretty much required for a PSERIES kernel, but perhaps there
> are cases where the BML guys want to be able to turn it off.
> 

Do you want to take ownership of the series as I'm a bit unclear on how
and when XICS should be used? If not, I don't mind fixing the series up
as you suggested but I wouldn't be in the best position to determine if
the final result is sensible or not.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-17 13:25     ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-17 13:25 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Michael Neuling, Paul Mackerras, linux-kernel, linuxppc-dev

On Tue, Nov 17, 2009 at 11:39:04PM +1100, Michael Ellerman wrote:
> On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> > KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> > it's not set, there are numerous small build errors. This is a small series
> > of patches to allow CONFIG_XICS to be unset in the config.
> > 
> > XICS appears to be some sort of interrupt controller but I'm not sure how
> > common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> > universally requires CONFIG_XICS, the better path might be to force it to
> > be set.
> 
> It is indeed 'some sort of interrupt controller' :)
> 
> All the virtualised PSERIES systems have, or appear to have, a XICS. So
> it's pretty common.
> 
> I think the only time you see an MPIC is on older machines, and even
> then maybe only if you're running bare metal.
> 
> So it is pretty much required for a PSERIES kernel, but perhaps there
> are cases where the BML guys want to be able to turn it off.
> 

Do you want to take ownership of the series as I'm a bit unclear on how
and when XICS should be used? If not, I don't mind fixing the series up
as you suggested but I wouldn't be in the best position to determine if
the final result is sensible or not.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
  2009-11-17 12:52     ` Michael Ellerman
  (?)
@ 2009-11-18  6:00     ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 31+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-18  6:00 UTC (permalink / raw)
  To: michael
  Cc: Mel Gorman, linuxppc-dev, Michael Neuling, Paul Mackerras, linux-kernel

On Tue, 2009-11-17 at 23:52 +1100, Michael Ellerman wrote:
> 
> In fact this series makes me wonder whether we can drop support for a
> single kernel image with pseries XICS & MPIC support.

Nope. Not happening. We should just hide CONFIG_XICS just like
CONFIG_MPIC, it should be select'ed by the platform (which today is only
pseries but that might change).

> If we could drop that requirement we could have a single set of names,
> ie. API, for the irq routines and build either the XICS or MPIC
> versions.

And so we would have the ability to build a kernel that supports in a
single binary every platform, as is the case today, ie, pseries,
powermac, pa6t, cell, etc... _BUT_ for pseries support, we would have to
choose at compile time whether to support old or new machines ? Sounds
backward to me :-)

> That would avoid all the code that needs a setup_foo_xics() and
> setup_foo_mpic() - it'd just be setup_foo(), implemented by either the
> XICS or MPIC code.

And that would save us what ? one page on a pSeries machine ? yeah !

Cheers,
Ben.


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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
  2009-11-17 12:07 ` Mel Gorman
@ 2009-11-18  6:05   ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 31+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-18  6:05 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> it's not set, there are numerous small build errors. This is a small series
> of patches to allow CONFIG_XICS to be unset in the config.
> 
> XICS appears to be some sort of interrupt controller but I'm not sure how
> common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> universally requires CONFIG_XICS, the better path might be to force it to
> be set.
> 
> Testing was building with make oldconfig a configuration from 2.6.31 on
> a PPC970.

CONFIG_XICS should be made invisible and selected by PSERIES.

Cheers,
Ben.



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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-18  6:05   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 31+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-18  6:05 UTC (permalink / raw)
  To: Mel Gorman; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> it's not set, there are numerous small build errors. This is a small series
> of patches to allow CONFIG_XICS to be unset in the config.
> 
> XICS appears to be some sort of interrupt controller but I'm not sure how
> common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> universally requires CONFIG_XICS, the better path might be to force it to
> be set.
> 
> Testing was building with make oldconfig a configuration from 2.6.31 on
> a PPC970.

CONFIG_XICS should be made invisible and selected by PSERIES.

Cheers,
Ben.

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
  2009-11-18  6:05   ` Benjamin Herrenschmidt
@ 2009-11-18 17:05     ` Mel Gorman
  -1 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-18 17:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel

On Wed, Nov 18, 2009 at 05:05:32PM +1100, Benjamin Herrenschmidt wrote:
> On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> > KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> > it's not set, there are numerous small build errors. This is a small series
> > of patches to allow CONFIG_XICS to be unset in the config.
> > 
> > XICS appears to be some sort of interrupt controller but I'm not sure how
> > common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> > universally requires CONFIG_XICS, the better path might be to force it to
> > be set.
> > 
> > Testing was building with make oldconfig a configuration from 2.6.31 on
> > a PPC970.
> 
> CONFIG_XICS should be made invisible and selected by PSERIES.
> 

Like so?

==== CUT HERE ====

powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES

It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that
happens, the kernel fails to build with

arch/powerpc/platforms/built-in.o: In function `.xics_startup':
xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq'
make: *** [.tmp_vmlinux1] Error 1

Furthermore, as noted by Benjamin Herrenschmidt, "CONFIG_XICS should be
made invisible and selected by PSERIES."

This patch adds the dependency in KConfig for XICS on PCI_MSI. When
PSERIES support is being configured, both options are silently selected.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
--- 
 arch/powerpc/platforms/Kconfig         |    4 ++--
 arch/powerpc/platforms/pseries/Kconfig |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 04a8061..a82c470 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -52,9 +52,9 @@ config PPC_UDBG_BEAT
 	default n
 
 config XICS
-	depends on PPC_PSERIES
+	depends on PCI_MSI
 	bool
-	default y
+	default n
 
 config IPIC
 	bool
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index f0e6f28..81c2289 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -5,6 +5,8 @@ config PPC_PSERIES
 	select PPC_I8259
 	select PPC_RTAS
 	select RTAS_ERROR_LOGGING
+	select PCI_MSI
+	select XICS
 	select PPC_UDBG_16550
 	select PPC_NATIVE
 	select PPC_PCI_CHOICE if EMBEDDED

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-18 17:05     ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-18 17:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Wed, Nov 18, 2009 at 05:05:32PM +1100, Benjamin Herrenschmidt wrote:
> On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> > KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> > it's not set, there are numerous small build errors. This is a small series
> > of patches to allow CONFIG_XICS to be unset in the config.
> > 
> > XICS appears to be some sort of interrupt controller but I'm not sure how
> > common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> > universally requires CONFIG_XICS, the better path might be to force it to
> > be set.
> > 
> > Testing was building with make oldconfig a configuration from 2.6.31 on
> > a PPC970.
> 
> CONFIG_XICS should be made invisible and selected by PSERIES.
> 

Like so?

==== CUT HERE ====

powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES

It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that
happens, the kernel fails to build with

arch/powerpc/platforms/built-in.o: In function `.xics_startup':
xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq'
make: *** [.tmp_vmlinux1] Error 1

Furthermore, as noted by Benjamin Herrenschmidt, "CONFIG_XICS should be
made invisible and selected by PSERIES."

This patch adds the dependency in KConfig for XICS on PCI_MSI. When
PSERIES support is being configured, both options are silently selected.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
--- 
 arch/powerpc/platforms/Kconfig         |    4 ++--
 arch/powerpc/platforms/pseries/Kconfig |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 04a8061..a82c470 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -52,9 +52,9 @@ config PPC_UDBG_BEAT
 	default n
 
 config XICS
-	depends on PPC_PSERIES
+	depends on PCI_MSI
 	bool
-	default y
+	default n
 
 config IPIC
 	bool
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index f0e6f28..81c2289 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -5,6 +5,8 @@ config PPC_PSERIES
 	select PPC_I8259
 	select PPC_RTAS
 	select RTAS_ERROR_LOGGING
+	select PCI_MSI
+	select XICS
 	select PPC_UDBG_16550
 	select PPC_NATIVE
 	select PPC_PCI_CHOICE if EMBEDDED

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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
  2009-11-18 17:05     ` Mel Gorman
@ 2009-11-27  2:40       ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 31+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-27  2:40 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel

On Wed, 2009-11-18 at 17:05 +0000, Mel Gorman wrote:

> 
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 04a8061..a82c470 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -52,9 +52,9 @@ config PPC_UDBG_BEAT
>  	default n
>  
>  config XICS
> -	depends on PPC_PSERIES
> +	depends on PCI_MSI
>  	bool
> -	default y
> +	default n

Why the above ? XICS only exist on PSERIES and select bypass depends in
nasty ways anyways.

>  config IPIC
>  	bool
> diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
> index f0e6f28..81c2289 100644
> --- a/arch/powerpc/platforms/pseries/Kconfig
> +++ b/arch/powerpc/platforms/pseries/Kconfig
> @@ -5,6 +5,8 @@ config PPC_PSERIES
>  	select PPC_I8259
>  	select PPC_RTAS
>  	select RTAS_ERROR_LOGGING
> +	select PCI_MSI
> +	select XICS
>  	select PPC_UDBG_16550
>  	select PPC_NATIVE
>  	select PPC_PCI_CHOICE if EMBEDDED

The above bits look plenty enough. Can you also stick it next to the
MPIC one ?

Cheers,
Ben.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



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

* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
@ 2009-11-27  2:40       ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 31+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-27  2:40 UTC (permalink / raw)
  To: Mel Gorman; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Wed, 2009-11-18 at 17:05 +0000, Mel Gorman wrote:

> 
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 04a8061..a82c470 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -52,9 +52,9 @@ config PPC_UDBG_BEAT
>  	default n
>  
>  config XICS
> -	depends on PPC_PSERIES
> +	depends on PCI_MSI
>  	bool
> -	default y
> +	default n

Why the above ? XICS only exist on PSERIES and select bypass depends in
nasty ways anyways.

>  config IPIC
>  	bool
> diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
> index f0e6f28..81c2289 100644
> --- a/arch/powerpc/platforms/pseries/Kconfig
> +++ b/arch/powerpc/platforms/pseries/Kconfig
> @@ -5,6 +5,8 @@ config PPC_PSERIES
>  	select PPC_I8259
>  	select PPC_RTAS
>  	select RTAS_ERROR_LOGGING
> +	select PCI_MSI
> +	select XICS
>  	select PPC_UDBG_16550
>  	select PPC_NATIVE
>  	select PPC_PCI_CHOICE if EMBEDDED

The above bits look plenty enough. Can you also stick it next to the
MPIC one ?

Cheers,
Ben.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* [PATCH] powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES
  2009-11-27  2:40       ` Benjamin Herrenschmidt
@ 2009-11-27 16:33         ` Mel Gorman
  -1 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-27 16:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel

On Fri, Nov 27, 2009 at 01:40:26PM +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2009-11-18 at 17:05 +0000, Mel Gorman wrote:
> 
> > 
> > diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> > index 04a8061..a82c470 100644
> > --- a/arch/powerpc/platforms/Kconfig
> > +++ b/arch/powerpc/platforms/Kconfig
> > @@ -52,9 +52,9 @@ config PPC_UDBG_BEAT
> >  	default n
> >  
> >  config XICS
> > -	depends on PPC_PSERIES
> > +	depends on PCI_MSI
> >  	bool
> > -	default y
> > +	default n
> 
> Why the above ? XICS only exist on PSERIES and select bypass depends in
> nasty ways anyways.
> 

You're right. When I made that change, I assumed that a "select foo"
would also resolve the dependencies. It doesn't but I failed to back
this out as being unnecessary.

> >  config IPIC
> >  	bool
> > diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
> > index f0e6f28..81c2289 100644
> > --- a/arch/powerpc/platforms/pseries/Kconfig
> > +++ b/arch/powerpc/platforms/pseries/Kconfig
> > @@ -5,6 +5,8 @@ config PPC_PSERIES
> >  	select PPC_I8259
> >  	select PPC_RTAS
> >  	select RTAS_ERROR_LOGGING
> > +	select PCI_MSI
> > +	select XICS
> >  	select PPC_UDBG_16550
> >  	select PPC_NATIVE
> >  	select PPC_PCI_CHOICE if EMBEDDED
> 
> The above bits look plenty enough. Can you also stick it next to the
> MPIC one ?
> 

They are. I can.

==== CUT HERE ====
powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES

It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that happens,
the kernel fails to build with

arch/powerpc/platforms/built-in.o: In function `.xics_startup':
xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq' make: ***
[.tmp_vmlinux1] Error 1

Furthermore, as noted by Benjamin Herrenschmidt, "CONFIG_XICS should be
made invisible and selected by PSERIES."

This patch adds the dependency in KConfig for XICS on PCI_MSI. When PSERIES
support is being configured, both options are silently selected.

Signed-off-by: Mel Gorman <mel[at]csn.ul.ie>
---
 arch/powerpc/platforms/pseries/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index f0e6f28..60d53ed 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -2,6 +2,8 @@ config PPC_PSERIES
 	depends on PPC64 && PPC_BOOK3S
 	bool "IBM pSeries & new (POWER5-based) iSeries"
 	select MPIC
+	select PCI_MSI
+	select XICS
 	select PPC_I8259
 	select PPC_RTAS
 	select RTAS_ERROR_LOGGING

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

* [PATCH] powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES
@ 2009-11-27 16:33         ` Mel Gorman
  0 siblings, 0 replies; 31+ messages in thread
From: Mel Gorman @ 2009-11-27 16:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Fri, Nov 27, 2009 at 01:40:26PM +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2009-11-18 at 17:05 +0000, Mel Gorman wrote:
> 
> > 
> > diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> > index 04a8061..a82c470 100644
> > --- a/arch/powerpc/platforms/Kconfig
> > +++ b/arch/powerpc/platforms/Kconfig
> > @@ -52,9 +52,9 @@ config PPC_UDBG_BEAT
> >  	default n
> >  
> >  config XICS
> > -	depends on PPC_PSERIES
> > +	depends on PCI_MSI
> >  	bool
> > -	default y
> > +	default n
> 
> Why the above ? XICS only exist on PSERIES and select bypass depends in
> nasty ways anyways.
> 

You're right. When I made that change, I assumed that a "select foo"
would also resolve the dependencies. It doesn't but I failed to back
this out as being unnecessary.

> >  config IPIC
> >  	bool
> > diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
> > index f0e6f28..81c2289 100644
> > --- a/arch/powerpc/platforms/pseries/Kconfig
> > +++ b/arch/powerpc/platforms/pseries/Kconfig
> > @@ -5,6 +5,8 @@ config PPC_PSERIES
> >  	select PPC_I8259
> >  	select PPC_RTAS
> >  	select RTAS_ERROR_LOGGING
> > +	select PCI_MSI
> > +	select XICS
> >  	select PPC_UDBG_16550
> >  	select PPC_NATIVE
> >  	select PPC_PCI_CHOICE if EMBEDDED
> 
> The above bits look plenty enough. Can you also stick it next to the
> MPIC one ?
> 

They are. I can.

==== CUT HERE ====
powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES

It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that happens,
the kernel fails to build with

arch/powerpc/platforms/built-in.o: In function `.xics_startup':
xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq' make: ***
[.tmp_vmlinux1] Error 1

Furthermore, as noted by Benjamin Herrenschmidt, "CONFIG_XICS should be
made invisible and selected by PSERIES."

This patch adds the dependency in KConfig for XICS on PCI_MSI. When PSERIES
support is being configured, both options are silently selected.

Signed-off-by: Mel Gorman <mel[at]csn.ul.ie>
---
 arch/powerpc/platforms/pseries/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index f0e6f28..60d53ed 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -2,6 +2,8 @@ config PPC_PSERIES
 	depends on PPC64 && PPC_BOOK3S
 	bool "IBM pSeries & new (POWER5-based) iSeries"
 	select MPIC
+	select PCI_MSI
+	select XICS
 	select PPC_I8259
 	select PPC_RTAS
 	select RTAS_ERROR_LOGGING

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

end of thread, other threads:[~2009-11-27 16:34 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-17 12:07 [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set Mel Gorman
2009-11-17 12:07 ` Mel Gorman
2009-11-17 12:07 ` [PATCH 1/4] powerpc: Add Kconfig dependency for PCI_MSI as needed by XICS Mel Gorman
2009-11-17 12:07   ` Mel Gorman
2009-11-17 12:40   ` Michael Ellerman
2009-11-17 12:40     ` Michael Ellerman
2009-11-17 12:07 ` [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure Mel Gorman
2009-11-17 12:07   ` Mel Gorman
2009-11-17 12:45   ` Michael Ellerman
2009-11-17 12:45     ` Michael Ellerman
2009-11-17 12:07 ` [PATCH 3/4] powerpc: Only define smp_pSeries_cpu_bootable when CONFIG_XICS is set Mel Gorman
2009-11-17 12:07   ` Mel Gorman
2009-11-17 12:47   ` Michael Ellerman
2009-11-17 12:47     ` Michael Ellerman
2009-11-17 12:07 ` [PATCH 4/4] powerpc: Avoid reference to XICS-related functions when CONFIG_XICS is not set Mel Gorman
2009-11-17 12:07   ` Mel Gorman
2009-11-17 12:39 ` [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set Michael Ellerman
2009-11-17 12:39   ` Michael Ellerman
2009-11-17 12:52   ` Michael Ellerman
2009-11-17 12:52     ` Michael Ellerman
2009-11-18  6:00     ` Benjamin Herrenschmidt
2009-11-17 13:25   ` Mel Gorman
2009-11-17 13:25     ` Mel Gorman
2009-11-18  6:05 ` Benjamin Herrenschmidt
2009-11-18  6:05   ` Benjamin Herrenschmidt
2009-11-18 17:05   ` Mel Gorman
2009-11-18 17:05     ` Mel Gorman
2009-11-27  2:40     ` Benjamin Herrenschmidt
2009-11-27  2:40       ` Benjamin Herrenschmidt
2009-11-27 16:33       ` [PATCH] powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES Mel Gorman
2009-11-27 16:33         ` Mel Gorman

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.