powerpc/kvm: Move pmu code in kvm folder to separate file for power9 and later platforms
authorKajol Jain <kjain@linux.ibm.com>
Mon, 11 Jul 2022 03:49:26 +0000 (09:19 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 20 Jul 2022 12:28:30 +0000 (22:28 +1000)
commitdb5360840f09eded71009a981084ab10a93a08d8
treed0cd3c8751728c1717b3d9d31eed6ba0091311c6
parentb8c7ee79b1a37442a910b8a313045fb9aa639911
powerpc/kvm: Move pmu code in kvm folder to separate file for power9 and later platforms

File book3s_hv_p9_entry.c in powerpc/kvm folder consists of functions
like freeze_pmu, switch_pmu_to_guest and switch_pmu_to_host which are
specific to Performance Monitoring Unit(PMU) for power9 and later
platforms.

For better maintenance, moving pmu related code from
book3s_hv_p9_entry.c to a new file called book3s_hv_p9_perf.c,
without any logic change.
Also make corresponding changes in the Makefile to include
book3s_hv_p9_perf.c during compilation.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220711034927.213192-1-kjain@linux.ibm.com
arch/powerpc/kvm/Makefile
arch/powerpc/kvm/book3s_hv_p9_entry.c
arch/powerpc/kvm/book3s_hv_p9_perf.c [new file with mode: 0644]