]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.133/powerpc-powernv-remove-opalv2-firmware-define-and-references.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.133 / powerpc-powernv-remove-opalv2-firmware-define-and-references.patch
CommitLineData
bdae2828
GKH
1From 7261aafc095763b119136a562540dea7b1ccf657 Mon Sep 17 00:00:00 2001
2From: Stewart Smith <stewart@linux.vnet.ibm.com>
3Date: Wed, 9 Dec 2015 17:18:19 +1100
4Subject: powerpc/powernv: Remove OPALv2 firmware define and references
5
6From: Stewart Smith <stewart@linux.vnet.ibm.com>
7
8commit 7261aafc095763b119136a562540dea7b1ccf657 upstream.
9
10OPALv2 only ever existed in the lab and didn't escape to the world.
11All OPAL systems in the wild are OPALv3.
12
13The probability of there being an OPALv2 system still powered on
14anywhere inside IBM is approximately zero, let alone anyone
15expecting to run mainline kernels.
16
17So, start to remove references to OPALv2.
18
19Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
20Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
21Signed-off-by: Mike Galbraith <mgalbraith@suse.de>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24---
25 arch/powerpc/include/asm/firmware.h | 4 +---
26 arch/powerpc/platforms/powernv/opal.c | 8 ++------
27 arch/powerpc/platforms/powernv/setup.c | 4 ----
28 arch/powerpc/platforms/powernv/smp.c | 4 ++--
29 4 files changed, 5 insertions(+), 15 deletions(-)
30
31--- a/arch/powerpc/include/asm/firmware.h
32+++ b/arch/powerpc/include/asm/firmware.h
33@@ -47,7 +47,6 @@
34 #define FW_FEATURE_VPHN ASM_CONST(0x0000000004000000)
35 #define FW_FEATURE_XCMO ASM_CONST(0x0000000008000000)
36 #define FW_FEATURE_OPAL ASM_CONST(0x0000000010000000)
37-#define FW_FEATURE_OPALv2 ASM_CONST(0x0000000020000000)
38 #define FW_FEATURE_SET_MODE ASM_CONST(0x0000000040000000)
39 #define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000)
40 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
41@@ -70,8 +69,7 @@ enum {
42 FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
43 FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
44 FW_FEATURE_PSERIES_ALWAYS = 0,
45- FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2 |
46- FW_FEATURE_OPALv3,
47+ FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv3,
48 FW_FEATURE_POWERNV_ALWAYS = 0,
49 FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
50 FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
51--- a/arch/powerpc/platforms/powernv/opal.c
52+++ b/arch/powerpc/platforms/powernv/opal.c
53@@ -100,7 +100,6 @@ int __init early_init_dt_scan_opal(unsig
54
55 powerpc_firmware_features |= FW_FEATURE_OPAL;
56 if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) {
57- powerpc_firmware_features |= FW_FEATURE_OPALv2;
58 powerpc_firmware_features |= FW_FEATURE_OPALv3;
59 pr_info("OPAL V3 detected !\n");
60 } else {
61@@ -349,7 +348,7 @@ int opal_put_chars(uint32_t vtermno, con
62 * enough room and be done with it
63 */
64 spin_lock_irqsave(&opal_write_lock, flags);
65- if (firmware_has_feature(FW_FEATURE_OPALv2)) {
66+ if (firmware_has_feature(FW_FEATURE_OPALv3)) {
67 rc = opal_console_write_buffer_space(vtermno, &olen);
68 len = be64_to_cpu(olen);
69 if (rc || len < total_len) {
70@@ -693,10 +692,7 @@ static int __init opal_init(void)
71 }
72
73 /* Register OPAL consoles if any ports */
74- if (firmware_has_feature(FW_FEATURE_OPALv2))
75- consoles = of_find_node_by_path("/ibm,opal/consoles");
76- else
77- consoles = of_node_get(opal_node);
78+ consoles = of_find_node_by_path("/ibm,opal/consoles");
79 if (consoles) {
80 for_each_child_of_node(consoles, np) {
81 if (strcmp(np->name, "serial"))
82--- a/arch/powerpc/platforms/powernv/setup.c
83+++ b/arch/powerpc/platforms/powernv/setup.c
84@@ -142,10 +142,6 @@ static void pnv_show_cpuinfo(struct seq_
85 seq_printf(m, "machine\t\t: PowerNV %s\n", model);
86 if (firmware_has_feature(FW_FEATURE_OPALv3))
87 seq_printf(m, "firmware\t: OPAL v3\n");
88- else if (firmware_has_feature(FW_FEATURE_OPALv2))
89- seq_printf(m, "firmware\t: OPAL v2\n");
90- else if (firmware_has_feature(FW_FEATURE_OPAL))
91- seq_printf(m, "firmware\t: OPAL v1\n");
92 else
93 seq_printf(m, "firmware\t: BML\n");
94 of_node_put(root);
95--- a/arch/powerpc/platforms/powernv/smp.c
96+++ b/arch/powerpc/platforms/powernv/smp.c
97@@ -65,10 +65,10 @@ static int pnv_smp_kick_cpu(int nr)
98 BUG_ON(nr < 0 || nr >= NR_CPUS);
99
100 /*
101- * If we already started or OPALv2 is not supported, we just
102+ * If we already started or OPALv3 is not supported, we just
103 * kick the CPU via the PACA
104 */
105- if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv2))
106+ if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv3))
107 goto kick;
108
109 /*