32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
From: Jeff Mahoney <jeffm@suse.com>
|
|
Subject: powerpc: kvm build failure workaround
|
|
Patch-mainline: Hopefully never
|
|
|
|
This patch works around an issue with gcc 4.5 that is failing the build
|
|
with:
|
|
arch/powerpc/kvm/book3s.c:1102:23: error: 'ext_bkp.vrsave' may be used uninitialized in this function
|
|
|
|
The warning is incorrect, so we work around it by explicitly setting it to
|
|
0.
|
|
|
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
---
|
|
arch/powerpc/kvm/book3s.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- a/arch/powerpc/kvm/book3s.c
|
|
+++ b/arch/powerpc/kvm/book3s.c
|
|
@@ -1104,6 +1104,12 @@ int __kvmppc_vcpu_run(struct kvm_run *kv
|
|
bool save_vsx = current->thread.used_vsr;
|
|
ulong ext_msr;
|
|
|
|
+#ifdef CONFIG_ALTIVEC
|
|
+ /* JDM This is functionally unnecessary but works around an
|
|
+ * over-eager unintialized usage checker in gcc 4.5 */
|
|
+ ext_bkp.vrsave = current->thread.vrsave;
|
|
+#endif
|
|
+
|
|
/* No need to go into the guest when all we do is going out */
|
|
if (signal_pending(current)) {
|
|
kvm_run->exit_reason = KVM_EXIT_INTR;
|