diff options
author | Thomas Huth <thuth@redhat.com> | 2015-05-22 03:25:02 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-08-22 05:16:16 -0400 |
commit | 5358a96341a7fba23cbf0eaf01ce1ab4d738fc90 (patch) | |
tree | 49fc8843426bbf80fee0c6c98d17c204a3df63fb /arch/powerpc | |
parent | 129fd4233b62159d50c35fb6489cb22ee9c27415 (diff) |
KVM: PPC: Fix warnings from sparse
When compiling the KVM code for POWER with "make C=1", sparse
complains about functions missing proper prototypes and a 64-bit
constant missing the ULL prefix. Let's fix this by making the
functions static or by including the proper header with the
prototypes, and by appending a ULL prefix to the constant
PPC_MPPE_ADDRESS_MASK.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_32_mmu_host.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_64_mmu_host.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_emulate.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_paired_singles.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 2 |
8 files changed, 12 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 8452335661a5..790f5d1d9a46 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -287,7 +287,7 @@ | |||
287 | 287 | ||
288 | /* POWER8 Micro Partition Prefetch (MPP) parameters */ | 288 | /* POWER8 Micro Partition Prefetch (MPP) parameters */ |
289 | /* Address mask is common for LOGMPP instruction and MPPR SPR */ | 289 | /* Address mask is common for LOGMPP instruction and MPPR SPR */ |
290 | #define PPC_MPPE_ADDRESS_MASK 0xffffffffc000 | 290 | #define PPC_MPPE_ADDRESS_MASK 0xffffffffc000ULL |
291 | 291 | ||
292 | /* Bits 60 and 61 of MPP SPR should be set to one of the following */ | 292 | /* Bits 60 and 61 of MPP SPR should be set to one of the following */ |
293 | /* Aborting the fetch is indeed setting 00 in the table size bits */ | 293 | /* Aborting the fetch is indeed setting 00 in the table size bits */ |
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 05ea8fc7f829..53285d52e381 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -240,7 +240,8 @@ void kvmppc_core_queue_inst_storage(struct kvm_vcpu *vcpu, ulong flags) | |||
240 | kvmppc_book3s_queue_irqprio(vcpu, BOOK3S_INTERRUPT_INST_STORAGE); | 240 | kvmppc_book3s_queue_irqprio(vcpu, BOOK3S_INTERRUPT_INST_STORAGE); |
241 | } | 241 | } |
242 | 242 | ||
243 | int kvmppc_book3s_irqprio_deliver(struct kvm_vcpu *vcpu, unsigned int priority) | 243 | static int kvmppc_book3s_irqprio_deliver(struct kvm_vcpu *vcpu, |
244 | unsigned int priority) | ||
244 | { | 245 | { |
245 | int deliver = 1; | 246 | int deliver = 1; |
246 | int vec = 0; | 247 | int vec = 0; |
diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c index 2035d16a9262..d5c9bfeb0c9c 100644 --- a/arch/powerpc/kvm/book3s_32_mmu_host.c +++ b/arch/powerpc/kvm/book3s_32_mmu_host.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/machdep.h> | 26 | #include <asm/machdep.h> |
27 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
28 | #include <asm/hw_irq.h> | 28 | #include <asm/hw_irq.h> |
29 | #include "book3s.h" | ||
29 | 30 | ||
30 | /* #define DEBUG_MMU */ | 31 | /* #define DEBUG_MMU */ |
31 | /* #define DEBUG_SR */ | 32 | /* #define DEBUG_SR */ |
diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c index b982d925c710..79ad35abd196 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_host.c +++ b/arch/powerpc/kvm/book3s_64_mmu_host.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mmu_context.h> | 28 | #include <asm/mmu_context.h> |
29 | #include <asm/hw_irq.h> | 29 | #include <asm/hw_irq.h> |
30 | #include "trace_pr.h" | 30 | #include "trace_pr.h" |
31 | #include "book3s.h" | ||
31 | 32 | ||
32 | #define PTE_SIZE 12 | 33 | #define PTE_SIZE 12 |
33 | 34 | ||
diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c index 5a2bc4b0dfe5..2afdb9c0937d 100644 --- a/arch/powerpc/kvm/book3s_emulate.c +++ b/arch/powerpc/kvm/book3s_emulate.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/reg.h> | 23 | #include <asm/reg.h> |
24 | #include <asm/switch_to.h> | 24 | #include <asm/switch_to.h> |
25 | #include <asm/time.h> | 25 | #include <asm/time.h> |
26 | #include "book3s.h" | ||
26 | 27 | ||
27 | #define OP_19_XOP_RFID 18 | 28 | #define OP_19_XOP_RFID 18 |
28 | #define OP_19_XOP_RFI 50 | 29 | #define OP_19_XOP_RFI 50 |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 68d067ad4222..6e588acaac2c 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -214,12 +214,12 @@ static void kvmppc_set_msr_hv(struct kvm_vcpu *vcpu, u64 msr) | |||
214 | kvmppc_end_cede(vcpu); | 214 | kvmppc_end_cede(vcpu); |
215 | } | 215 | } |
216 | 216 | ||
217 | void kvmppc_set_pvr_hv(struct kvm_vcpu *vcpu, u32 pvr) | 217 | static void kvmppc_set_pvr_hv(struct kvm_vcpu *vcpu, u32 pvr) |
218 | { | 218 | { |
219 | vcpu->arch.pvr = pvr; | 219 | vcpu->arch.pvr = pvr; |
220 | } | 220 | } |
221 | 221 | ||
222 | int kvmppc_set_arch_compat(struct kvm_vcpu *vcpu, u32 arch_compat) | 222 | static int kvmppc_set_arch_compat(struct kvm_vcpu *vcpu, u32 arch_compat) |
223 | { | 223 | { |
224 | unsigned long pcr = 0; | 224 | unsigned long pcr = 0; |
225 | struct kvmppc_vcore *vc = vcpu->arch.vcore; | 225 | struct kvmppc_vcore *vc = vcpu->arch.vcore; |
@@ -259,7 +259,7 @@ int kvmppc_set_arch_compat(struct kvm_vcpu *vcpu, u32 arch_compat) | |||
259 | return 0; | 259 | return 0; |
260 | } | 260 | } |
261 | 261 | ||
262 | void kvmppc_dump_regs(struct kvm_vcpu *vcpu) | 262 | static void kvmppc_dump_regs(struct kvm_vcpu *vcpu) |
263 | { | 263 | { |
264 | int r; | 264 | int r; |
265 | 265 | ||
@@ -292,7 +292,7 @@ void kvmppc_dump_regs(struct kvm_vcpu *vcpu) | |||
292 | vcpu->arch.last_inst); | 292 | vcpu->arch.last_inst); |
293 | } | 293 | } |
294 | 294 | ||
295 | struct kvm_vcpu *kvmppc_find_vcpu(struct kvm *kvm, int id) | 295 | static struct kvm_vcpu *kvmppc_find_vcpu(struct kvm *kvm, int id) |
296 | { | 296 | { |
297 | int r; | 297 | int r; |
298 | struct kvm_vcpu *v, *ret = NULL; | 298 | struct kvm_vcpu *v, *ret = NULL; |
diff --git a/arch/powerpc/kvm/book3s_paired_singles.c b/arch/powerpc/kvm/book3s_paired_singles.c index bd6ab1672ae6..a759d9adb0b6 100644 --- a/arch/powerpc/kvm/book3s_paired_singles.c +++ b/arch/powerpc/kvm/book3s_paired_singles.c | |||
@@ -352,7 +352,7 @@ static inline u32 inst_get_field(u32 inst, int msb, int lsb) | |||
352 | return kvmppc_get_field(inst, msb + 32, lsb + 32); | 352 | return kvmppc_get_field(inst, msb + 32, lsb + 32); |
353 | } | 353 | } |
354 | 354 | ||
355 | bool kvmppc_inst_is_paired_single(struct kvm_vcpu *vcpu, u32 inst) | 355 | static bool kvmppc_inst_is_paired_single(struct kvm_vcpu *vcpu, u32 inst) |
356 | { | 356 | { |
357 | if (!(vcpu->arch.hflags & BOOK3S_HFLAG_PAIRED_SINGLE)) | 357 | if (!(vcpu->arch.hflags & BOOK3S_HFLAG_PAIRED_SINGLE)) |
358 | return false; | 358 | return false; |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index e5dde32fe71f..2e51289610e4 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -660,7 +660,7 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu) | |||
660 | return kvmppc_core_pending_dec(vcpu); | 660 | return kvmppc_core_pending_dec(vcpu); |
661 | } | 661 | } |
662 | 662 | ||
663 | enum hrtimer_restart kvmppc_decrementer_wakeup(struct hrtimer *timer) | 663 | static enum hrtimer_restart kvmppc_decrementer_wakeup(struct hrtimer *timer) |
664 | { | 664 | { |
665 | struct kvm_vcpu *vcpu; | 665 | struct kvm_vcpu *vcpu; |
666 | 666 | ||