Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2045712imm; Thu, 24 May 2018 05:03:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPKjH7gopzzm0weIbWPtHPpo7Fm7vuVvKW9a5Q6+3V1QCph/ywZ2Pj1Mw5TjSaxwUiucN4 X-Received: by 2002:a17:902:7082:: with SMTP id z2-v6mr6960672plk.373.1527163383998; Thu, 24 May 2018 05:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527163383; cv=none; d=google.com; s=arc-20160816; b=oBhqQYtZL5vkiCetqBPJr3j5F+3LCX4daDmxu/zLDobPGbLkv43LFb21KvAZpxAavm IVFHAGe2H/9PrHn+zM6uYP8DdfgjITcteUoYPvqnln3HuUYKrviwKcWUrPmvvZGmG/DC 5RgCwYgoiAUPWmaoYSrBAGlujQEflPkAOqUwXcO0vhDmTrizhh3IIf+/XYwCTyJh5/pI L95EGtTuYaQurh6cpUyctJLihXEmyvAvmu2VgxDTF1fcQXOPTWtZIAotARZX0clu4J9X HpDFHhbQ0X5g9TJIM9rGEPUAZDjnsMiCTpxbKLHL+P4E7lhVAHr27X6kf26yuQEoHdei 4o/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=kTNDxz74pGBjn+N8fQBHQgHhkSVvVuzOb6LOzZ8LDAc=; b=dcIIcTet9kzZ2sVkIhDt2vi2ewBGUJ9z08xd8zQR6vKR6zG0C56y5slhfYmIvw4M9D 03RrEHXWPsuiIEgt22mJaerE7DTljRju9Ezo7t1+gRmHWvHH40yTk9sw5Tw6anFqnaMo urgbQXue1rUPjtEmbh2NkVl9m6TsnAZlQINnlk59WAleDDGTfAnTLV+0MwTmbDl39+7e 8AkNDAjbA/4JweB58zUZ+NRauiHqNu1a3Fx22iKVrFpRbXexpS/Kj2cNUC9cIA8dWTov cLoYSAeNF4phIncf/PzRAIxfGqsU15ZWAGOMRSO2Dt34i+Oi0byEYJL5k4KGrQ3tgHFZ NNIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RTQ/l3iy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21-v6si6283704pgn.498.2018.05.24.05.02.38; Thu, 24 May 2018 05:03:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RTQ/l3iy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966705AbeEXJo5 (ORCPT + 99 others); Thu, 24 May 2018 05:44:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:56032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966695AbeEXJot (ORCPT ); Thu, 24 May 2018 05:44:49 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16C5A208D6; Thu, 24 May 2018 09:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155088; bh=ezyzaCdDA9l6lwlye1jsI8vSpo9yJPj5YWIuiE6AYc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTQ/l3iyho3q7rdne34HU0J8wGR7eOVB9tOiEqgyyqdjaIDpWx0/Ktm2xpBRrWozp m+2WakmkdhUo3GyAEFinBn2Ec2y5rzvJXTBLT+klsLTZH4g85LEM1Q9lyLwvmQk9Pq I8JD4dA3GhVb8LAFCuu2gTGut63ZN2X97oJWOuHM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stewart Smith , Michael Ellerman , Mike Galbraith Subject: [PATCH 4.4 43/92] powerpc/powernv: Remove OPALv2 firmware define and references Date: Thu, 24 May 2018 11:38:20 +0200 Message-Id: <20180524093203.419078826@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093159.286472249@linuxfoundation.org> References: <20180524093159.286472249@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stewart Smith commit 7261aafc095763b119136a562540dea7b1ccf657 upstream. 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 Signed-off-by: Michael Ellerman Signed-off-by: Mike Galbraith Signed-off-by: Greg Kroah-Hartman --- 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(-) --- 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, --- 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(unsig 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, con * 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")) --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -142,10 +142,6 @@ static void pnv_show_cpuinfo(struct seq_ 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); --- 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; /*