diff options
author | Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com> | 2016-07-08 08:20:44 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-15 12:18:38 +0200 |
commit | 1706567117ba93cfa27f6fcc0846b1606e039cc5 (patch) | |
tree | e4ee3a670d81ef48abbf5daec123cb5236465c93 /arch/powerpc/mm/icswx.c | |
parent | powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle (diff) | |
download | linux-1706567117ba93cfa27f6fcc0846b1606e039cc5.tar.xz linux-1706567117ba93cfa27f6fcc0846b1606e039cc5.zip |
powerpc/kvm: make hypervisor state restore a function
In the current code, when the thread wakes up in reset vector, some
of the state restore code and check for whether a thread needs to
branch to kvm is duplicated. Reorder the code such that this
duplication is avoided.
At a higher level this is what the change looks like-
Before this patch -
power7_wakeup_tb_loss:
restore hypervisor state
if (thread needed by kvm)
goto kvm_start_guest
restore nvgprs, cr, pc
rfid to process context
power7_wakeup_loss:
restore nvgprs, cr, pc
rfid to process context
reset vector:
if (waking from deep idle states)
goto power7_wakeup_tb_loss
else
if (thread needed by kvm)
goto kvm_start_guest
goto power7_wakeup_loss
After this patch -
power7_wakeup_tb_loss:
restore hypervisor state
return
power7_restore_hyp_resource():
if (waking from deep idle states)
goto power7_wakeup_tb_loss
return
power7_wakeup_loss:
restore nvgprs, cr, pc
rfid to process context
reset vector:
power7_restore_hyp_resource()
if (thread needed by kvm)
goto kvm_start_guest
goto power7_wakeup_loss
Reviewed-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/icswx.c')
0 files changed, 0 insertions, 0 deletions