Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1957477imm; Thu, 24 May 2018 03:35:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpEP2rM01CRi4e2+iYEepOHuYhYDoJ8TsXYmSojtWHJmUjeBtddL+2HP+Nx/Y9B1h/0+z/A X-Received: by 2002:a63:a042:: with SMTP id u2-v6mr829026pgn.413.1527158137211; Thu, 24 May 2018 03:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527158137; cv=none; d=google.com; s=arc-20160816; b=C0vghyUhT2pkdY/PMD5FOIClmGMOMdi4Cj/4RqqNyWgwY4BOOI4kjDx7P0yHJwKTub ifmPfy7PK7g6xJGfcqhbXKBVIh1XF8d3TvDXFdEVqbLMrUNVt6+oOL2/SoRdunAsmtBc dAflY48DomlpMZZDxyYfp0xkyKfxn6tzfk+31uKefK0uh13mYKaHk11MxQ5hKd58AJlc oVmDp/duv1gMOJNW8pLzS34jofGQdLqbqcSl+rGTfPfa1LXedwAp5YLfbbHF9c9aC++G wQjeIxxtlIaT0iW+TxED+9a8a7NyikpwMIWDwOfQpLDC8IfQzfGYolY2i2EnAxIjxEve yneA== 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=c9/fVUo0OUcFuVicwys2UtrdzmDCgxojYrUatrNj/Yg=; b=vtngW2UDfAgYl1jbTAF0uuIk/Z9F+9VEegHlDoysYbaH0i6/EkLE0unVUsjWFsZzU5 FaB2zvtZdsIiQQogYvzTBhvZfgMA8Kwcoi9bJZzUounwKzayw6/EtTpUw0CgLw7Dkk/A DuIH5d9kS8f9wJ6Dhj5Ve9ve4WK/CMjSCelUsX3rNTdNVsDSW0y2/j+PzDkQweAjfIyN xhooQdXpY3u4Z/Jh0W7pcOKpDHZITl3cnFS7n2xphds/WQvTNPVRjFX66/XRKT2x/f3C E9Zbq340Yf48xifoeLN5JuXF5qYLhb59ZaAd6dKIsKVsp00fB8UXYNiADew2KYpuSGRU ZCNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g3BoI1TQ; 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 g8-v6si20640101plo.245.2018.05.24.03.35.22; Thu, 24 May 2018 03:35:37 -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=g3BoI1TQ; 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 S968433AbeEXKA2 (ORCPT + 99 others); Thu, 24 May 2018 06:00:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:42424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030840AbeEXKAS (ORCPT ); Thu, 24 May 2018 06:00: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 B7C1320890; Thu, 24 May 2018 10:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156018; bh=FuvPEwttjnYzJoZGz01ehlIyv2nqhD0LkancIUPyFCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g3BoI1TQfFnDF3uJAIQohOrPr66AQOu0PU2GI+vnzkCVuxEDXrkk/WWvnDsxcHl0l +NddPG68TGopjdxpemUVj0yfKT8+iUd7TnmaWa8rYjNSr/PmtD8gKPbwP6mS0jEY+6 Z92/eSugzBiQL4IUGQRN3B49D/Rq7EHkKrZ1zjK0= 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.16 035/161] powerpc/rfi-flush: Always enable fallback flush on pseries Date: Thu, 24 May 2018 11:37:40 +0200 Message-Id: <20180524093022.562595919@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-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);