Skip to content

Commit 7c37952

Browse files
bonziniozbenh
authored andcommitted
powerpc: move hmi.c to arch/powerpc/kvm/
hmi.c functions are unused unless sibling_subcore_state is nonzero, and that in turn happens only if KVM is in use. So move the code to arch/powerpc/kvm/, putting it under CONFIG_KVM_BOOK3S_HV_POSSIBLE rather than CONFIG_PPC_BOOK3S_64. The sibling_subcore_state is also included in struct paca_struct only if KVM is supported by the kernel. Cc: Daniel Axtens <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Mahesh Salgaonkar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent 41017a7 commit 7c37952

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

arch/powerpc/include/asm/hmi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#ifndef __ASM_PPC64_HMI_H__
2222
#define __ASM_PPC64_HMI_H__
2323

24-
#ifdef CONFIG_PPC_BOOK3S_64
24+
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
2525

2626
#define CORE_TB_RESYNC_REQ_BIT 63
2727
#define MAX_SUBCORE_PER_CORE 4

arch/powerpc/include/asm/paca.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,6 @@ struct paca_struct {
183183
*/
184184
u16 in_mce;
185185
u8 hmi_event_available; /* HMI event is available */
186-
/*
187-
* Bitmap for sibling subcore status. See kvm/book3s_hv_ras.c for
188-
* more details
189-
*/
190-
struct sibling_subcore_state *sibling_subcore_state;
191186
#endif
192187

193188
/* Stuff for accurate time accounting */
@@ -202,6 +197,13 @@ struct paca_struct {
202197
struct kvmppc_book3s_shadow_vcpu shadow_vcpu;
203198
#endif
204199
struct kvmppc_host_state kvm_hstate;
200+
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
201+
/*
202+
* Bitmap for sibling subcore status. See kvm/book3s_hv_ras.c for
203+
* more details
204+
*/
205+
struct sibling_subcore_state *sibling_subcore_state;
206+
#endif
205207
#endif
206208
};
207209

arch/powerpc/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ obj-$(CONFIG_VDSO32) += vdso32/
4141
obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
4242
obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o
4343
obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_power.o
44-
obj-$(CONFIG_PPC_BOOK3S_64) += mce.o mce_power.o hmi.o
44+
obj-$(CONFIG_PPC_BOOK3S_64) += mce.o mce_power.o
4545
obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o idle_book3e.o
4646
obj-$(CONFIG_PPC64) += vdso64/
4747
obj-$(CONFIG_ALTIVEC) += vecemu.o

arch/powerpc/kvm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \
7878

7979
ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
8080
kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \
81+
book3s_hv_hmi.o \
8182
book3s_hv_rmhandlers.o \
8283
book3s_hv_rm_mmu.o \
8384
book3s_hv_ras.o \
File renamed without changes.

0 commit comments

Comments
 (0)