Skip to content

Commit 84749a5

Browse files
committed
powerpc/rfi-flush: Always enable fallback flush on pseries
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 <[email protected]> Signed-off-by: Mauricio Faria de Oliveira <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent abf110f commit 84749a5

File tree

1 file changed

+1
-9
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+1
-9
lines changed

arch/powerpc/platforms/pseries/setup.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,26 +468,18 @@ static void pseries_setup_rfi_flush(void)
468468

469469
/* Enable by default */
470470
enable = true;
471+
types = L1D_FLUSH_FALLBACK;
471472

472473
rc = plpar_get_cpu_characteristics(&result);
473474
if (rc == H_SUCCESS) {
474-
types = L1D_FLUSH_NONE;
475-
476475
if (result.character & H_CPU_CHAR_L1D_FLUSH_TRIG2)
477476
types |= L1D_FLUSH_MTTRIG;
478477
if (result.character & H_CPU_CHAR_L1D_FLUSH_ORI30)
479478
types |= L1D_FLUSH_ORI;
480479

481-
/* Use fallback if nothing set in hcall */
482-
if (types == L1D_FLUSH_NONE)
483-
types = L1D_FLUSH_FALLBACK;
484-
485480
if ((!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) ||
486481
(!(result.behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)))
487482
enable = false;
488-
} else {
489-
/* Default to fallback if case hcall is not available */
490-
types = L1D_FLUSH_FALLBACK;
491483
}
492484

493485
setup_rfi_flush(types, enable);

0 commit comments

Comments
 (0)