linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
@ 2016-05-30  6:18 Rashmica Gupta
  2016-05-30  6:18 ` [PATCH 2/5] powerpc/pseries: Remove MPIC from pseries smp Rashmica Gupta
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Rashmica Gupta @ 2016-05-30  6:18 UTC (permalink / raw)
  To: mpe, benh, paulus, nfont; +Cc: linuxppc-dev

MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.

Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
---
 arch/powerpc/platforms/pseries/setup.c | 77 +++-------------------------------
 1 file changed, 5 insertions(+), 72 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 9883bc7ea007..f83ac9be7f34 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -57,7 +57,6 @@
 #include <asm/time.h>
 #include <asm/nvram.h>
 #include <asm/pmc.h>
-#include <asm/mpic.h>
 #include <asm/xics.h>
 #include <asm/ppc-pci.h>
 #include <asm/i8259.h>
@@ -77,8 +76,6 @@ EXPORT_SYMBOL(CMO_PageSize);
 
 int fwnmi_active;  /* TRUE if an FWNMI handler is present */
 
-static struct device_node *pSeries_mpic_node;
-
 static void pSeries_show_cpuinfo(struct seq_file *m)
 {
 	struct device_node *root;
@@ -172,48 +169,7 @@ static void __init pseries_setup_i8259_cascade(void)
 	irq_set_chained_handler(cascade, pseries_8259_cascade);
 }
 
-static void __init pseries_mpic_init_IRQ(void)
-{
-	struct device_node *np;
-	const unsigned int *opprop;
-	unsigned long openpic_addr = 0;
-	int naddr, n, i, opplen;
-	struct mpic *mpic;
-
-	np = of_find_node_by_path("/");
-	naddr = of_n_addr_cells(np);
-	opprop = of_get_property(np, "platform-open-pic", &opplen);
-	if (opprop != NULL) {
-		openpic_addr = of_read_number(opprop, naddr);
-		printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
-	}
-	of_node_put(np);
-
-	BUG_ON(openpic_addr == 0);
-
-	/* Setup the openpic driver */
-	mpic = mpic_alloc(pSeries_mpic_node, openpic_addr,
-			MPIC_NO_RESET, 16, 0, " MPIC     ");
-	BUG_ON(mpic == NULL);
-
-	/* Add ISUs */
-	opplen /= sizeof(u32);
-	for (n = 0, i = naddr; i < opplen; i += naddr, n++) {
-		unsigned long isuaddr = of_read_number(opprop + i, naddr);
-		mpic_assign_isu(mpic, n, isuaddr);
-	}
-
-	/* Setup top-level get_irq */
-	ppc_md.get_irq = mpic_get_irq;
-
-	/* All ISUs are setup, complete initialization */
-	mpic_init(mpic);
-
-	/* Look for cascade */
-	pseries_setup_i8259_cascade();
-}
-
-static void __init pseries_xics_init_IRQ(void)
+static void __init pSeries_init_IRQ(void)
 {
 	xics_init();
 	pseries_setup_i8259_cascade();
@@ -228,32 +184,6 @@ static void pseries_lpar_enable_pmcs(void)
 	plpar_hcall_norets(H_PERFMON, set, reset);
 }
 
-static void __init pseries_discover_pic(void)
-{
-	struct device_node *np;
-	const char *typep;
-
-	for_each_node_by_name(np, "interrupt-controller") {
-		typep = of_get_property(np, "compatible", NULL);
-		if (!typep)
-			continue;
-		if (strstr(typep, "open-pic")) {
-			pSeries_mpic_node = of_node_get(np);
-			ppc_md.init_IRQ       = pseries_mpic_init_IRQ;
-			setup_kexec_cpu_down_mpic();
-			smp_init_pseries_mpic();
-			return;
-		} else if (strstr(typep, "ppc-xicp")) {
-			ppc_md.init_IRQ       = pseries_xics_init_IRQ;
-			setup_kexec_cpu_down_xics();
-			smp_init_pseries_xics();
-			return;
-		}
-	}
-	printk(KERN_ERR "pSeries_discover_pic: failed to recognize"
-	       " interrupt-controller\n");
-}
-
 static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *data)
 {
 	struct of_reconfig_data *rd = data;
@@ -506,7 +436,9 @@ static void __init pSeries_setup_arch(void)
 	set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
 
 	/* Discover PIC type and setup ppc_md accordingly */
-	pseries_discover_pic();
+	setup_kexec_cpu_down_xics();
+	smp_init_pseries_xics();
+
 
 	/* openpic global configuration register (64-bit format). */
 	/* openpic Interrupt Source Unit pointer (64-bit format). */
@@ -838,6 +770,7 @@ define_machine(pseries) {
 	.probe			= pSeries_probe,
 	.setup_arch		= pSeries_setup_arch,
 	.init_early		= pSeries_init_early,
+	.init_IRQ		= pSeries_init_IRQ,
 	.show_cpuinfo		= pSeries_show_cpuinfo,
 	.log_error		= pSeries_log_error,
 	.pcibios_fixup		= pSeries_final_fixup,
-- 
2.5.0

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

* [PATCH 2/5] powerpc/pseries: Remove MPIC from pseries smp
  2016-05-30  6:18 [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Rashmica Gupta
@ 2016-05-30  6:18 ` Rashmica Gupta
  2016-05-30  6:18 ` [PATCH 3/5] powerpc/pseries: Remove MPIC from pseries kexec Rashmica Gupta
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Rashmica Gupta @ 2016-05-30  6:18 UTC (permalink / raw)
  To: mpe, benh, paulus, nfont; +Cc: linuxppc-dev

MPIC was only used by Power3 which is now unsupported, so remove MPIC
code. XICS is now the only supported interrupt controller for
pSeries so do some cleanups too.

Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
---
 arch/powerpc/platforms/pseries/pseries.h |  6 ++----
 arch/powerpc/platforms/pseries/setup.c   |  2 +-
 arch/powerpc/platforms/pseries/smp.c     | 31 +++++--------------------------
 3 files changed, 8 insertions(+), 31 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 7aa83f00ac62..edeaec74b656 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -31,11 +31,9 @@ extern int pSeries_system_reset_exception(struct pt_regs *regs);
 extern int pSeries_machine_check_exception(struct pt_regs *regs);
 
 #ifdef CONFIG_SMP
-extern void smp_init_pseries_mpic(void);
-extern void smp_init_pseries_xics(void);
+extern void smp_init_pseries(void);
 #else
-static inline void smp_init_pseries_mpic(void) { };
-static inline void smp_init_pseries_xics(void) { };
+static inline void smp_init_pseries(void) { };
 #endif
 
 #ifdef CONFIG_KEXEC
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index f83ac9be7f34..32a224d3eaa1 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -437,7 +437,7 @@ static void __init pSeries_setup_arch(void)
 
 	/* Discover PIC type and setup ppc_md accordingly */
 	setup_kexec_cpu_down_xics();
-	smp_init_pseries_xics();
+	smp_init_pseries();
 
 
 	/* openpic global configuration register (64-bit format). */
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 6932ea803e33..93a8a67006c7 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -38,7 +38,6 @@
 #include <asm/cputable.h>
 #include <asm/firmware.h>
 #include <asm/rtas.h>
-#include <asm/mpic.h>
 #include <asm/vdso_datapage.h>
 #include <asm/cputhreads.h>
 #include <asm/xics.h>
@@ -140,7 +139,7 @@ out:
 	return 1;
 }
 
-static void smp_xics_setup_cpu(int cpu)
+static void smp_setup_cpu(int cpu)
 {
 	if (cpu != boot_cpuid)
 		xics_setup_cpu();
@@ -207,28 +206,22 @@ static __init void pSeries_smp_probe(void)
 	}
 }
 
-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,
-};
-
-static struct smp_ops_t pSeries_xics_smp_ops = {
+static struct smp_ops_t pSeries_smp_ops = {
 	.message_pass	= NULL,	/* Use smp_muxed_ipi_message_pass */
 	.cause_ipi	= NULL,	/* Filled at runtime by pSeries_smp_probe() */
 	.probe		= pSeries_smp_probe,
 	.kick_cpu	= smp_pSeries_kick_cpu,
-	.setup_cpu	= smp_xics_setup_cpu,
+	.setup_cpu	= smp_setup_cpu,
 	.cpu_bootable	= smp_generic_cpu_bootable,
 };
 
 /* This is called very early */
-static void __init smp_init_pseries(void)
+void __init smp_init_pseries(void)
 {
 	int i;
 
 	pr_debug(" -> smp_init_pSeries()\n");
+	smp_ops = &pSeries_smp_ops;
 
 	alloc_bootmem_cpumask_var(&of_spin_mask);
 
@@ -258,17 +251,3 @@ static void __init smp_init_pseries(void)
 
 	pr_debug(" <- smp_init_pSeries()\n");
 }
-
-void __init smp_init_pseries_mpic(void)
-{
-	smp_ops = &pSeries_mpic_smp_ops;
-
-	smp_init_pseries();
-}
-
-void __init smp_init_pseries_xics(void)
-{
-	smp_ops = &pSeries_xics_smp_ops;
-
-	smp_init_pseries();
-}
-- 
2.5.0

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

* [PATCH 3/5] powerpc/pseries: Remove MPIC from pseries kexec
  2016-05-30  6:18 [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Rashmica Gupta
  2016-05-30  6:18 ` [PATCH 2/5] powerpc/pseries: Remove MPIC from pseries smp Rashmica Gupta
