diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2022-03-28 21:11:24 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-03-28 21:11:24 +1100 |
commit | 1aa940d97f8cee25d48faf05d18eddfbc2fe9554 (patch) | |
tree | 8465d3b8a83446155779cc13fb74123ecb5da87e /arch/powerpc/platforms | |
parent | f82da161ea75dc4db21b2499e4b1facd36dab275 (diff) | |
parent | f771b55731fc82b1e8e9ef123f6f1b8d8c92bc63 (diff) |
Merge branch 'topic/ppc-kvm' into next
Merge some more commits from our KVM topic branch. In particular this
brings in some commits that depend on a new capability that was merged
via the KVM tree for v5.18.
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 069d7b3bb142..955ff8aa1644 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -353,6 +353,14 @@ static void pseries_lpar_idle(void) pseries_idle_epilog(); } +static bool pseries_reloc_on_exception_enabled; + +bool pseries_reloc_on_exception(void) +{ + return pseries_reloc_on_exception_enabled; +} +EXPORT_SYMBOL_GPL(pseries_reloc_on_exception); + /* * Enable relocation on during exceptions. This has partition wide scope and * may take a while to complete, if it takes longer than one second we will @@ -377,6 +385,7 @@ bool pseries_enable_reloc_on_exc(void) " on exceptions: %ld\n", rc); return false; } + pseries_reloc_on_exception_enabled = true; return true; } @@ -404,7 +413,9 @@ void pseries_disable_reloc_on_exc(void) break; mdelay(get_longbusy_msecs(rc)); } - if (rc != H_SUCCESS) + if (rc == H_SUCCESS) + pseries_reloc_on_exception_enabled = false; + else pr_warn("Warning: Failed to disable relocation on exceptions: %ld\n", rc); } |