Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2360291imm; Mon, 28 May 2018 06:42:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJIQZY08R+hEiuyMc9R/B9lPIk/hDxnkFXn2pK0PDq3OIUcmIrla5+HbP/sIVzV7NOsycZF X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr2002215plb.353.1527514971678; Mon, 28 May 2018 06:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527514971; cv=none; d=google.com; s=arc-20160816; b=pffEhU2duZ3k1xQZfYPUHvSAbY+N1o2dD6ZOr1Ary9AKE//gw7Ei9XiRos0K9UfIBn Gh91S0Dxtb2rc+KhDo7vzHe3ecXW8zFeRB7hwtAtG+5zj1SPQy3XH3p5+z/ds0wH6l79 knnGvb5+/nuyyKS15usT/PGWlNWX+u8a+G+e7xtvJlFK+XVW5cu/PkLfIZbPyOFBVl+F NZW3u3Rig2go0N/PemXSoys6xDzicSY4d+bGaZkM0rF/GlOp6P8tS2WF+QDOhpBBmd7B 53BafTPSdA/qEpDtLzW5O+JFhbZdVSVteAYEkoFzLiToS7rxjSkY2OxkakycEihTGxs/ zbGg== 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=AK9jqz/AoI0SOMiInYjwNOZuwYsCqnsxu0/k1zdaB8k=; b=vHhJFa+TParuZl5UIzIdCKNpLvagsliqimzHQJ7FH90pVCShKZilRwpxqfxd5WLnMF IoD/nx4ws/fM8yH2/GM7b11PKa4+ZrNLA5rgFB33nqk8HajlNjRapx6zF1AIUBB+UGRE tk7KPcFmxwceBhXc5sSzdtk0B5IDazKytSDhg7k/x/aQRKsxkZSh8eeCPwxsn4TMre+d 2IRK+cg0rEsg6O4L378Iq6u4pvWH7+SfZ4rcHNhKCf2F58u7LJCbBY36GzKx4ckQdrJ/ 7QHRzmXBdueDbcINgI6EnYSWLDF78OazZSDQlmuczbaQgwGgT1Z5J5DWqiunH+UyLffq 7Elw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sxB8RPa4; 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 h4-v6si29039854pls.490.2018.05.28.06.42.36; Mon, 28 May 2018 06:42:51 -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=sxB8RPa4; 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 S968946AbeE1Ko2 (ORCPT + 99 others); Mon, 28 May 2018 06:44:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:35102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968907AbeE1KoS (ORCPT ); Mon, 28 May 2018 06:44:18 -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 E603920660; Mon, 28 May 2018 10:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504258; bh=dCRsvdjNw5T2fk/0tL7KjVEGTTyMdtGaApu4pHBqpvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sxB8RPa40iZPxBeumuKR8gzuuycWmxa5jC8oKlccKFN+ZK9Yr5ygof+hT6Jv9Kn1M yJ1onHfN8/jwgfnC2mHqP45taPAYuXwmfNDZ6sKQYVuJY+FCB9HrlZ7H8zHjCGArwj cDsaK9RKbgluovtFlvTdk77zZfpfTxHWA9PyKV3M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, greg@kroah.com Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman , Mauricio Faria de Oliveira Subject: [PATCH 4.14 039/496] powerpc/rfi-flush: Always enable fallback flush on pseries Date: Mon, 28 May 2018 11:57:04 +0200 Message-Id: <20180528100321.317017045@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Ellerman commit 84749a58b6e382f109abf1e734bc4dd43c2c25bb upstream. This ensures the fallback flush area is always allocated on pseries, so in case a LPAR is migrated from a patched to an unpatched system, it is possible to enable the fallback flush in the target system. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/pseries/setup.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -468,26 +468,18 @@ static void pseries_setup_rfi_flush(void /* Enable by default */ enable = true; + types = L1D_FLUSH_FALLBACK; rc = plpar_get_cpu_characteristics(&result); if (rc == H_SUCCESS) { - types = L1D_FLUSH_NONE; - if (result.character & H_CPU_CHAR_L1D_FLUSH_TRIG2) types |= L1D_FLUSH_MTTRIG; if (result.character & H_CPU_CHAR_L1D_FLUSH_ORI30) types |= L1D_FLUSH_ORI; - /* Use fallback if nothing set in hcall */ - if (types == L1D_FLUSH_NONE) - types = L1D_FLUSH_FALLBACK; - if ((!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) || (!(result.behaviour & H_CPU_BEHAV_FAVOUR_SECURITY))) enable = false; - } else { - /* Default to fallback if case hcall is not available */ - types = L1D_FLUSH_FALLBACK; } setup_rfi_flush(types, enable);