@ 2016-05-30  6:18 ` Rashmica Gupta
  2016-05-30  6:18 ` [PATCH 4/5] powerpc/pseries: Remove MPIC from pseries cpu hotplug Rashmica Gupta
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Rashmica Gupta @ 2016-05-30  6:18 UTC (permalink / raw)
  To: mpe, benh, paulus, nfont; +Cc: linuxppc-dev

MPIC was only used by Power3 which is now unsupported, so remove MPIC
code. XICS is now the only supported interrupt controller for
pSeries so do some cleanups too.

Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
---
 arch/powerpc/platforms/pseries/kexec.c   | 23 +----------------------
 arch/powerpc/platforms/pseries/pseries.h |  8 +-------
 arch/powerpc/platforms/pseries/setup.c   |  2 +-
 3 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
index 13fa95b3aa8b..f7a93e6bb630 100644
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -14,14 +14,13 @@
 #include <asm/page.h>
 #include <asm/firmware.h>
 #include <asm/kexec.h>
-#include <asm/mpic.h>
 #include <asm/xics.h>
 #include <asm/smp.h>
 #include <asm/plpar_wrappers.h>
 
 #include "pseries.h"
 
-static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
+void pSeries_kexec_cpu_down(int crash_shutdown, int secondary)
 {
 	/* Don't risk a hypervisor call if we're crashing */
 	if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
@@ -51,26 +50,6 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
 			       "(hw %d) failed with %d\n", cpu, hwcpu, ret);
 		}
 	}
