Home Home > GIT Browse > openSUSE-42.2
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-01-10 17:12:49 +0100
committerMichal Suchanek <msuchanek@suse.de>2018-01-10 18:29:29 +0100
commit4ff0f9957d42408c5945976290eba6268559f910 (patch)
treea7ff0cb2c6ad91be1406ef45d6798a0cb8a50c1e
parent58e8fe651aa400433ca791e41c5f8cecb94c8ff8 (diff)
Refresh patches.suse/powerpc-Secure-memory-rfi-flush-SLE12SP3.patch.
Re-enable fixup detection by CPU type in case hypervisor call fails. suse-commit: a1e6d38bc92679d25c74902a1e89dc46eebbd7af
-rw-r--r--arch/powerpc/platforms/powernv/setup.c11
-rw-r--r--arch/powerpc/platforms/pseries/setup.c11
2 files changed, 18 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 4e04834a458d..f813b5adfa37 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -44,8 +44,15 @@ static void pnv_setup_rfi_flush(void)
enum l1d_flush_type type;
int enable;
- /* Default to fallback in case fw-features are not available */
- type = L1D_FLUSH_FALLBACK;
+ if (pvr_version_is(PVR_POWER7) || pvr_version_is(PVR_POWER7p))
+ type = L1D_FLUSH_NONE;
+ else if (pvr_version_is(PVR_POWER8E) || pvr_version_is(PVR_POWER8NVL) ||
+ pvr_version_is(PVR_POWER8))
+ type = L1D_FLUSH_ORI;
+ else {
+ /* Default to fallback in case fw-features are not available */
+ type = L1D_FLUSH_FALLBACK;
+ }
enable = 1;
np = of_find_node_by_name(NULL, "ibm,opal");
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 238acacdac42..ec5a16ceeb78 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -570,8 +570,15 @@ static void pSeries_setup_rfi_flush(void)
if (!(behaviour & H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV))
enable = false;
} else {
- /* Default to fallback if case hcall is not available */
- types = L1D_FLUSH_FALLBACK;
+ if (pvr_version_is(PVR_POWER7) || pvr_version_is(PVR_POWER7p))
+ types = L1D_FLUSH_NONE;
+ else if (pvr_version_is(PVR_POWER8E) || pvr_version_is(PVR_POWER8NVL) ||
+ pvr_version_is(PVR_POWER8))
+ types = L1D_FLUSH_ORI;
+ else {
+ /* Default to fallback if case hcall is not available */
+ types = L1D_FLUSH_FALLBACK;
+ }
}
setup_rfi_flush(types, enable);