* [PATCH 1/2] KVM: PPC: Fix sparse static warning.
@ 2016-10-10 0:31 ` Daniel Axtens
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Axtens @ 2016-10-10 0:31 UTC (permalink / raw)
To: linuxppc-dev, kvm, kvm-ppc, paulus; +Cc: Daniel Axtens
Squash a couple of sparse warnings by making things static.
Build tested.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 05f09ae82587..95abca69b168 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -255,7 +255,7 @@ static void kvmppc_mmu_book3s_64_hv_reset_msr(struct kvm_vcpu *vcpu)
kvmppc_set_msr(vcpu, msr);
}
-long kvmppc_virtmode_do_h_enter(struct kvm *kvm, unsigned long flags,
+static long kvmppc_virtmode_do_h_enter(struct kvm *kvm, unsigned long flags,
long pte_index, unsigned long pteh,
unsigned long ptel, unsigned long *pte_idx_ret)
{
@@ -1608,7 +1608,7 @@ static ssize_t debugfs_htab_read(struct file *file, char __user *buf,
return ret;
}
-ssize_t debugfs_htab_write(struct file *file, const char __user *buf,
+static ssize_t debugfs_htab_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{
return -EACCES;
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 1/2] KVM: PPC: Fix sparse static warning.
@ 2016-10-10 0:31 ` Daniel Axtens
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Axtens @ 2016-10-10 0:31 UTC (permalink / raw)
To: linuxppc-dev, kvm, kvm-ppc, paulus; +Cc: Daniel Axtens
Squash a couple of sparse warnings by making things static.
Build tested.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 05f09ae82587..95abca69b168 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -255,7 +255,7 @@ static void kvmppc_mmu_book3s_64_hv_reset_msr(struct kvm_vcpu *vcpu)
kvmppc_set_msr(vcpu, msr);
}
-long kvmppc_virtmode_do_h_enter(struct kvm *kvm, unsigned long flags,
+static long kvmppc_virtmode_do_h_enter(struct kvm *kvm, unsigned long flags,
long pte_index, unsigned long pteh,
unsigned long ptel, unsigned long *pte_idx_ret)
{
@@ -1608,7 +1608,7 @@ static ssize_t debugfs_htab_read(struct file *file, char __user *buf,
return ret;
}
-ssize_t debugfs_htab_write(struct file *file, const char __user *buf,
+static ssize_t debugfs_htab_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{
return -EACCES;
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
2016-10-10 0:31 ` Daniel Axtens
@ 2016-10-10 0:31 ` Daniel Axtens
-1 siblings, 0 replies; 13+ messages in thread
From: Daniel Axtens @ 2016-10-10 0:31 UTC (permalink / raw)
To: linuxppc-dev, kvm, kvm-ppc, paulus; +Cc: Daniel Axtens
A bunch of KVM functions are only called from assembler.
Give them prototypes in asm-prototypes.h
This reduces sparse warnings.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
arch/powerpc/kvm/book3s_64_vio_hv.c | 1 +
arch/powerpc/kvm/book3s_hv_builtin.c | 1 +
arch/powerpc/kvm/book3s_hv_ras.c | 1 +
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 +
arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 +
6 files changed, 49 insertions(+)
diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index d1492736d852..6c853bcd11fa 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -14,6 +14,9 @@
#include <linux/threads.h>
#include <linux/kprobes.h>
+#ifdef CONFIG_KVM
+#include <linux/kvm_host.h>
+#endif
#include <uapi/asm/ucontext.h>
@@ -109,4 +112,45 @@ void early_setup_secondary(void);
/* time */
void accumulate_stolen_time(void);
+/* kvm */
+#ifdef CONFIG_KVM
+long kvmppc_rm_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
+ unsigned long ioba, unsigned long tce);
+long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
+ unsigned long liobn, unsigned long ioba,
+ unsigned long tce_list, unsigned long npages);
+long kvmppc_rm_h_stuff_tce(struct kvm_vcpu *vcpu,
+ unsigned long liobn, unsigned long ioba,
+ unsigned long tce_value, unsigned long npages);
+long int kvmppc_rm_h_confer(struct kvm_vcpu *vcpu, int target,
+ unsigned int yield_count);
+long kvmppc_h_random(struct kvm_vcpu *vcpu);
+void kvmhv_commence_exit(int trap);
+long kvmppc_realmode_machine_check(struct kvm_vcpu *vcpu);
+void kvmppc_subcore_enter_guest(void);
+void kvmppc_subcore_exit_guest(void);
+long kvmppc_realmode_hmi_handler(void);
+long kvmppc_h_enter(struct kvm_vcpu *vcpu, unsigned long flags,
+ long pte_index, unsigned long pteh, unsigned long ptel);
+long kvmppc_h_remove(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index, unsigned long avpn);
+long kvmppc_h_bulk_remove(struct kvm_vcpu *vcpu);
+long kvmppc_h_protect(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index, unsigned long avpn,
+ unsigned long va);
+long kvmppc_h_read(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index);
+long kvmppc_h_clear_ref(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index);
+long kvmppc_h_clear_mod(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index);
+long kvmppc_hpte_hv_fault(struct kvm_vcpu *vcpu, unsigned long addr,
+ unsigned long slb_v, unsigned int status, bool data);
+unsigned long kvmppc_rm_h_xirr(struct kvm_vcpu *vcpu);
+int kvmppc_rm_h_ipi(struct kvm_vcpu *vcpu, unsigned long server,
+ unsigned long mfrr);
+int kvmppc_rm_h_cppr(struct kvm_vcpu *vcpu, unsigned long cppr);
+int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr);
+#endif
+
#endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
diff --git a/arch/powerpc/kvm/book3s_64_vio_hv.c b/arch/powerpc/kvm/book3s_64_vio_hv.c
index d461c440889a..30f83cf1b98e 100644
--- a/arch/powerpc/kvm/book3s_64_vio_hv.c
+++ b/arch/powerpc/kvm/book3s_64_vio_hv.c
@@ -40,6 +40,7 @@
#include <asm/iommu.h>
#include <asm/tce.h>
#include <asm/iommu.h>
+#include <asm/asm-prototypes.h>
#define TCES_PER_PAGE (PAGE_SIZE / sizeof(u64))
diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index 0c84d6bc8356..90a0b274e699 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -26,6 +26,7 @@
#include <asm/dbell.h>
#include <asm/cputhreads.h>
#include <asm/io.h>
+#include <asm/asm-prototypes.h>
#define KVM_CMA_CHUNK_ORDER 18
diff --git a/arch/powerpc/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c
index 0fa70a9618d7..be1cee5dc032 100644
--- a/arch/powerpc/kvm/book3s_hv_ras.c
+++ b/arch/powerpc/kvm/book3s_hv_ras.c
@@ -16,6 +16,7 @@
#include <asm/machdep.h>
#include <asm/cputhreads.h>
#include <asm/hmi.h>
+#include <asm/asm-prototypes.h>
/* SRR1 bits for machine check on POWER7 */
#define SRR1_MC_LDSTERR (1ul << (63-42))
diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 99b4e9d5dd23..6b3d01b024d7 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -21,6 +21,7 @@
#include <asm/hvcall.h>
#include <asm/synch.h>
#include <asm/ppc-opcode.h>
+#include <asm/asm-prototypes.h>
/* Translate address of a vmalloc'd thing to a linear map address */
static void *real_vmalloc_addr(void *x)
diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm/book3s_hv_rm_xics.c
index 82ff5de8b1e7..6de32e610c5d 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_xics.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c
@@ -23,6 +23,7 @@
#include <asm/ppc-opcode.h>
#include <asm/pnv-pci.h>
#include <asm/opal.h>
+#include <asm/asm-prototypes.h>
#include "book3s_xics.h"
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
@ 2016-10-10 0:31 ` Daniel Axtens
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Axtens @ 2016-10-10 0:31 UTC (permalink / raw)
To: linuxppc-dev, kvm, kvm-ppc, paulus; +Cc: Daniel Axtens
A bunch of KVM functions are only called from assembler.
Give them prototypes in asm-prototypes.h
This reduces sparse warnings.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
arch/powerpc/kvm/book3s_64_vio_hv.c | 1 +
arch/powerpc/kvm/book3s_hv_builtin.c | 1 +
arch/powerpc/kvm/book3s_hv_ras.c | 1 +
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 +
arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 +
6 files changed, 49 insertions(+)
diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index d1492736d852..6c853bcd11fa 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -14,6 +14,9 @@
#include <linux/threads.h>
#include <linux/kprobes.h>
+#ifdef CONFIG_KVM
+#include <linux/kvm_host.h>
+#endif
#include <uapi/asm/ucontext.h>
@@ -109,4 +112,45 @@ void early_setup_secondary(void);
/* time */
void accumulate_stolen_time(void);
+/* kvm */
+#ifdef CONFIG_KVM
+long kvmppc_rm_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
+ unsigned long ioba, unsigned long tce);
+long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
+ unsigned long liobn, unsigned long ioba,
+ unsigned long tce_list, unsigned long npages);
+long kvmppc_rm_h_stuff_tce(struct kvm_vcpu *vcpu,
+ unsigned long liobn, unsigned long ioba,
+ unsigned long tce_value, unsigned long npages);
+long int kvmppc_rm_h_confer(struct kvm_vcpu *vcpu, int target,
+ unsigned int yield_count);
+long kvmppc_h_random(struct kvm_vcpu *vcpu);
+void kvmhv_commence_exit(int trap);
+long kvmppc_realmode_machine_check(struct kvm_vcpu *vcpu);
+void kvmppc_subcore_enter_guest(void);
+void kvmppc_subcore_exit_guest(void);
+long kvmppc_realmode_hmi_handler(void);
+long kvmppc_h_enter(struct kvm_vcpu *vcpu, unsigned long flags,
+ long pte_index, unsigned long pteh, unsigned long ptel);
+long kvmppc_h_remove(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index, unsigned long avpn);
+long kvmppc_h_bulk_remove(struct kvm_vcpu *vcpu);
+long kvmppc_h_protect(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index, unsigned long avpn,
+ unsigned long va);
+long kvmppc_h_read(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index);
+long kvmppc_h_clear_ref(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index);
+long kvmppc_h_clear_mod(struct kvm_vcpu *vcpu, unsigned long flags,
+ unsigned long pte_index);
+long kvmppc_hpte_hv_fault(struct kvm_vcpu *vcpu, unsigned long addr,
+ unsigned long slb_v, unsigned int status, bool data);
+unsigned long kvmppc_rm_h_xirr(struct kvm_vcpu *vcpu);
+int kvmppc_rm_h_ipi(struct kvm_vcpu *vcpu, unsigned long server,
+ unsigned long mfrr);
+int kvmppc_rm_h_cppr(struct kvm_vcpu *vcpu, unsigned long cppr);
+int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr);
+#endif
+
#endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
diff --git a/arch/powerpc/kvm/book3s_64_vio_hv.c b/arch/powerpc/kvm/book3s_64_vio_hv.c
index d461c440889a..30f83cf1b98e 100644
--- a/arch/powerpc/kvm/book3s_64_vio_hv.c
+++ b/arch/powerpc/kvm/book3s_64_vio_hv.c
@@ -40,6 +40,7 @@
#include <asm/iommu.h>
#include <asm/tce.h>
#include <asm/iommu.h>
+#include <asm/asm-prototypes.h>
#define TCES_PER_PAGE (PAGE_SIZE / sizeof(u64))
diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index 0c84d6bc8356..90a0b274e699 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -26,6 +26,7 @@
#include <asm/dbell.h>
#include <asm/cputhreads.h>
#include <asm/io.h>
+#include <asm/asm-prototypes.h>
#define KVM_CMA_CHUNK_ORDER 18
diff --git a/arch/powerpc/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c
index 0fa70a9618d7..be1cee5dc032 100644
--- a/arch/powerpc/kvm/book3s_hv_ras.c
+++ b/arch/powerpc/kvm/book3s_hv_ras.c
@@ -16,6 +16,7 @@
#include <asm/machdep.h>
#include <asm/cputhreads.h>
#include <asm/hmi.h>
+#include <asm/asm-prototypes.h>
/* SRR1 bits for machine check on POWER7 */
#define SRR1_MC_LDSTERR (1ul << (63-42))
diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 99b4e9d5dd23..6b3d01b024d7 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -21,6 +21,7 @@
#include <asm/hvcall.h>
#include <asm/synch.h>
#include <asm/ppc-opcode.h>
+#include <asm/asm-prototypes.h>
/* Translate address of a vmalloc'd thing to a linear map address */
static void *real_vmalloc_addr(void *x)
diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm/book3s_hv_rm_xics.c
index 82ff5de8b1e7..6de32e610c5d 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_xics.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c
@@ -23,6 +23,7 @@
#include <asm/ppc-opcode.h>
#include <asm/pnv-pci.h>
#include <asm/opal.h>
+#include <asm/asm-prototypes.h>
#include "book3s_xics.h"
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
2016-10-10 0:31 ` Daniel Axtens
(?)
@ 2016-10-10 2:34 ` Paul Mackerras
-1 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2016-10-10 2:34 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, kvm-ppc, kvm
On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
> A bunch of KVM functions are only called from assembler.
> Give them prototypes in asm-prototypes.h
> This reduces sparse warnings.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
> arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
> arch/powerpc/kvm/book3s_64_vio_hv.c | 1 +
> arch/powerpc/kvm/book3s_hv_builtin.c | 1 +
> arch/powerpc/kvm/book3s_hv_ras.c | 1 +
> arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 +
> arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 +
> 6 files changed, 49 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
> index d1492736d852..6c853bcd11fa 100644
> --- a/arch/powerpc/include/asm/asm-prototypes.h
> +++ b/arch/powerpc/include/asm/asm-prototypes.h
> @@ -14,6 +14,9 @@
>
> #include <linux/threads.h>
> #include <linux/kprobes.h>
> +#ifdef CONFIG_KVM
> +#include <linux/kvm_host.h>
> +#endif
>
> #include <uapi/asm/ucontext.h>
>
> @@ -109,4 +112,45 @@ void early_setup_secondary(void);
> /* time */
> void accumulate_stolen_time(void);
>
> +/* kvm */
> +#ifdef CONFIG_KVM
Why do we need this ifdef? Does the compilation break without it when
CONFIG_KVM = n?
Paul.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
@ 2016-10-10 2:34 ` Paul Mackerras
0 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2016-10-10 2:34 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, kvm, kvm-ppc
On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
> A bunch of KVM functions are only called from assembler.
> Give them prototypes in asm-prototypes.h
> This reduces sparse warnings.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
> arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
> arch/powerpc/kvm/book3s_64_vio_hv.c | 1 +
> arch/powerpc/kvm/book3s_hv_builtin.c | 1 +
> arch/powerpc/kvm/book3s_hv_ras.c | 1 +
> arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 +
> arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 +
> 6 files changed, 49 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
> index d1492736d852..6c853bcd11fa 100644
> --- a/arch/powerpc/include/asm/asm-prototypes.h
> +++ b/arch/powerpc/include/asm/asm-prototypes.h
> @@ -14,6 +14,9 @@
>
> #include <linux/threads.h>
> #include <linux/kprobes.h>
> +#ifdef CONFIG_KVM
> +#include <linux/kvm_host.h>
> +#endif
>
> #include <uapi/asm/ucontext.h>
>
> @@ -109,4 +112,45 @@ void early_setup_secondary(void);
> /* time */
> void accumulate_stolen_time(void);
>
> +/* kvm */
> +#ifdef CONFIG_KVM
Why do we need this ifdef? Does the compilation break without it when
CONFIG_KVM = n?
Paul.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
@ 2016-10-10 2:34 ` Paul Mackerras
0 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2016-10-10 2:34 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, kvm-ppc, kvm
On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
> A bunch of KVM functions are only called from assembler.
> Give them prototypes in asm-prototypes.h
> This reduces sparse warnings.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
> arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
> arch/powerpc/kvm/book3s_64_vio_hv.c | 1 +
> arch/powerpc/kvm/book3s_hv_builtin.c | 1 +
> arch/powerpc/kvm/book3s_hv_ras.c | 1 +
> arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 +
> arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 +
> 6 files changed, 49 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
> index d1492736d852..6c853bcd11fa 100644
> --- a/arch/powerpc/include/asm/asm-prototypes.h
> +++ b/arch/powerpc/include/asm/asm-prototypes.h
> @@ -14,6 +14,9 @@
>
> #include <linux/threads.h>
> #include <linux/kprobes.h>
> +#ifdef CONFIG_KVM
> +#include <linux/kvm_host.h>
> +#endif
>
> #include <uapi/asm/ucontext.h>
>
> @@ -109,4 +112,45 @@ void early_setup_secondary(void);
> /* time */
> void accumulate_stolen_time(void);
>
> +/* kvm */
> +#ifdef CONFIG_KVM
Why do we need this ifdef? Does the compilation break without it when
CONFIG_KVM = n?
Paul.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
2016-10-10 2:34 ` Paul Mackerras
@ 2016-10-10 2:52 ` Daniel Axtens
-1 siblings, 0 replies; 13+ messages in thread
From: Daniel Axtens @ 2016-10-10 2:52 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, kvm, kvm-ppc
Paul Mackerras <paulus@ozlabs.org> writes:
> On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
>> A bunch of KVM functions are only called from assembler.
>> Give them prototypes in asm-prototypes.h
>> This reduces sparse warnings.
>>
>> Signed-off-by: Daniel Axtens <dja@axtens.net>
>> ---
>> arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
>> arch/powerpc/kvm/book3s_64_vio_hv.c | 1 +
>> arch/powerpc/kvm/book3s_hv_builtin.c | 1 +
>> arch/powerpc/kvm/book3s_hv_ras.c | 1 +
>> arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 +
>> arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 +
>> 6 files changed, 49 insertions(+)
>>
>> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
>> index d1492736d852..6c853bcd11fa 100644
>> --- a/arch/powerpc/include/asm/asm-prototypes.h
>> +++ b/arch/powerpc/include/asm/asm-prototypes.h
>> @@ -14,6 +14,9 @@
>>
>> #include <linux/threads.h>
>> #include <linux/kprobes.h>
>> +#ifdef CONFIG_KVM
>> +#include <linux/kvm_host.h>
>> +#endif
>>
>> #include <uapi/asm/ucontext.h>
>>
>> @@ -109,4 +112,45 @@ void early_setup_secondary(void);
>> /* time */
>> void accumulate_stolen_time(void);
>>
>> +/* kvm */
>> +#ifdef CONFIG_KVM
>
> Why do we need this ifdef? Does the compilation break without it when
> CONFIG_KVM = n?
Yes it does - the 0day build bot picked it up when I did v1 without the
ifdef.
See: https://lists.01.org/pipermail/kbuild-all/2016-September/024742.html
For example:
arch/powerpc/include/asm/asm-prototypes.h:82:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
unsigned long tce_list, unsigned long npages);
^
arch/powerpc/include/asm/asm-prototypes.h:85:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
unsigned long tce_value, unsigned long npages);
^
arch/powerpc/include/asm/asm-prototypes.h:87:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
unsigned int yield_count);
^
arch/powerpc/include/asm/asm-prototypes.h:88:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
long kvmppc_h_random(struct kvm_vcpu *vcpu);
Regards,
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
@ 2016-10-10 2:52 ` Daniel Axtens
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Axtens @ 2016-10-10 2:52 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, kvm, kvm-ppc
Paul Mackerras <paulus@ozlabs.org> writes:
> On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
>> A bunch of KVM functions are only called from assembler.
>> Give them prototypes in asm-prototypes.h
>> This reduces sparse warnings.
>>
>> Signed-off-by: Daniel Axtens <dja@axtens.net>
>> ---
>> arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
>> arch/powerpc/kvm/book3s_64_vio_hv.c | 1 +
>> arch/powerpc/kvm/book3s_hv_builtin.c | 1 +
>> arch/powerpc/kvm/book3s_hv_ras.c | 1 +
>> arch/powerpc/kvm/book3s_hv_rm_mmu.c | 1 +
>> arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 +
>> 6 files changed, 49 insertions(+)
>>
>> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
>> index d1492736d852..6c853bcd11fa 100644
>> --- a/arch/powerpc/include/asm/asm-prototypes.h
>> +++ b/arch/powerpc/include/asm/asm-prototypes.h
>> @@ -14,6 +14,9 @@
>>
>> #include <linux/threads.h>
>> #include <linux/kprobes.h>
>> +#ifdef CONFIG_KVM
>> +#include <linux/kvm_host.h>
>> +#endif
>>
>> #include <uapi/asm/ucontext.h>
>>
>> @@ -109,4 +112,45 @@ void early_setup_secondary(void);
>> /* time */
>> void accumulate_stolen_time(void);
>>
>> +/* kvm */
>> +#ifdef CONFIG_KVM
>
> Why do we need this ifdef? Does the compilation break without it when
> CONFIG_KVM = n?
Yes it does - the 0day build bot picked it up when I did v1 without the
ifdef.
See: https://lists.01.org/pipermail/kbuild-all/2016-September/024742.html
For example:
arch/powerpc/include/asm/asm-prototypes.h:82:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
unsigned long tce_list, unsigned long npages);
^
arch/powerpc/include/asm/asm-prototypes.h:85:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
unsigned long tce_value, unsigned long npages);
^
arch/powerpc/include/asm/asm-prototypes.h:87:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
unsigned int yield_count);
^
arch/powerpc/include/asm/asm-prototypes.h:88:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
long kvmppc_h_random(struct kvm_vcpu *vcpu);
Regards,
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] KVM: PPC: Fix sparse static warning.
2016-10-10 0:31 ` Daniel Axtens
@ 2016-11-21 5:04 ` Paul Mackerras
-1 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2016-11-21 5:04 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, kvm, kvm-ppc
On Mon, Oct 10, 2016 at 11:31:19AM +1100, Daniel Axtens wrote:
> Squash a couple of sparse warnings by making things static.
>
> Build tested.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
Thanks, applied to kvm-ppc-next.
Paul.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] KVM: PPC: Fix sparse static warning.
@ 2016-11-21 5:04 ` Paul Mackerras
0 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2016-11-21 5:04 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, kvm, kvm-ppc
On Mon, Oct 10, 2016 at 11:31:19AM +1100, Daniel Axtens wrote:
> Squash a couple of sparse warnings by making things static.
>
> Build tested.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
Thanks, applied to kvm-ppc-next.
Paul.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
2016-10-10 0:31 ` Daniel Axtens
@ 2016-11-21 5:05 ` Paul Mackerras
-1 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2016-11-21 5:05 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, kvm, kvm-ppc
On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
> A bunch of KVM functions are only called from assembler.
> Give them prototypes in asm-prototypes.h
> This reduces sparse warnings.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
Thanks, applied to kvm-ppc-next.
Paul.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
@ 2016-11-21 5:05 ` Paul Mackerras
0 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2016-11-21 5:05 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, kvm, kvm-ppc
On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
> A bunch of KVM functions are only called from assembler.
> Give them prototypes in asm-prototypes.h
> This reduces sparse warnings.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
Thanks, applied to kvm-ppc-next.
Paul.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-11-21 5:08 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10 0:31 [PATCH 1/2] KVM: PPC: Fix sparse static warning Daniel Axtens
2016-10-10 0:31 ` Daniel Axtens
2016-10-10 0:31 ` [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler Daniel Axtens
2016-10-10 0:31 ` Daniel Axtens
2016-10-10 2:34 ` Paul Mackerras
2016-10-10 2:34 ` Paul Mackerras
2016-10-10 2:34 ` Paul Mackerras
2016-10-10 2:52 ` Daniel Axtens
2016-10-10 2:52 ` Daniel Axtens
2016-11-21 5:05 ` Paul Mackerras
2016-11-21 5:05 ` Paul Mackerras
2016-11-21 5:04 ` [PATCH 1/2] KVM: PPC: Fix sparse static warning Paul Mackerras
2016-11-21 5:04 ` Paul Mackerras
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.