-}
-
-static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
-{
-	pseries_kexec_cpu_down(crash_shutdown, secondary);
-	mpic_teardown_this_cpu(secondary);
-}
 
-void __init setup_kexec_cpu_down_mpic(void)
-{
-	ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
-}
-
-static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
-{
-	pseries_kexec_cpu_down(crash_shutdown, secondary);
 	xics_kexec_teardown_cpu(secondary);
 }
-
-void __init setup_kexec_cpu_down_xics(void)
-{
-	ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
-}
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index edeaec74b656..d81aa1e08478 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -36,13 +36,7 @@ extern void smp_init_pseries(void);
 static inline void smp_init_pseries(void) { };
 #endif
 
-#ifdef CONFIG_KEXEC
-extern void setup_kexec_cpu_down_xics(void);
-extern void setup_kexec_cpu_down_mpic(void);
-#else
-static inline void setup_kexec_cpu_down_xics(void) { }
-static inline void setup_kexec_cpu_down_mpic(void) { }
-#endif
+extern void pSeries_kexec_cpu_down(int crash_shutdown, int secondary);
 
 extern void pSeries_final_fixup(void);
 
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 32a224d3eaa1..15ca3441cf1d 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -436,7 +436,6 @@ static void __init pSeries_setup_arch(void)
 	set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
 
 	/* Discover PIC type and setup ppc_md accordingly */
