linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/kvm: Fix build error on book3s_hv.c
@ 2016-05-11  1:15 Gavin Shan
  2016-05-11  5:01 ` Balbir Singh
  2016-05-11 11:38 ` Paul Mackerras
  0 siblings, 2 replies; 3+ messages in thread
From: Gavin Shan @ 2016-05-11  1:15 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: kvm-ppc, warrier, mpe, Gavin Shan

When CONFIG_KVM_XICS is enabled, CPU_UP_PREPARE and other macros for
CPU states in linux/cpu.h are needed by arch/powerpc/kvm/book3s_hv.c.
Otherwise, build error as below is seen:

   gwshan@gwshan:~/sandbox/l$ make arch/powerpc/kvm/book3s_hv.o
    :
   CC      arch/powerpc/kvm/book3s_hv.o
   arch/powerpc/kvm/book3s_hv.c: In function ‘kvmppc_cpu_notify’:
   arch/powerpc/kvm/book3s_hv.c:3072:7: error: ‘CPU_UP_PREPARE’ \
   undeclared (first use in this function)

This fixes the issue introduced by commit <6f3bb80944> ("KVM: PPC:
Book3S HV: kvmppc_host_rm_ops - handle offlining CPUs").

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 4cd37b4..e20beae 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -27,6 +27,7 @@
 #include <linux/export.h>
 #include <linux/fs.h>
 #include <linux/anon_inodes.h>
+#include <linux/cpu.h>
 #include <linux/cpumask.h>
 #include <linux/spinlock.h>
 #include <linux/page-flags.h>
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/kvm: Fix build error on book3s_hv.c
  2016-05-11  1:15 [PATCH] powerpc/kvm: Fix build error on book3s_hv.c Gavin Shan
@ 2016-05-11  5:01 ` Balbir Singh
  2016-05-11 11:38 ` Paul Mackerras
  1 sibling, 0 replies; 3+ messages in thread
From: Balbir Singh @ 2016-05-11  5:01 UTC (permalink / raw)
  To: Gavin Shan, linuxppc-dev; +Cc: kvm-ppc, warrier, mpe



On 11/05/16 11:15, Gavin Shan wrote:
> When CONFIG_KVM_XICS is enabled, CPU_UP_PREPARE and other macros for
> CPU states in linux/cpu.h are needed by arch/powerpc/kvm/book3s_hv.c.
> Otherwise, build error as below is seen:
> 
>    gwshan@gwshan:~/sandbox/l$ make arch/powerpc/kvm/book3s_hv.o
>     :
>    CC      arch/powerpc/kvm/book3s_hv.o
>    arch/powerpc/kvm/book3s_hv.c: In function ‘kvmppc_cpu_notify’:
>    arch/powerpc/kvm/book3s_hv.c:3072:7: error: ‘CPU_UP_PREPARE’ \
>    undeclared (first use in this function)
> 
> This fixes the issue introduced by commit <6f3bb80944> ("KVM: PPC:
> Book3S HV: kvmppc_host_rm_ops - handle offlining CPUs").
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> ---
I ran into the same thing, fixed it, but forgot to send it out
Reviewed-by: Balbir Singh <bsingharora@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/kvm: Fix build error on book3s_hv.c
  2016-05-11  1:15 [PATCH] powerpc/kvm: Fix build error on book3s_hv.c Gavin Shan
  2016-05-11  5:01 ` Balbir Singh
@ 2016-05-11 11:38 ` Paul Mackerras
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Mackerras @ 2016-05-11 11:38 UTC (permalink / raw)
  To: Gavin Shan; +Cc: linuxppc-dev, kvm-ppc, warrier, mpe

On Wed, May 11, 2016 at 11:15:55AM +1000, Gavin Shan wrote:
> When CONFIG_KVM_XICS is enabled, CPU_UP_PREPARE and other macros for
> CPU states in linux/cpu.h are needed by arch/powerpc/kvm/book3s_hv.c.
> Otherwise, build error as below is seen:
> 
>    gwshan@gwshan:~/sandbox/l$ make arch/powerpc/kvm/book3s_hv.o
>     :
>    CC      arch/powerpc/kvm/book3s_hv.o
>    arch/powerpc/kvm/book3s_hv.c: In function ‘kvmppc_cpu_notify’:
>    arch/powerpc/kvm/book3s_hv.c:3072:7: error: ‘CPU_UP_PREPARE’ \
>    undeclared (first use in this function)
> 
> This fixes the issue introduced by commit <6f3bb80944> ("KVM: PPC:
> Book3S HV: kvmppc_host_rm_ops - handle offlining CPUs").
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

Thanks, applied to my kvm-ppc-next branch (with cc:
stable@vger.kernel.org).

Paul.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-11 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11  1:15 [PATCH] powerpc/kvm: Fix build error on book3s_hv.c Gavin Shan
2016-05-11  5:01 ` Balbir Singh
2016-05-11 11:38 ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).