linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Remove OPAL pre-v3 support
@ 2015-11-27  4:45 Stewart Smith
  2015-11-27  4:45 ` [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Stewart Smith @ 2015-11-27  4:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Stewart Smith

Everything that ever made it out of the lab is OPALv3.

The number of machines in the lab even that are OPAL pre v3 is so
likely to be zero it's not funny, and the number of people expecting
to run mainline kernels on OPAL pre v3 is even lower than that.

So, this patch series removes things referencing OPAL that isn't
OPALv3 and leaves us with a simple FW_FEATURE_OPALv3 define at the
end that we can check against.

Anyone mad enough to do an OPALv4 gets to go look at all the things
themselves.

Stewart Smith (4):
  powerpc/powernv: panic() on OPAL < V3
  powerpc/powernv: Remove OPALv2 firmware define and references
  powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3
  powerpc/powernv: remove logic for pre-OPALv3 firmware

 arch/powerpc/include/asm/firmware.h    |  5 +--
 arch/powerpc/mm/numa.c                 |  4 +-
 arch/powerpc/platforms/powernv/opal.c  | 16 ++------
 arch/powerpc/platforms/powernv/pci.c   |  2 +-
 arch/powerpc/platforms/powernv/setup.c | 10 ++---
 arch/powerpc/platforms/powernv/smp.c   | 72 +++++++++++++++-------------------
 arch/powerpc/sysdev/xics/ics-opal.c    |  2 +-
 drivers/i2c/busses/i2c-opal.c          |  2 +-
 drivers/rtc/rtc-opal.c                 |  2 +-
 drivers/tty/hvc/hvc_opal.c             |  2 +-
 10 files changed, 46 insertions(+), 71 deletions(-)

-- 
2.1.4

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

* [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
@ 2015-11-27  4:45 ` Stewart Smith
  2015-11-27  5:36   ` Andrew Donnellan
  2015-11-27  7:13   ` kbuild test robot
  2015-11-27  4:45 ` [PATCH 2/4] powerpc/powernv: Remove OPALv2 firmware define and references Stewart Smith
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 21+ messages in thread
From: Stewart Smith @ 2015-11-27  4:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Stewart Smith

The OpenPower Abstraction Layer firmware went through a couple
of iterations in the lab before being released. What we now know
as OPAL advertises itself as OPALv3.

OPALv2 and OPALv1 never made it outside the lab, and the possibility
of anyone at all ever building a mainline kernel today and expecting
it to boot on such hardware is zero.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/opal.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 4296d55e88f3..ad691fc15309 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -103,11 +103,8 @@ int __init early_init_dt_scan_opal(unsigned long node,
 		powerpc_firmware_features |= FW_FEATURE_OPALv2;
 		powerpc_firmware_features |= FW_FEATURE_OPALv3;
 		pr_info("OPAL V3 detected !\n");
-	} else if (of_flat_dt_is_compatible(node, "ibm,opal-v2")) {
-		powerpc_firmware_features |= FW_FEATURE_OPALv2;
-		pr_info("OPAL V2 detected !\n");
 	} else {
-		pr_info("OPAL V1 detected !\n");
+		panic("OPAL != V3 detected, no longer supported.\n")
 	}
 
 	/* Reinit all cores with the right endian */
-- 
2.1.4

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

* [PATCH 2/4] powerpc/powernv: Remove OPALv2 firmware define and references
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
  2015-11-27  4:45 ` [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
@ 2015-11-27  4:45 ` Stewart Smith
  2015-11-27  5:31   ` Andrew Donnellan
  2015-11-27  4:45 ` [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3 Stewart Smith
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Stewart Smith @ 2015-11-27  4:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Stewart Smith

OPALv2 only ever existed in the lab and didn't escape to the world.
All OPAL systems in the wild are OPALv3.

The probability of there being an OPALv2 system still powered on
anywhere inside IBM is approximately zero, let alone anyone
expecting to run mainline kernels.

So, start to remove references to OPALv2.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/firmware.h    |  4 +---
 arch/powerpc/platforms/powernv/opal.c  | 10 +++-------
 arch/powerpc/platforms/powernv/setup.c |  2 --
 arch/powerpc/platforms/powernv/smp.c   |  4 ++--
 4 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h
index e05808a328db..50af5e5ea86f 100644
--- a/arch/powerpc/include/asm/firmware.h
+++ b/arch/powerpc/include/asm/firmware.h
@@ -47,7 +47,6 @@
 #define FW_FEATURE_VPHN		ASM_CONST(0x0000000004000000)
 #define FW_FEATURE_XCMO		ASM_CONST(0x0000000008000000)
 #define FW_FEATURE_OPAL		ASM_CONST(0x0000000010000000)
-#define FW_FEATURE_OPALv2	ASM_CONST(0x0000000020000000)
 #define FW_FEATURE_SET_MODE	ASM_CONST(0x0000000040000000)
 #define FW_FEATURE_BEST_ENERGY	ASM_CONST(0x0000000080000000)
 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
@@ -70,8 +69,7 @@ enum {
 		FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
 		FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
 	FW_FEATURE_PSERIES_ALWAYS = 0,
-	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2 |
-		FW_FEATURE_OPALv3,
+	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv3,
 	FW_FEATURE_POWERNV_ALWAYS = 0,
 	FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
 	FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index ad691fc15309..5ce51d9b4ca6 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -100,11 +100,10 @@ int __init early_init_dt_scan_opal(unsigned long node,
 
 	powerpc_firmware_features |= FW_FEATURE_OPAL;
 	if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) {
-		powerpc_firmware_features |= FW_FEATURE_OPALv2;
 		powerpc_firmware_features |= FW_FEATURE_OPALv3;
 		pr_info("OPAL V3 detected !\n");
 	} else {
-		panic("OPAL != V3 detected, no longer supported.\n")
+		panic("OPAL != V3 detected, no longer supported.\n");
 	}
 
 	/* Reinit all cores with the right endian */
@@ -349,7 +348,7 @@ int opal_put_chars(uint32_t vtermno, const char *data, int total_len)
 	 * enough room and be done with it
 	 */
 	spin_lock_irqsave(&opal_write_lock, flags);
-	if (firmware_has_feature(FW_FEATURE_OPALv2)) {
+	if (firmware_has_feature(FW_FEATURE_OPALv3)) {
 		rc = opal_console_write_buffer_space(vtermno, &olen);
 		len = be64_to_cpu(olen);
 		if (rc || len < total_len) {
@@ -693,10 +692,7 @@ static int __init opal_init(void)
 	}
 
 	/* Register OPAL consoles if any ports */
-	if (firmware_has_feature(FW_FEATURE_OPALv2))
-		consoles = of_find_node_by_path("/ibm,opal/consoles");
-	else
-		consoles = of_node_get(opal_node);
+	consoles = of_find_node_by_path("/ibm,opal/consoles");
 	if (consoles) {
 		for_each_child_of_node(consoles, np) {
 			if (strcmp(np->name, "serial"))
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index a9a8fa37a555..80e7ed362ffa 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -92,8 +92,6 @@ static void pnv_show_cpuinfo(struct seq_file *m)
 	seq_printf(m, "machine\t\t: PowerNV %s\n", model);
 	if (firmware_has_feature(FW_FEATURE_OPALv3))
 		seq_printf(m, "firmware\t: OPAL v3\n");
-	else if (firmware_has_feature(FW_FEATURE_OPALv2))
-		seq_printf(m, "firmware\t: OPAL v2\n");
 	else if (firmware_has_feature(FW_FEATURE_OPAL))
 		seq_printf(m, "firmware\t: OPAL v1\n");
 	else
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index ca264833ee64..9b968a315103 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -65,10 +65,10 @@ static int pnv_smp_kick_cpu(int nr)
 	BUG_ON(nr < 0 || nr >= NR_CPUS);
 
 	/*
-	 * If we already started or OPALv2 is not supported, we just
+	 * If we already started or OPALv3 is not supported, we just
 	 * kick the CPU via the PACA
 	 */
-	if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv2))
+	if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv3))
 		goto kick;
 
 	/*
-- 
2.1.4

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

* [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
  2015-11-27  4:45 ` [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
  2015-11-27  4:45 ` [PATCH 2/4] powerpc/powernv: Remove OPALv2 firmware define and references Stewart Smith
@ 2015-11-27  4:45 ` Stewart Smith
  2015-11-27  5:45   ` Andrew Donnellan
  2015-12-01  3:56   ` Michael Ellerman
  2015-11-27  4:45 ` [PATCH 4/4] powerpc/powernv: remove logic for pre-OPALv3 firmware Stewart Smith
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 21+ messages in thread
From: Stewart Smith @ 2015-11-27  4:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Stewart Smith

Long ago, only in the lab, there was OPALv1 and OPALv2. Now there is
just OPALv3, with nobody ever expecting anything on pre-OPALv3 to
be cared about or supported by mainline kernels.

So, let's remove FW_FEATURE_OPAL and instead use FW_FEATURE_OPALv3
exclusively.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/firmware.h    | 3 +--
 arch/powerpc/mm/numa.c                 | 4 ++--
 arch/powerpc/platforms/powernv/opal.c  | 3 +--
 arch/powerpc/platforms/powernv/pci.c   | 2 +-
 arch/powerpc/platforms/powernv/setup.c | 8 +++-----
 arch/powerpc/sysdev/xics/ics-opal.c    | 2 +-
 drivers/i2c/busses/i2c-opal.c          | 2 +-
 drivers/rtc/rtc-opal.c                 | 2 +-
 drivers/tty/hvc/hvc_opal.c             | 2 +-
 9 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h
index 50af5e5ea86f..3901e2ee3f16 100644
--- a/arch/powerpc/include/asm/firmware.h
+++ b/arch/powerpc/include/asm/firmware.h
@@ -46,7 +46,6 @@
 #define FW_FEATURE_CMO		ASM_CONST(0x0000000002000000)
 #define FW_FEATURE_VPHN		ASM_CONST(0x0000000004000000)
 #define FW_FEATURE_XCMO		ASM_CONST(0x0000000008000000)
-#define FW_FEATURE_OPAL		ASM_CONST(0x0000000010000000)
 #define FW_FEATURE_SET_MODE	ASM_CONST(0x0000000040000000)
 #define FW_FEATURE_BEST_ENERGY	ASM_CONST(0x0000000080000000)
 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
@@ -69,7 +68,7 @@ enum {
 		FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
 		FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
 	FW_FEATURE_PSERIES_ALWAYS = 0,
-	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv3,
+	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPALv3,
 	FW_FEATURE_POWERNV_ALWAYS = 0,
 	FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
 	FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 669a15e7fa76..06da32c6a007 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -297,7 +297,7 @@ static int __init find_min_common_depth(void)
 	int depth;
 	struct device_node *root;
 
-	if (firmware_has_feature(FW_FEATURE_OPAL))
+	if (firmware_has_feature(FW_FEATURE_OPALv3))
 		root = of_find_node_by_path("/ibm,opal");
 	else
 		root = of_find_node_by_path("/rtas");
@@ -327,7 +327,7 @@ static int __init find_min_common_depth(void)
 
 	distance_ref_points_depth /= sizeof(int);
 
-	if (firmware_has_feature(FW_FEATURE_OPAL) ||
+	if (firmware_has_feature(FW_FEATURE_OPALv3) ||
 	    firmware_has_feature(FW_FEATURE_TYPE1_AFFINITY)) {
 		dbg("Using form 1 affinity\n");
 		form1_affinity = 1;
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 5ce51d9b4ca6..bcb6581ec75c 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -98,7 +98,6 @@ int __init early_init_dt_scan_opal(unsigned long node,
 	pr_debug("OPAL Entry = 0x%llx (sizep=%p runtimesz=%d)\n",
 		 opal.size, sizep, runtimesz);
 
-	powerpc_firmware_features |= FW_FEATURE_OPAL;
 	if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) {
 		powerpc_firmware_features |= FW_FEATURE_OPALv3;
 		pr_info("OPAL V3 detected !\n");
@@ -180,7 +179,7 @@ static int __init opal_register_exception_handlers(void)
 #ifdef __BIG_ENDIAN__
 	u64 glue;
 
-	if (!(powerpc_firmware_features & FW_FEATURE_OPAL))
+	if (!(powerpc_firmware_features & FW_FEATURE_OPALv3))
 		return -ENODEV;
 
 	/* Hookup some exception handlers except machine check. We use the
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index f2dd77234240..6041b795f593 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -786,7 +786,7 @@ void __init pnv_pci_init(void)
 	pci_add_flags(PCI_CAN_SKIP_ISA_ALIGN);
 
 	/* If we don't have OPAL, eg. in sim, just skip PCI probe */
-	if (!firmware_has_feature(FW_FEATURE_OPAL))
+	if (!firmware_has_feature(FW_FEATURE_OPALv3))
 		return;
 
 	/* Look for IODA IO-Hubs. We don't support mixing IODA
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 80e7ed362ffa..d79b07f1b33b 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -49,7 +49,7 @@ static void __init pnv_setup_arch(void)
 	pnv_pci_init();
 
 	/* Setup RTC and NVRAM callbacks */
-	if (firmware_has_feature(FW_FEATURE_OPAL))
+	if (firmware_has_feature(FW_FEATURE_OPALv3))
 		opal_nvram_init();
 
 	/* Enable NAP mode */
@@ -67,7 +67,7 @@ static void __init pnv_init_early(void)
 	opal_lpc_init();
 
 #ifdef CONFIG_HVC_OPAL
-	if (firmware_has_feature(FW_FEATURE_OPAL))
+	if (firmware_has_feature(FW_FEATURE_OPALv3))
 		hvc_opal_init_early();
 	else
 #endif
@@ -92,8 +92,6 @@ static void pnv_show_cpuinfo(struct seq_file *m)
 	seq_printf(m, "machine\t\t: PowerNV %s\n", model);
 	if (firmware_has_feature(FW_FEATURE_OPALv3))
 		seq_printf(m, "firmware\t: OPAL v3\n");
-	else if (firmware_has_feature(FW_FEATURE_OPAL))
-		seq_printf(m, "firmware\t: OPAL v1\n");
 	else
 		seq_printf(m, "firmware\t: BML\n");
 	of_node_put(root);
@@ -277,7 +275,7 @@ static int __init pnv_probe(void)
 
 	hpte_init_native();
 
-	if (firmware_has_feature(FW_FEATURE_OPAL))
+	if (firmware_has_feature(FW_FEATURE_OPALv3))
 		pnv_setup_machdep_opal();
 
 	pr_debug("PowerNV detected !\n");
diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
index 27c936c080a6..ac60ef2aff80 100644
--- a/arch/powerpc/sysdev/xics/ics-opal.c
+++ b/arch/powerpc/sysdev/xics/ics-opal.c
@@ -226,7 +226,7 @@ static long ics_opal_get_server(struct ics *ics, unsigned long vec)
 
 int __init ics_opal_init(void)
 {
-	if (!firmware_has_feature(FW_FEATURE_OPAL))
+	if (!firmware_has_feature(FW_FEATURE_OPALv3))
 		return -ENODEV;
 
 	/* We need to patch our irq chip's EOI to point to the
diff --git a/drivers/i2c/busses/i2c-opal.c b/drivers/i2c/busses/i2c-opal.c
index 75dd6d041241..39f99207400f 100644
--- a/drivers/i2c/busses/i2c-opal.c
+++ b/drivers/i2c/busses/i2c-opal.c
@@ -276,7 +276,7 @@ static struct platform_driver i2c_opal_driver = {
 
 static int __init i2c_opal_init(void)
 {
-	if (!firmware_has_feature(FW_FEATURE_OPAL))
+	if (!firmware_has_feature(FW_FEATURE_OPALv3))
 		return -ENODEV;
 
 	return platform_driver_register(&i2c_opal_driver);
diff --git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c
index df39ce02a99d..56da8e7ae83f 100644
--- a/drivers/rtc/rtc-opal.c
+++ b/drivers/rtc/rtc-opal.c
@@ -244,7 +244,7 @@ static struct platform_driver opal_rtc_driver = {
 
 static int __init opal_rtc_init(void)
 {
-	if (!firmware_has_feature(FW_FEATURE_OPAL))
+	if (!firmware_has_feature(FW_FEATURE_OPALv3))
 		return -ENODEV;
 
 	return platform_driver_register(&opal_rtc_driver);
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
index 47b54c6aefd2..580369310e0d 100644
--- a/drivers/tty/hvc/hvc_opal.c
+++ b/drivers/tty/hvc/hvc_opal.c
@@ -255,7 +255,7 @@ static struct platform_driver hvc_opal_driver = {
 
 static int __init hvc_opal_init(void)
 {
-	if (!firmware_has_feature(FW_FEATURE_OPAL))
+	if (!firmware_has_feature(FW_FEATURE_OPALv3))
 		return -ENODEV;
 
 	/* Register as a vio device to receive callbacks */
-- 
2.1.4

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

* [PATCH 4/4] powerpc/powernv: remove logic for pre-OPALv3 firmware
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
                   ` (2 preceding siblings ...)
  2015-11-27  4:45 ` [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3 Stewart Smith
@ 2015-11-27  4:45 ` Stewart Smith
  2015-11-27  5:55   ` Andrew Donnellan
  2015-12-09  6:18 ` [PATCH v2 0/3] Remove OPAL pre-v3 support Stewart Smith
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Stewart Smith @ 2015-11-27  4:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Stewart Smith

There was already a check for OPALv3, so we just remove the if/else
check and go for it.

OPAL pre-v3 no longer exists. Anywhere.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/smp.c | 68 +++++++++++++++---------------------
 1 file changed, 29 insertions(+), 39 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 9b968a315103..e04d2d4da948 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -61,6 +61,7 @@ static int pnv_smp_kick_cpu(int nr)
 	unsigned long start_here =
 			__pa(ppc_function_entry(generic_secondary_smp_init));
 	long rc;
+	uint8_t status;
 
 	BUG_ON(nr < 0 || nr >= NR_CPUS);
 
@@ -77,53 +78,42 @@ static int pnv_smp_kick_cpu(int nr)
 	 * first time. OPAL v3 allows us to query OPAL to know if it
 	 * has the CPUs, so we do that
 	 */
-	if (firmware_has_feature(FW_FEATURE_OPALv3)) {
-		uint8_t status;
+	rc = opal_query_cpu_status(pcpu, &status);
+	if (rc != OPAL_SUCCESS) {
+		pr_warn("OPAL Error %ld querying CPU %d state\n",
+			rc, nr);
+		return -ENODEV;
+	}
+
+	/*
+	 * Already started, just kick it, probably coming from
+	 * kexec and spinning
+	 */
+	if (status == OPAL_THREAD_STARTED)
+		goto kick;
 
-		rc = opal_query_cpu_status(pcpu, &status);
+	/*
+	 * Available/inactive, let's kick it
+	 */
+	if (status == OPAL_THREAD_INACTIVE) {
+		pr_devel("OPAL: Starting CPU %d (HW 0x%x)...\n",
+			 nr, pcpu);
+		rc = opal_start_cpu(pcpu, start_here);
 		if (rc != OPAL_SUCCESS) {
-			pr_warn("OPAL Error %ld querying CPU %d state\n",
+			pr_warn("OPAL Error %ld starting CPU %d\n",
 				rc, nr);
 			return -ENODEV;
 		}
-
-		/*
-		 * Already started, just kick it, probably coming from
-		 * kexec and spinning
-		 */
-		if (status == OPAL_THREAD_STARTED)
-			goto kick;
-
-		/*
-		 * Available/inactive, let's kick it
-		 */
-		if (status == OPAL_THREAD_INACTIVE) {
-			pr_devel("OPAL: Starting CPU %d (HW 0x%x)...\n",
-				 nr, pcpu);
-			rc = opal_start_cpu(pcpu, start_here);
-			if (rc != OPAL_SUCCESS) {
-				pr_warn("OPAL Error %ld starting CPU %d\n",
-					rc, nr);
-				return -ENODEV;
-			}
-		} else {
-			/*
-			 * An unavailable CPU (or any other unknown status)
-			 * shouldn't be started. It should also
-			 * not be in the possible map but currently it can
-			 * happen
-			 */
-			pr_devel("OPAL: CPU %d (HW 0x%x) is unavailable"
-				 " (status %d)...\n", nr, pcpu, status);
-			return -ENODEV;
-		}
 	} else {
 		/*
-		 * On OPAL v2, we just kick it and hope for the best,
-		 * we must not test the error from opal_start_cpu() or
-		 * we would fail to get CPUs from kexec.
+		 * An unavailable CPU (or any other unknown status)
+		 * shouldn't be started. It should also
+		 * not be in the possible map but currently it can
+		 * happen
 		 */
-		opal_start_cpu(pcpu, start_here);
+		pr_devel("OPAL: CPU %d (HW 0x%x) is unavailable"
+			 " (status %d)...\n", nr, pcpu, status);
+		return -ENODEV;
 	}
  kick:
 	return smp_generic_kick_cpu(nr);
-- 
2.1.4

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

* Re: [PATCH 2/4] powerpc/powernv: Remove OPALv2 firmware define and references
  2015-11-27  4:45 ` [PATCH 2/4] powerpc/powernv: Remove OPALv2 firmware define and references Stewart Smith
@ 2015-11-27  5:31   ` Andrew Donnellan
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Donnellan @ 2015-11-27  5:31 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev

On 27/11/15 15:45, Stewart Smith wrote:
> OPALv2 only ever existed in the lab and didn't escape to the world.
> All OPAL systems in the wild are OPALv3.
>
> The probability of there being an OPALv2 system still powered on
> anywhere inside IBM is approximately zero, let alone anyone
> expecting to run mainline kernels.
>
> So, start to remove references to OPALv2.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Was going to comment that you should've removed the OPAL v1 line in 
cpuinfo, but it seems you do that in the next patch.

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

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

* Re: [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3
  2015-11-27  4:45 ` [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
@ 2015-11-27  5:36   ` Andrew Donnellan
  2015-11-27  5:43     ` Stewart Smith
  2015-11-30  0:20     ` Andrew Donnellan
  2015-11-27  7:13   ` kbuild test robot
  1 sibling, 2 replies; 21+ messages in thread
From: Andrew Donnellan @ 2015-11-27  5:36 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev

On 27/11/15 15:45, Stewart Smith wrote:
> The OpenPower Abstraction Layer firmware went through a couple
> of iterations in the lab before being released. What we now know
> as OPAL advertises itself as OPALv3.
>
> OPALv2 and OPALv1 never made it outside the lab, and the possibility
> of anyone at all ever building a mainline kernel today and expecting
> it to boot on such hardware is zero.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Comment below.

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> ---
>   arch/powerpc/platforms/powernv/opal.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
> index 4296d55e88f3..ad691fc15309 100644
> --- a/arch/powerpc/platforms/powernv/opal.c
> +++ b/arch/powerpc/platforms/powernv/opal.c
> @@ -103,11 +103,8 @@ int __init early_init_dt_scan_opal(unsigned long node,
>   		powerpc_firmware_features |= FW_FEATURE_OPALv2;
>   		powerpc_firmware_features |= FW_FEATURE_OPALv3;
>   		pr_info("OPAL V3 detected !\n");
> -	} else if (of_flat_dt_is_compatible(node, "ibm,opal-v2")) {
> -		powerpc_firmware_features |= FW_FEATURE_OPALv2;
> -		pr_info("OPAL V2 detected !\n");
>   	} else {
> -		pr_info("OPAL V1 detected !\n");
> +		panic("OPAL != V3 detected, no longer supported.\n")

In the event of an OPAL v4 that is for some reason not backwards 
compatible with V3, "*no longer* supported" might not make sense. This 
isn't a huge problem of course.

-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

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

* Re: [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3
  2015-11-27  5:36   ` Andrew Donnellan
@ 2015-11-27  5:43     ` Stewart Smith
  2015-11-27  5:56       ` Andrew Donnellan
  2015-11-30  0:20     ` Andrew Donnellan
  1 sibling, 1 reply; 21+ messages in thread
From: Stewart Smith @ 2015-11-27  5:43 UTC (permalink / raw)
  To: Andrew Donnellan, linuxppc-dev

Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
>> --- a/arch/powerpc/platforms/powernv/opal.c
>> +++ b/arch/powerpc/platforms/powernv/opal.c
>> @@ -103,11 +103,8 @@ int __init early_init_dt_scan_opal(unsigned long node,
>>   		powerpc_firmware_features |= FW_FEATURE_OPALv2;
>>   		powerpc_firmware_features |= FW_FEATURE_OPALv3;
>>   		pr_info("OPAL V3 detected !\n");
>> -	} else if (of_flat_dt_is_compatible(node, "ibm,opal-v2")) {
>> -		powerpc_firmware_features |= FW_FEATURE_OPALv2;
>> -		pr_info("OPAL V2 detected !\n");
>>   	} else {
>> -		pr_info("OPAL V1 detected !\n");
>> +		panic("OPAL != V3 detected, no longer supported.\n")
>
> In the event of an OPAL v4 that is for some reason not backwards 
> compatible with V3, "*no longer* supported" might not make sense. This 
> isn't a huge problem of course.

Considering you need kernel support for any new POWER processor, and we're not
about to do an OPALv4 on POWER8 or earlier - we're going to be safe :)

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

* Re: [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3
  2015-11-27  4:45 ` [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3 Stewart Smith
@ 2015-11-27  5:45   ` Andrew Donnellan
  2015-12-01  3:56   ` Michael Ellerman
  1 sibling, 0 replies; 21+ messages in thread
From: Andrew Donnellan @ 2015-11-27  5:45 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev

On 27/11/15 15:45, Stewart Smith wrote:
> Long ago, only in the lab, there was OPALv1 and OPALv2. Now there is
> just OPALv3, with nobody ever expecting anything on pre-OPALv3 to
> be cared about or supported by mainline kernels.
>
> So, let's remove FW_FEATURE_OPAL and instead use FW_FEATURE_OPALv3
> exclusively.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

I haven't checked for any outstanding references you've missed here, but 
I'm going to assume it compiles...

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

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

* Re: [PATCH 4/4] powerpc/powernv: remove logic for pre-OPALv3 firmware
  2015-11-27  4:45 ` [PATCH 4/4] powerpc/powernv: remove logic for pre-OPALv3 firmware Stewart Smith
@ 2015-11-27  5:55   ` Andrew Donnellan
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Donnellan @ 2015-11-27  5:55 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev

On 27/11/15 15:45, Stewart Smith wrote:
> There was already a check for OPALv3, so we just remove the if/else
> check and go for it.
>
> OPAL pre-v3 no longer exists. Anywhere.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Nothing obviously wrong that stood out to me.

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>


-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

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

* Re: [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3
  2015-11-27  5:43     ` Stewart Smith
@ 2015-11-27  5:56       ` Andrew Donnellan
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Donnellan @ 2015-11-27  5:56 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev

On 27/11/15 16:43, Stewart Smith wrote:
> Considering you need kernel support for any new POWER processor, and we're not
> about to do an OPALv4 on POWER8 or earlier - we're going to be safe :)

Not a huge problem then :)


-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

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

* Re: [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3
  2015-11-27  4:45 ` [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
  2015-11-27  5:36   ` Andrew Donnellan
@ 2015-11-27  7:13   ` kbuild test robot
  1 sibling, 0 replies; 21+ messages in thread
From: kbuild test robot @ 2015-11-27  7:13 UTC (permalink / raw)
  To: Stewart Smith; +Cc: kbuild-all, linuxppc-dev, Stewart Smith

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

Hi Stewart,

[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.4-rc2 next-20151127]

url:    https://github.com/0day-ci/linux/commits/Stewart-Smith/powerpc-powernv-panic-on-OPAL-V3/20151127-125146
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

Note: the linux-review/Stewart-Smith/powerpc-powernv-panic-on-OPAL-V3/20151127-125146 HEAD 152f1c52f2204a99806617c1fcfdff7505ee8506 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   arch/powerpc/platforms/powernv/opal.c: In function 'early_init_dt_scan_opal':
>> arch/powerpc/platforms/powernv/opal.c:108:2: error: expected ';' before '}' token
     }
     ^

vim +108 arch/powerpc/platforms/powernv/opal.c

75b93da4 Benjamin Herrenschmidt 2013-05-14  102  	if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) {
75b93da4 Benjamin Herrenschmidt 2013-05-14  103  		powerpc_firmware_features |= FW_FEATURE_OPALv2;
75b93da4 Benjamin Herrenschmidt 2013-05-14  104  		powerpc_firmware_features |= FW_FEATURE_OPALv3;
9a4f5cd0 Anton Blanchard        2014-09-17  105  		pr_info("OPAL V3 detected !\n");
14a43e69 Benjamin Herrenschmidt 2011-09-19  106  	} else {
37adb774 Stewart Smith          2015-11-27  107  		panic("OPAL != V3 detected, no longer supported.\n")
14a43e69 Benjamin Herrenschmidt 2011-09-19 @108  	}
14a43e69 Benjamin Herrenschmidt 2011-09-19  109  
4926616c Benjamin Herrenschmidt 2014-05-20  110  	/* Reinit all cores with the right endian */
4926616c Benjamin Herrenschmidt 2014-05-20  111  	opal_reinit_cores();

:::::: The code at line 108 was first introduced by commit
:::::: 14a43e69ed257a1fadadf9fea2c05adb1686419f powerpc/powernv: Basic support for OPAL

:::::: TO: Benjamin Herrenschmidt <benh@kernel.crashing.org>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 21688 bytes --]

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

* Re: [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3
  2015-11-27  5:36   ` Andrew Donnellan
  2015-11-27  5:43     ` Stewart Smith
@ 2015-11-30  0:20     ` Andrew Donnellan
  1 sibling, 0 replies; 21+ messages in thread
From: Andrew Donnellan @ 2015-11-30  0:20 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev


On 27/11/15 16:36, Andrew Donnellan wrote:
> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

And withdrawing my Reviewed-by: because apparently I'm not capable of 
spotting missing semicolons, please move the semicolon from patch 2 to 
this patch...


Andrew

-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

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

* Re: [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3
  2015-11-27  4:45 ` [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3 Stewart Smith
  2015-11-27  5:45   ` Andrew Donnellan
@ 2015-12-01  3:56   ` Michael Ellerman
  2015-12-03  6:06     ` Stewart Smith
  1 sibling, 1 reply; 21+ messages in thread
From: Michael Ellerman @ 2015-12-01  3:56 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev

On Fri, 2015-11-27 at 15:45 +1100, Stewart Smith wrote:

> Long ago, only in the lab, there was OPALv1 and OPALv2. Now there is
> just OPALv3, with nobody ever expecting anything on pre-OPALv3 to
> be cared about or supported by mainline kernels.
> 
> So, let's remove FW_FEATURE_OPAL and instead use FW_FEATURE_OPALv3
> exclusively.

It would be less churn if we did the reverse, ie. removed v3 and just used
FW_FEATURE_OPAL. It would also read better as v3 is the one and only version we
care about, so having it called out everywhere is superfluous.

Or is there a good reason I missed?

cheers

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

* Re: [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3
  2015-12-01  3:56   ` Michael Ellerman
@ 2015-12-03  6:06     ` Stewart Smith
  2015-12-03  8:55       ` Michael Ellerman
  0 siblings, 1 reply; 21+ messages in thread
From: Stewart Smith @ 2015-12-03  6:06 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

Michael Ellerman <mpe@ellerman.id.au> writes:

> On Fri, 2015-11-27 at 15:45 +1100, Stewart Smith wrote:
>
>> Long ago, only in the lab, there was OPALv1 and OPALv2. Now there is
>> just OPALv3, with nobody ever expecting anything on pre-OPALv3 to
>> be cared about or supported by mainline kernels.
>> 
>> So, let's remove FW_FEATURE_OPAL and instead use FW_FEATURE_OPALv3
>> exclusively.
>
> It would be less churn if we did the reverse, ie. removed v3 and just used
> FW_FEATURE_OPAL. It would also read better as v3 is the one and only version we
> care about, so having it called out everywhere is superfluous.
>
> Or is there a good reason I missed?

excessive caution?

I'll send a V2 patchset doing the reverse, leaving FW_FEATURE_OPAL.

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

* Re: [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3
  2015-12-03  6:06     ` Stewart Smith
@ 2015-12-03  8:55       ` Michael Ellerman
  0 siblings, 0 replies; 21+ messages in thread
From: Michael Ellerman @ 2015-12-03  8:55 UTC (permalink / raw)
  To: Stewart Smith, Michael Ellerman, linuxppc-dev



On 3 December 2015 4:36:03 pm ACDT, Stewart Smith <stewart@linux.vnet.ibm.com> wrote:
>Michael Ellerman <mpe@ellerman.id.au> writes:
>
>> On Fri, 2015-11-27 at 15:45 +1100, Stewart Smith wrote:
>>
>>> Long ago, only in the lab, there was OPALv1 and OPALv2. Now there is
>>> just OPALv3, with nobody ever expecting anything on pre-OPALv3 to
>>> be cared about or supported by mainline kernels.
>>> 
>>> So, let's remove FW_FEATURE_OPAL and instead use FW_FEATURE_OPALv3
>>> exclusively.
>>
>> It would be less churn if we did the reverse, ie. removed v3 and just
>used
>> FW_FEATURE_OPAL. It would also read better as v3 is the one and only
>version we
>> care about, so having it called out everywhere is superfluous.
>>
>> Or is there a good reason I missed?
>
>excessive caution?

Yeah fair enough.

>I'll send a V2 patchset doing the reverse, leaving FW_FEATURE_OPAL.

Thanks.

cheers

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

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

* [PATCH v2 0/3] Remove OPAL pre-v3 support
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
                   ` (3 preceding siblings ...)
  2015-11-27  4:45 ` [PATCH 4/4] powerpc/powernv: remove logic for pre-OPALv3 firmware Stewart Smith
@ 2015-12-09  6:18 ` Stewart Smith
  2015-12-09  6:18 ` [PATCH v2 1/3] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Stewart Smith @ 2015-12-09  6:18 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Andrew Donnellan, Stewart Smith

Everything that ever made it out of the lab is OPALv3.

The number of machines in the lab even that are OPAL pre v3 is so
likely to be zero it's not funny, and the number of people expecting
to run mainline kernels on OPAL pre v3 is even lower than that.

So, this patch series removes things referencing OPAL that isn't
OPALv3 and leaves us with a simple FW_FEATURE_OPALv3 define at the
end that we can check against.

Anyone mad enough to do an OPALv4 gets to go look at all the things
themselves.

Changes since V1:
- Fix missing ; in patch 1
- remove cpuinfo OPAL v1 line in patch 2 rather than 3
- keep FW_FEATURE_OPAL rather than FW_FEATURE_OPALv3

Stewart Smith (3):
  powerpc/powernv: panic() on OPAL < V3
  powerpc/powernv: Remove OPALv2 firmware define and references
  powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL

 arch/powerpc/include/asm/firmware.h          |  5 +-
 arch/powerpc/platforms/powernv/eeh-powernv.c |  4 +-
 arch/powerpc/platforms/powernv/idle.c        |  2 +-
 arch/powerpc/platforms/powernv/opal-xscom.c  |  2 +-
 arch/powerpc/platforms/powernv/opal.c        | 36 +++++---------
 arch/powerpc/platforms/powernv/pci-ioda.c    |  2 +-
 arch/powerpc/platforms/powernv/setup.c       | 12 ++---
 arch/powerpc/platforms/powernv/smp.c         | 74 ++++++++++++----------------
 drivers/cpufreq/powernv-cpufreq.c            |  2 +-
 drivers/cpuidle/cpuidle-powernv.c            |  2 +-
 10 files changed, 56 insertions(+), 85 deletions(-)

-- 
2.1.4

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

* [PATCH v2 1/3] powerpc/powernv: panic() on OPAL < V3
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
                   ` (4 preceding siblings ...)
  2015-12-09  6:18 ` [PATCH v2 0/3] Remove OPAL pre-v3 support Stewart Smith
@ 2015-12-09  6:18 ` Stewart Smith
  2015-12-17 11:57   ` [v2,1/3] " Michael Ellerman
  2015-12-09  6:18 ` [PATCH v2 2/3] powerpc/powernv: Remove OPALv2 firmware define and references Stewart Smith
  2015-12-09  6:18 ` [PATCH v2 3/3] powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL Stewart Smith
  7 siblings, 1 reply; 21+ messages in thread
From: Stewart Smith @ 2015-12-09  6:18 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Andrew Donnellan, Stewart Smith

The OpenPower Abstraction Layer firmware went through a couple
of iterations in the lab before being released. What we now know
as OPAL advertises itself as OPALv3.

OPALv2 and OPALv1 never made it outside the lab, and the possibility
of anyone at all ever building a mainline kernel today and expecting
it to boot on such hardware is zero.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/opal.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 4296d55e88f3..faea1abaa785 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -103,11 +103,8 @@ int __init early_init_dt_scan_opal(unsigned long node,
 		powerpc_firmware_features |= FW_FEATURE_OPALv2;
 		powerpc_firmware_features |= FW_FEATURE_OPALv3;
 		pr_info("OPAL V3 detected !\n");
-	} else if (of_flat_dt_is_compatible(node, "ibm,opal-v2")) {
-		powerpc_firmware_features |= FW_FEATURE_OPALv2;
-		pr_info("OPAL V2 detected !\n");
 	} else {
-		pr_info("OPAL V1 detected !\n");
+		panic("OPAL != V3 detected, no longer supported.\n");
 	}
 
 	/* Reinit all cores with the right endian */
-- 
2.1.4

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

* [PATCH v2 2/3] powerpc/powernv: Remove OPALv2 firmware define and references
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
                   ` (5 preceding siblings ...)
  2015-12-09  6:18 ` [PATCH v2 1/3] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
@ 2015-12-09  6:18 ` Stewart Smith
  2015-12-09  6:18 ` [PATCH v2 3/3] powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL Stewart Smith
  7 siblings, 0 replies; 21+ messages in thread
From: Stewart Smith @ 2015-12-09  6:18 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Andrew Donnellan, Stewart Smith

OPALv2 only ever existed in the lab and didn't escape to the world.
All OPAL systems in the wild are OPALv3.

The probability of there being an OPALv2 system still powered on
anywhere inside IBM is approximately zero, let alone anyone
expecting to run mainline kernels.

So, start to remove references to OPALv2.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/firmware.h    | 4 +---
 arch/powerpc/platforms/powernv/opal.c  | 8 ++------
 arch/powerpc/platforms/powernv/setup.c | 4 ----
 arch/powerpc/platforms/powernv/smp.c   | 4 ++--
 4 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h
index e05808a328db..50af5e5ea86f 100644
--- a/arch/powerpc/include/asm/firmware.h
+++ b/arch/powerpc/include/asm/firmware.h
@@ -47,7 +47,6 @@
 #define FW_FEATURE_VPHN		ASM_CONST(0x0000000004000000)
 #define FW_FEATURE_XCMO		ASM_CONST(0x0000000008000000)
 #define FW_FEATURE_OPAL		ASM_CONST(0x0000000010000000)
-#define FW_FEATURE_OPALv2	ASM_CONST(0x0000000020000000)
 #define FW_FEATURE_SET_MODE	ASM_CONST(0x0000000040000000)
 #define FW_FEATURE_BEST_ENERGY	ASM_CONST(0x0000000080000000)
 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
@@ -70,8 +69,7 @@ enum {
 		FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
 		FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
 	FW_FEATURE_PSERIES_ALWAYS = 0,
-	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2 |
-		FW_FEATURE_OPALv3,
+	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv3,
 	FW_FEATURE_POWERNV_ALWAYS = 0,
 	FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
 	FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index faea1abaa785..5ce51d9b4ca6 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -100,7 +100,6 @@ int __init early_init_dt_scan_opal(unsigned long node,
 
 	powerpc_firmware_features |= FW_FEATURE_OPAL;
 	if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) {
-		powerpc_firmware_features |= FW_FEATURE_OPALv2;
 		powerpc_firmware_features |= FW_FEATURE_OPALv3;
 		pr_info("OPAL V3 detected !\n");
 	} else {
@@ -349,7 +348,7 @@ int opal_put_chars(uint32_t vtermno, const char *data, int total_len)
 	 * enough room and be done with it
 	 */
 	spin_lock_irqsave(&opal_write_lock, flags);
-	if (firmware_has_feature(FW_FEATURE_OPALv2)) {
+	if (firmware_has_feature(FW_FEATURE_OPALv3)) {
 		rc = opal_console_write_buffer_space(vtermno, &olen);
 		len = be64_to_cpu(olen);
 		if (rc || len < total_len) {
@@ -693,10 +692,7 @@ static int __init opal_init(void)
 	}
 
 	/* Register OPAL consoles if any ports */
-	if (firmware_has_feature(FW_FEATURE_OPALv2))
-		consoles = of_find_node_by_path("/ibm,opal/consoles");
-	else
-		consoles = of_node_get(opal_node);
+	consoles = of_find_node_by_path("/ibm,opal/consoles");
 	if (consoles) {
 		for_each_child_of_node(consoles, np) {
 			if (strcmp(np->name, "serial"))
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index a9a8fa37a555..54583fc417be 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -92,10 +92,6 @@ static void pnv_show_cpuinfo(struct seq_file *m)
 	seq_printf(m, "machine\t\t: PowerNV %s\n", model);
 	if (firmware_has_feature(FW_FEATURE_OPALv3))
 		seq_printf(m, "firmware\t: OPAL v3\n");
-	else if (firmware_has_feature(FW_FEATURE_OPALv2))
-		seq_printf(m, "firmware\t: OPAL v2\n");
-	else if (firmware_has_feature(FW_FEATURE_OPAL))
-		seq_printf(m, "firmware\t: OPAL v1\n");
 	else
 		seq_printf(m, "firmware\t: BML\n");
 	of_node_put(root);
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index ca264833ee64..9b968a315103 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -65,10 +65,10 @@ static int pnv_smp_kick_cpu(int nr)
 	BUG_ON(nr < 0 || nr >= NR_CPUS);
 
 	/*
-	 * If we already started or OPALv2 is not supported, we just
+	 * If we already started or OPALv3 is not supported, we just
 	 * kick the CPU via the PACA
 	 */
-	if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv2))
+	if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv3))
 		goto kick;
 
 	/*
-- 
2.1.4

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

* [PATCH v2 3/3] powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL
  2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
                   ` (6 preceding siblings ...)
  2015-12-09  6:18 ` [PATCH v2 2/3] powerpc/powernv: Remove OPALv2 firmware define and references Stewart Smith
@ 2015-12-09  6:18 ` Stewart Smith
  7 siblings, 0 replies; 21+ messages in thread
From: Stewart Smith @ 2015-12-09  6:18 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Andrew Donnellan, Stewart Smith

Long ago, only in the lab, there was OPALv1 and OPALv2. Now there is
just OPALv3, with nobody ever expecting anything on pre-OPALv3 to
be cared about or supported by mainline kernels.

So, let's remove FW_FEATURE_OPALv3 and instead use FW_FEATURE_OPAL
exclusively.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/firmware.h          |  3 +-
 arch/powerpc/platforms/powernv/eeh-powernv.c |  4 +-
 arch/powerpc/platforms/powernv/idle.c        |  2 +-
 arch/powerpc/platforms/powernv/opal-xscom.c  |  2 +-
 arch/powerpc/platforms/powernv/opal.c        | 25 +++++-----
 arch/powerpc/platforms/powernv/pci-ioda.c    |  2 +-
 arch/powerpc/platforms/powernv/setup.c       |  8 +--
 arch/powerpc/platforms/powernv/smp.c         | 74 ++++++++++++----------------
 drivers/cpufreq/powernv-cpufreq.c            |  2 +-
 drivers/cpuidle/cpuidle-powernv.c            |  2 +-
 10 files changed, 54 insertions(+), 70 deletions(-)

diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h
index 50af5e5ea86f..b0629249778b 100644
--- a/arch/powerpc/include/asm/firmware.h
+++ b/arch/powerpc/include/asm/firmware.h
@@ -51,7 +51,6 @@
 #define FW_FEATURE_BEST_ENERGY	ASM_CONST(0x0000000080000000)
 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
 #define FW_FEATURE_PRRN		ASM_CONST(0x0000000200000000)
-#define FW_FEATURE_OPALv3	ASM_CONST(0x0000000400000000)
 
 #ifndef __ASSEMBLY__
 
@@ -69,7 +68,7 @@ enum {
 		FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
 		FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
 	FW_FEATURE_PSERIES_ALWAYS = 0,
-	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv3,
+	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL,
 	FW_FEATURE_POWERNV_ALWAYS = 0,
 	FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
 	FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index e1c90725522a..5f152b95ca0c 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -48,8 +48,8 @@ static int pnv_eeh_init(void)
 	struct pci_controller *hose;
 	struct pnv_phb *phb;
 
-	if (!firmware_has_feature(FW_FEATURE_OPALv3)) {
-		pr_warn("%s: OPALv3 is required !\n",
+	if (!firmware_has_feature(FW_FEATURE_OPAL)) {
+		pr_warn("%s: OPAL is required !\n",
 			__func__);
 		return -EINVAL;
 	}
diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
index 59d735d2e5c0..15bfbcd5debc 100644
--- a/arch/powerpc/platforms/powernv/idle.c
+++ b/arch/powerpc/platforms/powernv/idle.c
@@ -242,7 +242,7 @@ static int __init pnv_init_idle_states(void)
 	if (cpuidle_disable != IDLE_NO_OVERRIDE)
 		goto out;
 
-	if (!firmware_has_feature(FW_FEATURE_OPALv3))
+	if (!firmware_has_feature(FW_FEATURE_OPAL))
 		goto out;
 
 	power_mgt = of_find_node_by_path("/ibm,opal/power-mgt");
diff --git a/arch/powerpc/platforms/powernv/opal-xscom.c b/arch/powerpc/platforms/powernv/opal-xscom.c
index 7634d1c62299..d0ac535cf5d7 100644
--- a/arch/powerpc/platforms/powernv/opal-xscom.c
+++ b/arch/powerpc/platforms/powernv/opal-xscom.c
@@ -126,7 +126,7 @@ static const struct scom_controller opal_scom_controller = {
 
 static int opal_xscom_init(void)
 {
-	if (firmware_has_feature(FW_FEATURE_OPALv3))
+	if (firmware_has_feature(FW_FEATURE_OPAL))
 		scom_init(&opal_scom_controller);
 	return 0;
 }
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 5ce51d9b4ca6..aad0033d65d1 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -98,10 +98,9 @@ int __init early_init_dt_scan_opal(unsigned long node,
 	pr_debug("OPAL Entry = 0x%llx (sizep=%p runtimesz=%d)\n",
 		 opal.size, sizep, runtimesz);
 
-	powerpc_firmware_features |= FW_FEATURE_OPAL;
 	if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) {
-		powerpc_firmware_features |= FW_FEATURE_OPALv3;
-		pr_info("OPAL V3 detected !\n");
+		powerpc_firmware_features |= FW_FEATURE_OPAL;
+		pr_info("OPAL detected !\n");
 	} else {
 		panic("OPAL != V3 detected, no longer supported.\n");
 	}
@@ -348,17 +347,15 @@ int opal_put_chars(uint32_t vtermno, const char *data, int total_len)
 	 * enough room and be done with it
 	 */
 	spin_lock_irqsave(&opal_write_lock, flags);
-	if (firmware_has_feature(FW_FEATURE_OPALv3)) {
-		rc = opal_console_write_buffer_space(vtermno, &olen);
-		len = be64_to_cpu(olen);
-		if (rc || len < total_len) {
-			spin_unlock_irqrestore(&opal_write_lock, flags);
-			/* Closed -> drop characters */
-			if (rc)
-				return total_len;
-			opal_poll_events(NULL);
-			return -EAGAIN;
-		}
+	rc = opal_console_write_buffer_space(vtermno, &olen);
+	len = be64_to_cpu(olen);
+	if (rc || len < total_len) {
+		spin_unlock_irqrestore(&opal_write_lock, flags);
+		/* Closed -> drop characters */
+		if (rc)
+			return total_len;
+		opal_poll_events(NULL);
+		return -EAGAIN;
 	}
 
 	/* We still try to handle partial completions, though they
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 414fd1a00fda..cdd5fa942aed 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -344,7 +344,7 @@ static void __init pnv_ioda_parse_m64_window(struct pnv_phb *phb)
 		return;
 	}
 
-	if (!firmware_has_feature(FW_FEATURE_OPALv3)) {
+	if (!firmware_has_feature(FW_FEATURE_OPAL)) {
 		pr_info("  Firmware too old to support M64 window\n");
 		return;
 	}
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 54583fc417be..1acb0c72d923 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -90,8 +90,8 @@ static void pnv_show_cpuinfo(struct seq_file *m)
 	if (root)
 		model = of_get_property(root, "model", NULL);
 	seq_printf(m, "machine\t\t: PowerNV %s\n", model);
-	if (firmware_has_feature(FW_FEATURE_OPALv3))
-		seq_printf(m, "firmware\t: OPAL v3\n");
+	if (firmware_has_feature(FW_FEATURE_OPAL))
+		seq_printf(m, "firmware\t: OPAL\n");
 	else
 		seq_printf(m, "firmware\t: BML\n");
 	of_node_put(root);
@@ -220,9 +220,9 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
 {
 	xics_kexec_teardown_cpu(secondary);
 
-	/* On OPAL v3, we return all CPUs to firmware */
+	/* On OPAL, we return all CPUs to firmware */
 
-	if (!firmware_has_feature(FW_FEATURE_OPALv3))
+	if (!firmware_has_feature(FW_FEATURE_OPAL))
 		return;
 
 	if (secondary) {
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 9b968a315103..ad7b1a3dbed0 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -61,14 +61,15 @@ static int pnv_smp_kick_cpu(int nr)
 	unsigned long start_here =
 			__pa(ppc_function_entry(generic_secondary_smp_init));
 	long rc;
+	uint8_t status;
 
 	BUG_ON(nr < 0 || nr >= NR_CPUS);
 
 	/*
-	 * If we already started or OPALv3 is not supported, we just
+	 * If we already started or OPAL is not supported, we just
 	 * kick the CPU via the PACA
 	 */
-	if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv3))
+	if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPAL))
 		goto kick;
 
 	/*
@@ -77,55 +78,42 @@ static int pnv_smp_kick_cpu(int nr)
 	 * first time. OPAL v3 allows us to query OPAL to know if it
 	 * has the CPUs, so we do that
 	 */
-	if (firmware_has_feature(FW_FEATURE_OPALv3)) {
-		uint8_t status;
-
-		rc = opal_query_cpu_status(pcpu, &status);
-		if (rc != OPAL_SUCCESS) {
-			pr_warn("OPAL Error %ld querying CPU %d state\n",
-				rc, nr);
-			return -ENODEV;
-		}
+	rc = opal_query_cpu_status(pcpu, &status);
+	if (rc != OPAL_SUCCESS) {
+		pr_warn("OPAL Error %ld querying CPU %d state\n", rc, nr);
+		return -ENODEV;
+	}
 
-		/*
-		 * Already started, just kick it, probably coming from
-		 * kexec and spinning
-		 */
-		if (status == OPAL_THREAD_STARTED)
-			goto kick;
+	/*
+	 * Already started, just kick it, probably coming from
+	 * kexec and spinning
+	 */
+	if (status == OPAL_THREAD_STARTED)
+		goto kick;
 
-		/*
-		 * Available/inactive, let's kick it
-		 */
-		if (status == OPAL_THREAD_INACTIVE) {
-			pr_devel("OPAL: Starting CPU %d (HW 0x%x)...\n",
-				 nr, pcpu);
-			rc = opal_start_cpu(pcpu, start_here);
-			if (rc != OPAL_SUCCESS) {
-				pr_warn("OPAL Error %ld starting CPU %d\n",
-					rc, nr);
-				return -ENODEV;
-			}
-		} else {
-			/*
-			 * An unavailable CPU (or any other unknown status)
-			 * shouldn't be started. It should also
-			 * not be in the possible map but currently it can
-			 * happen
-			 */
-			pr_devel("OPAL: CPU %d (HW 0x%x) is unavailable"
-				 " (status %d)...\n", nr, pcpu, status);
+	/*
+	 * Available/inactive, let's kick it
+	 */
+	if (status == OPAL_THREAD_INACTIVE) {
+		pr_devel("OPAL: Starting CPU %d (HW 0x%x)...\n", nr, pcpu);
+		rc = opal_start_cpu(pcpu, start_here);
+		if (rc != OPAL_SUCCESS) {
+			pr_warn("OPAL Error %ld starting CPU %d\n", rc, nr);
 			return -ENODEV;
 		}
 	} else {
 		/*
-		 * On OPAL v2, we just kick it and hope for the best,
-		 * we must not test the error from opal_start_cpu() or
-		 * we would fail to get CPUs from kexec.
+		 * An unavailable CPU (or any other unknown status)
+		 * shouldn't be started. It should also
+		 * not be in the possible map but currently it can
+		 * happen
 		 */
-		opal_start_cpu(pcpu, start_here);
+		pr_devel("OPAL: CPU %d (HW 0x%x) is unavailable"
+			 " (status %d)...\n", nr, pcpu, status);
+		return -ENODEV;
 	}
- kick:
+
+kick:
 	return smp_generic_kick_cpu(nr);
 }
 
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index cb501386eb6e..547890fd9572 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -586,7 +586,7 @@ static int __init powernv_cpufreq_init(void)
 	int rc = 0;
 
 	/* Don't probe on pseries (guest) platforms */
-	if (!firmware_has_feature(FW_FEATURE_OPALv3))
+	if (!firmware_has_feature(FW_FEATURE_OPAL))
 		return -ENODEV;
 
 	/* Discover pstates from device tree and init */
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index 845bafcfa792..e12dc30d8864 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -264,7 +264,7 @@ static int powernv_idle_probe(void)
 	if (cpuidle_disable != IDLE_NO_OVERRIDE)
 		return -ENODEV;
 
-	if (firmware_has_feature(FW_FEATURE_OPALv3)) {
+	if (firmware_has_feature(FW_FEATURE_OPAL)) {
 		cpuidle_state_table = powernv_states;
 		/* Device tree can indicate more idle states */
 		max_idle_state = powernv_add_idle_states();
-- 
2.1.4

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

* Re: [v2,1/3] powerpc/powernv: panic() on OPAL < V3
  2015-12-09  6:18 ` [PATCH v2 1/3] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
@ 2015-12-17 11:57   ` Michael Ellerman
  0 siblings, 0 replies; 21+ messages in thread
From: Michael Ellerman @ 2015-12-17 11:57 UTC (permalink / raw)
  To: Stewart Smith, linuxppc-dev; +Cc: Stewart Smith, Andrew Donnellan

On Wed, 2015-09-12 at 06:18:18 UTC, Stewart Smith wrote:
> The OpenPower Abstraction Layer firmware went through a couple
> of iterations in the lab before being released. What we now know
> as OPAL advertises itself as OPALv3.
> 
> OPALv2 and OPALv1 never made it outside the lab, and the possibility
> of anyone at all ever building a mainline kernel today and expecting
> it to boot on such hardware is zero.
> 
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/786842b62f81f20d14894925e8

cheers

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

end of thread, other threads:[~2015-12-17 11:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27  4:45 [PATCH 0/4] Remove OPAL pre-v3 support Stewart Smith
2015-11-27  4:45 ` [PATCH 1/4] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
2015-11-27  5:36   ` Andrew Donnellan
2015-11-27  5:43     ` Stewart Smith
2015-11-27  5:56       ` Andrew Donnellan
2015-11-30  0:20     ` Andrew Donnellan
2015-11-27  7:13   ` kbuild test robot
2015-11-27  4:45 ` [PATCH 2/4] powerpc/powernv: Remove OPALv2 firmware define and references Stewart Smith
2015-11-27  5:31   ` Andrew Donnellan
2015-11-27  4:45 ` [PATCH 3/4] powerpc/powernv: remove FW_FEATURE_OPAL and just use FW_FEATURE_OPALv3 Stewart Smith
2015-11-27  5:45   ` Andrew Donnellan
2015-12-01  3:56   ` Michael Ellerman
2015-12-03  6:06     ` Stewart Smith
2015-12-03  8:55       ` Michael Ellerman
2015-11-27  4:45 ` [PATCH 4/4] powerpc/powernv: remove logic for pre-OPALv3 firmware Stewart Smith
2015-11-27  5:55   ` Andrew Donnellan
2015-12-09  6:18 ` [PATCH v2 0/3] Remove OPAL pre-v3 support Stewart Smith
2015-12-09  6:18 ` [PATCH v2 1/3] powerpc/powernv: panic() on OPAL < V3 Stewart Smith
2015-12-17 11:57   ` [v2,1/3] " Michael Ellerman
2015-12-09  6:18 ` [PATCH v2 2/3] powerpc/powernv: Remove OPALv2 firmware define and references Stewart Smith
2015-12-09  6:18 ` [PATCH v2 3/3] powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL Stewart Smith

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).