-	setup_kexec_cpu_down_xics();
 	smp_init_pseries();
 
 
@@ -786,6 +785,7 @@ define_machine(pseries) {
 	.machine_check_exception = pSeries_machine_check_exception,
 #ifdef CONFIG_KEXEC
 	.machine_kexec          = pSeries_machine_kexec,
+	.kexec_cpu_down         = pSeries_kexec_cpu_down,
 #endif
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
 	.memory_block_size	= pseries_memory_block_size,
-- 
2.5.0

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

* [PATCH 4/5] powerpc/pseries: Remove MPIC from pseries cpu hotplug
  2016-05-30  6:18 [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Rashmica Gupta
  2016-05-30  6:18 ` [PATCH 2/5] powerpc/pseries: Remove MPIC from pseries smp Rashmica Gupta
  2016-05-30  6:18 ` [PATCH 3/5] powerpc/pseries: Remove MPIC from pseries kexec Rashmica Gupta
@ 2016-05-30  6:18 ` Rashmica Gupta
  2016-05-30  6:18 ` [PATCH 5/5] powerpc/pseries: Remove MPIC from pseries event sources Rashmica Gupta
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Rashmica Gupta @ 2016-05-30  6:18 UTC (permalink / raw)
  To: mpe, benh, paulus, nfont; +Cc: linuxppc-dev

MPIC was only used by Power3 which is now unsupported, so remove MPIC
code.

Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
---
 arch/powerpc/platforms/pseries/hotplug-cpu.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 282837a1d74b..a1b63e00b2f7 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -903,8 +903,6 @@ static int parse_cede_parameters(void)
 
 static int __init pseries_cpu_hotplug_init(void)
 {
-	struct device_node *np;
-	const char *typep;
 	int cpu;
 	int qcss_tok;
 
@@ -913,17 +911,6 @@ static int __init pseries_cpu_hotplug_init(void)
 	ppc_md.cpu_release = dlpar_cpu_release;
 #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */
 
-	for_each_node_by_name(np, "interrupt-controller") {
-		typep = of_get_property(np, "compatible", NULL);
-		if (strstr(typep, "open-pic")) {
-			of_node_put(np);
-
-			printk(KERN_INFO "CPU Hotplug not supported on "
-				"systems using MPIC\n");
-			return 0;
-		}
-	}
-
 	rtas_stop_self_token = rtas_token("stop-self");
 	qcss_tok = rtas_token("query-cpu-stopped-state");
 
-- 
2.5.0

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

* [PATCH 5/5] powerpc/pseries: Remove MPIC from pseries event sources
  2016-05-30  6:18 [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Rashmica Gupta
                   ` (2 preceding siblings ...)
  2016-05-30  6:18 ` [PATCH 4/5] powerpc/pseries: Remove MPIC from pseries cpu hotplug Rashmica Gupta
@ 2016-05-30  6:18 ` Rashmica Gupta
  2016-05-30  7:32 ` [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Benjamin Herrenschmidt
  2016-06-15 12:39 ` [1/5] " Michael Ellerman
  5 siblings, 0 replies; 13+ messages in thread
From: Rashmica Gupta @ 2016-05-30  6:18 UTC (permalink / raw)
  To: mpe, benh, paulus, nfont; +Cc: linuxppc-dev

MPIC was only used by Power3 which is now unsupported, so remove MPIC
code. XICS is now the only supported interrupt controller for
pSeries so do some cleanups too.

Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
---
 arch/powerpc/platforms/pseries/event_sources.c | 53 +++++++-------------------
 1 file changed, 13 insertions(+), 40 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c
index 18380e8f6dfe..a6ddca833119 100644
--- a/arch/powerpc/platforms/pseries/event_sources.c
+++ b/arch/powerpc/platforms/pseries/event_sources.c
@@ -26,48 +26,21 @@ void request_event_sources_irqs(struct device_node *np,
 {
 	int i, index, count = 0;
 	struct of_phandle_args oirq;
-	const u32 *opicprop;
-	unsigned int opicplen;
 	unsigned int virqs[16];
 
-	/* Check for obsolete "open-pic-interrupt" property. If present, then
-	 * map those interrupts using the default interrupt host and default
-	 * trigger
-	 */
-	opicprop = of_get_property(np, "open-pic-interrupt", &opicplen);
-	if (opicprop) {
-		opicplen /= sizeof(u32);
-		for (i = 0; i < opicplen; i++) {
-			if (count > 15)
-				break;
-			virqs[count] = irq_create_mapping(NULL, *(opicprop++));
-			if (virqs[count] == NO_IRQ) {
-				pr_err("event-sources: Unable to allocate "
-				       "interrupt number for %s\n",
-				       np->full_name);
-				WARN_ON(1);
-			}
-			else
-				count++;
-
-		}
-	}
-	/* Else use normal interrupt tree parsing */
-	else {
-		/* First try to do a proper OF tree parsing */
-		for (index = 0; of_irq_parse_one(np, index, &oirq) == 0;
-		     index++) {
-			if (count > 15)
-				break;
-			virqs[count] = irq_create_of_mapping(&oirq);
-			if (virqs[count] == NO_IRQ) {
-				pr_err("event-sources: Unable to allocate "
-				       "interrupt number for %s\n",
-				       np->full_name);
-				WARN_ON(1);
-			}
-			else
-				count++;
+	/* First try to do a proper OF tree parsing */
+	for (index = 0; of_irq_parse_one(np, index, &oirq) == 0;
+	     index++) {
+		if (count > 15)
+			break;
+		virqs[count] = irq_create_of_mapping(&oirq);
+		if (virqs[count] == NO_IRQ) {
+			pr_err("event-sources: Unable to allocate "
+			       "interrupt number for %s\n",
+			       np->full_name);
+			WARN_ON(1);
+		} else {
+			count++;
 		}
 	}
 
-- 
2.5.0

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

* Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-30  6:18 [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Rashmica Gupta
                   ` (3 preceding siblings ...)
  2016-05-30  6:18 ` [PATCH 5/5] powerpc/pseries: Remove MPIC from pseries event sources Rashmica Gupta
@ 2016-05-30  7:32 ` Benjamin Herrenschmidt
  2016-05-31  1:34   ` Rashmica
  2016-06-15 12:39 ` [1/5] " Michael Ellerman
  5 siblings, 1 reply; 13+ messages in thread
From: Benjamin Herrenschmidt @ 2016-05-30  7:32 UTC (permalink / raw)
  To: Rashmica Gupta, mpe, paulus, nfont; +Cc: linuxppc-dev

On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
> MPIC was only used by Power3 which is now unsupported, so drop support
> for MPIC. XICS is now the only supported interrupt controller for
> pSeries so make the XICS functions generic.

The second half I'm not sure ... XIVE is around the corner...

Cheers,
Ben.

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

* Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-30  7:32 ` [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Benjamin Herrenschmidt
@ 2016-05-31  1:34   ` Rashmica
  2016-05-31  2:48     ` Rashmica
  2016-05-31  3:00     ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 13+ messages in thread
From: Rashmica @ 2016-05-31  1:34 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, mpe, paulus, nfont; +Cc: linuxppc-dev



On 30/05/16 17:32, Benjamin Herrenschmidt wrote:
> On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
>> MPIC was only used by Power3 which is now unsupported, so drop support
>> for MPIC. XICS is now the only supported interrupt controller for
>> pSeries so make the XICS functions generic.
> The second half I'm not sure ... XIVE is around the corner...
>
> Cheers,
> Ben.
>
I thought XIVE was replacing XICS? And so then we can just simply 
replace all the specific XICS code such as xics_init() and 
xics_smp_probe() with the relevant XIVE functions?

By "make the XICS functions generic" I meant that if there is only one 
interrupt controller for pseries then we don't need to have both static 
void __init pseries_xics_init_IRQ(void) and static void __init 
pSeries_init_IRQ(void), etc.

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

* Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-31  1:34   ` Rashmica
@ 2016-05-31  2:48     ` Rashmica
  2016-05-31  4:52       ` Benjamin Herrenschmidt
  2016-05-31  5:04       ` Michael Ellerman
  2016-05-31  3:00     ` Benjamin Herrenschmidt
  1 sibling, 2 replies; 13+ messages in thread
From: Rashmica @ 2016-05-31  2:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, mpe, paulus, nfont; +Cc: linuxppc-dev



On 31/05/16 11:34, Rashmica wrote:
>
>
> On 30/05/16 17:32, Benjamin Herrenschmidt wrote:
>> On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
>>> MPIC was only used by Power3 which is now unsupported, so drop support
>>> for MPIC. XICS is now the only supported interrupt controller for
>>> pSeries so make the XICS functions generic.
>> The second half I'm not sure ... XIVE is around the corner...
>>
>> Cheers,
>> Ben.
>>
> I thought XIVE was replacing XICS? And so then we can just simply 
> replace all the specific XICS code such as xics_init() and 
> xics_smp_probe() with the relevant XIVE functions?
>
> By "make the XICS functions generic" I meant that if there is only one 
> interrupt controller for pseries then we don't need to have both 
> static void __init pseries_xics_init_IRQ(void) and static void __init 
> pSeries_init_IRQ(void), etc.

Oliver just informed me that it is only replacing XICS for p9. Should I 
leave this for the person adding in the XIVE code?

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

* Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-31  1:34   ` Rashmica
  2016-05-31  2:48     ` Rashmica
@ 2016-05-31  3:00     ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 13+ messages in thread
From: Benjamin Herrenschmidt @ 2016-05-31  3:00 UTC (permalink / raw)
  To: Rashmica, mpe, paulus, nfont; +Cc: linuxppc-dev

On Tue, 2016-05-31 at 11:34 +1000, Rashmica wrote:
> 
> On 30/05/16 17:32, Benjamin Herrenschmidt wrote:
> > 
> > On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
> > > 
> > > MPIC was only used by Power3 which is now unsupported, so drop support
> > > for MPIC. XICS is now the only supported interrupt controller for
> > > pSeries so make the XICS functions generic.
> > The second half I'm not sure ... XIVE is around the corner...
> > 
> > Cheers,
> > Ben.
> > 
> I thought XIVE was replacing XICS? And so then we can just simply 
> replace all the specific XICS code such as xics_init() and 
> xics_smp_probe() with the relevant XIVE functions?

We still need to boot on P8 that doesn't have XIVE, so we need to
support both. IE, the same way we had to chose at runtime between MPIC
and XICS, we'll now have to chose between XICS and XIVE.

> By "make the XICS functions generic" I meant that if there is only one 
> interrupt controller for pseries then we don't need to have both static 
> void __init pseries_xics_init_IRQ(void) and static void __init 
> pSeries_init_IRQ(void), etc.

There will be two.

Cheers,
Ben.

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

* Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-31  2:48     ` Rashmica
@ 2016-05-31  4:52       ` Benjamin Herrenschmidt
  2016-05-31  5:04       ` Michael Ellerman
  1 sibling, 0 replies; 13+ messages in thread
From: Benjamin Herrenschmidt @ 2016-05-31  4:52 UTC (permalink / raw)
  To: Rashmica, mpe, paulus, nfont; +Cc: linuxppc-dev

On Tue, 2016-05-31 at 12:48 +1000, Rashmica wrote:
> 
> Oliver just informed me that it is only replacing XICS for p9. Should
> I leave this for the person adding in the XIVE code?

That would be me ;-) It will cost you a beer !

Cheers,
Ben.

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

* Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-31  2:48     ` Rashmica
  2016-05-31  4:52       ` Benjamin Herrenschmidt
@ 2016-05-31  5:04       ` Michael Ellerman
  2016-05-31  5:30         ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 13+ messages in thread
From: Michael Ellerman @ 2016-05-31  5:04 UTC (permalink / raw)
  To: Rashmica, Benjamin Herrenschmidt, paulus, nfont; +Cc: linuxppc-dev

On Tue, 2016-05-31 at 12:48 +1000, Rashmica wrote:
> On 31/05/16 11:34, Rashmica wrote:
> > On 30/05/16 17:32, Benjamin Herrenschmidt wrote:
> > > On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
> > > > MPIC was only used by Power3 which is now unsupported, so drop support
> > > > for MPIC. XICS is now the only supported interrupt controller for
> > > > pSeries so make the XICS functions generic.
> > > The second half I'm not sure ... XIVE is around the corner...
> > > 
> > I thought XIVE was replacing XICS? And so then we can just simply 
> > replace all the specific XICS code such as xics_init() and 
> > xics_smp_probe() with the relevant XIVE functions?
> > 
> > By "make the XICS functions generic" I meant that if there is only one 
> > interrupt controller for pseries then we don't need to have both 
> > static void __init pseries_xics_init_IRQ(void) and static void __init 
> > pSeries_init_IRQ(void), etc.
> 
> Oliver just informed me that it is only replacing XICS for p9. Should I 
> leave this for the person adding in the XIVE code?

I haven't heard of this "XIVE" thing but anyway ..

I would hope we can come up with a better abstraction than this for XICS/XIVE,
so I'm inclined to merge this anyway. Worst case we end up putting some of it
back.

cheers

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

* Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-31  5:04       ` Michael Ellerman
@ 2016-05-31  5:30         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 13+ messages in thread
From: Benjamin Herrenschmidt @ 2016-05-31  5:30 UTC (permalink / raw)
  To: Michael Ellerman, Rashmica, paulus, nfont; +Cc: linuxppc-dev

On Tue, 2016-05-31 at 15:04 +1000, Michael Ellerman wrote:
> I haven't heard of this "XIVE" thing but anyway ..
> 
> I would hope we can come up with a better abstraction than this for XICS/XIVE,
> so I'm inclined to merge this anyway. Worst case we end up putting some of it
> back.

Just merge it, I'll sort it out. If you haven't heard from XIVE, you
have better noise cancelling headphones than I thought ;-)

Cheers,
Ben.

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

* Re: [1/5] powerpc/pseries: Drop support for MPIC in pseries
  2016-05-30  6:18 [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Rashmica Gupta
                   ` (4 preceding siblings ...)
  2016-05-30  7:32 ` [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Benjamin Herrenschmidt
@ 2016-06-15 12:39 ` Michael Ellerman
  5 siblings, 0 replies; 13+ messages in thread
From: Michael Ellerman @ 2016-06-15 12:39 UTC (permalink / raw)
  To: Rashmica Gupta, benh, paulus, nfont; +Cc: linuxppc-dev

On Mon, 2016-30-05 at 06:18:11 UTC, Rashmica Gupta wrote:
> MPIC was only used by Power3 which is now unsupported, so drop support
> for MPIC. XICS is now the only supported interrupt controller for
> pSeries so make the XICS functions generic.
> 
> Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/e7da5dac4e9067a526136db2f2

cheers

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

end of thread, other threads:[~2016-06-15 12:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30  6:18 [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Rashmica Gupta
2016-05-30  6:18 ` [PATCH 2/5] powerpc/pseries: Remove MPIC from pseries smp Rashmica Gupta
2016-05-30  6:18 ` [PATCH 3/5] powerpc/pseries: Remove MPIC from pseries kexec Rashmica Gupta
2016-05-30  6:18 ` [PATCH 4/5] powerpc/pseries: Remove MPIC from pseries cpu hotplug Rashmica Gupta
2016-05-30  6:18 ` [PATCH 5/5] powerpc/pseries: Remove MPIC from pseries event sources Rashmica Gupta
2016-05-30  7:32 ` [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Benjamin Herrenschmidt
2016-05-31  1:34   ` Rashmica
2016-05-31  2:48     ` Rashmica
2016-05-31  4:52       ` Benjamin Herrenschmidt
2016-05-31  5:04       ` Michael Ellerman
2016-05-31  5:30         ` Benjamin Herrenschmidt
2016-05-31  3:00     ` Benjamin Herrenschmidt
2016-06-15 12:39 ` [1/5] " Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).