diff mbox series

[v2,2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers

Message ID 20220916105736.268153-3-disgoel@linux.vnet.ibm.com (mailing list archive)
State Accepted
Commit 4ac9d3187cc7ccba25f76a3faef3e08a366f77b9
Headers show
Series Remove unused macros from asm-offset | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.

Commit Message

Disha Goel Sept. 16, 2022, 10:57 a.m. UTC
From: Kajol Jain" <kjain@linux.ibm.com>

Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore
in C") removed the PMU save/restore functions from assembly code and
implemented these functions in C, for power9 and later platforms.

After the code refactoring, Performance Monitoring Unit (PMU) registers
became part of "p9_host_os_sprs" structure and now this structure is
used to save/restore pmu host registers, for power9 and later platfroms.
But we still have old unused registers references. Patch removes unused
host_mmcr references for Monitor Mode Control Register 3 (MMCR3)/
Sampled Instruction Event Register 2 (SIER2)/ SIER3 registers from
"struct kvmppc_host_state".

Fixes: 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C")
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
---
 arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicholas Piggin Sept. 20, 2022, 8:15 a.m. UTC | #1
On Fri Sep 16, 2022 at 8:57 PM AEST, Disha Goel wrote:
> From: Kajol Jain" <kjain@linux.ibm.com>
>
> Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore
> in C") removed the PMU save/restore functions from assembly code and
> implemented these functions in C, for power9 and later platforms.
>
> After the code refactoring, Performance Monitoring Unit (PMU) registers
> became part of "p9_host_os_sprs" structure and now this structure is
> used to save/restore pmu host registers, for power9 and later platfroms.
> But we still have old unused registers references. Patch removes unused
> host_mmcr references for Monitor Mode Control Register 3 (MMCR3)/
> Sampled Instruction Event Register 2 (SIER2)/ SIER3 registers from
> "struct kvmppc_host_state".
>
> Fixes: 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C")
> Signed-off-by: Kajol Jain <kjain@linux.ibm.com>

And it was increased from 7 to 10 with 5752fe0b811bb which added the
POWER10 registers, so that makes sense to go back to 7 in the POWER8
path.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

> ---
>  arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc/include/asm/kvm_book3s_asm.h
> index c8882d9b86c2..a36797938620 100644
> --- a/arch/powerpc/include/asm/kvm_book3s_asm.h
> +++ b/arch/powerpc/include/asm/kvm_book3s_asm.h
> @@ -105,7 +105,7 @@ struct kvmppc_host_state {
>  	void __iomem *xive_tima_virt;
>  	u32 saved_xirr;
>  	u64 dabr;
> -	u64 host_mmcr[10];	/* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER, MMCR3, SIER2/3 */
> +	u64 host_mmcr[7];	/* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER */
>  	u32 host_pmc[8];
>  	u64 host_purr;
>  	u64 host_spurr;
> -- 
> 2.31.1
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc/include/asm/kvm_book3s_asm.h
index c8882d9b86c2..a36797938620 100644
--- a/arch/powerpc/include/asm/kvm_book3s_asm.h
+++ b/arch/powerpc/include/asm/kvm_book3s_asm.h
@@ -105,7 +105,7 @@  struct kvmppc_host_state {
 	void __iomem *xive_tima_virt;
 	u32 saved_xirr;
 	u64 dabr;
-	u64 host_mmcr[10];	/* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER, MMCR3, SIER2/3 */
+	u64 host_mmcr[7];	/* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER */
 	u32 host_pmc[8];
 	u64 host_purr;
 	u64 host_spurr;