diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-08-11 09:07:43 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2016-09-09 02:18:07 -0400 |
commit | 3f2577749948803491874c6895fec559f3473eab (patch) | |
tree | 1e6afff0ca5ee50a2387785105ecdb3b5b8bfcf7 | |
parent | 4ee11c1a9f7cc20026bb66ac624533310a605312 (diff) |
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 <dja@axtens.net>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: kvm-ppc@vger.kernel.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
-rw-r--r-- | arch/powerpc/include/asm/hmi.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/paca.h | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_hmi.c (renamed from arch/powerpc/kernel/hmi.c) | 0 |
5 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/hmi.h b/arch/powerpc/include/asm/hmi.h index 88b4901ac4ee..85b7a1a21e22 100644 --- a/arch/powerpc/include/asm/hmi.h +++ b/arch/powerpc/include/asm/hmi.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef __ASM_PPC64_HMI_H__ | 21 | #ifndef __ASM_PPC64_HMI_H__ |
22 | #define __ASM_PPC64_HMI_H__ | 22 | #define __ASM_PPC64_HMI_H__ |
23 | 23 | ||
24 | #ifdef CONFIG_PPC_BOOK3S_64 | 24 | #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE |
25 | 25 | ||
26 | #define CORE_TB_RESYNC_REQ_BIT 63 | 26 | #define CORE_TB_RESYNC_REQ_BIT 63 |
27 | #define MAX_SUBCORE_PER_CORE 4 | 27 | #define MAX_SUBCORE_PER_CORE 4 |
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index 148303e7771f..6a6792bb39fb 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h | |||
@@ -183,11 +183,6 @@ struct paca_struct { | |||
183 | */ | 183 | */ |
184 | u16 in_mce; | 184 | u16 in_mce; |
185 | u8 hmi_event_available; /* HMI event is available */ | 185 | 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; | ||
191 | #endif | 186 | #endif |
192 | 187 | ||
193 | /* Stuff for accurate time accounting */ | 188 | /* Stuff for accurate time accounting */ |
@@ -202,6 +197,13 @@ struct paca_struct { | |||
202 | struct kvmppc_book3s_shadow_vcpu shadow_vcpu; | 197 | struct kvmppc_book3s_shadow_vcpu shadow_vcpu; |
203 | #endif | 198 | #endif |
204 | struct kvmppc_host_state kvm_hstate; | 199 | 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 | ||
205 | #endif | 207 | #endif |
206 | }; | 208 | }; |
207 | 209 | ||
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index b2027a5cf508..fe4c075bcf50 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -41,7 +41,7 @@ obj-$(CONFIG_VDSO32) += vdso32/ | |||
41 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o | 41 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
42 | obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o | 42 | obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o |
43 | obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_power.o | 43 | 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 |
45 | obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o idle_book3e.o | 45 | obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o idle_book3e.o |
46 | obj-$(CONFIG_PPC64) += vdso64/ | 46 | obj-$(CONFIG_PPC64) += vdso64/ |
47 | obj-$(CONFIG_ALTIVEC) += vecemu.o | 47 | obj-$(CONFIG_ALTIVEC) += vecemu.o |
diff --git a/arch/powerpc/kvm/Makefile b/arch/powerpc/kvm/Makefile index 1f9e5529e692..855d4b95d752 100644 --- a/arch/powerpc/kvm/Makefile +++ b/arch/powerpc/kvm/Makefile | |||
@@ -78,6 +78,7 @@ kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \ | |||
78 | 78 | ||
79 | ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE | 79 | ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE |
80 | kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ | 80 | kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ |
81 | book3s_hv_hmi.o \ | ||
81 | book3s_hv_rmhandlers.o \ | 82 | book3s_hv_rmhandlers.o \ |
82 | book3s_hv_rm_mmu.o \ | 83 | book3s_hv_rm_mmu.o \ |
83 | book3s_hv_ras.o \ | 84 | book3s_hv_ras.o \ |
diff --git a/arch/powerpc/kernel/hmi.c b/arch/powerpc/kvm/book3s_hv_hmi.c index e3f738eb1cac..e3f738eb1cac 100644 --- a/arch/powerpc/kernel/hmi.c +++ b/arch/powerpc/kvm/book3s_hv_hmi.c | |||