linux-mips
[Top] [All Lists]

[PATCH 03/31] mips/kvm: Fix 32-bitisms in kvm_locore.S

To: linux-mips@linux-mips.org, ralf@linux-mips.org, kvm@vger.kernel.org, Sanjay Lal <sanjayl@kymasys.com>
Subject: [PATCH 03/31] mips/kvm: Fix 32-bitisms in kvm_locore.S
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 7 Jun 2013 16:03:07 -0700
Cc: linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=ch+pGPmG2SsXl/nYVYbYSdwF2ejA46SAHo0b5SS+JwI=; b=QMlB/3rN0OMnSmaPAYldWHoQPrExIAxlP7ZGePgheafrs12C0jiWo2HuPdpeUfHqHb dTFUgQoZ6R4L0iGYofaeOmGWMgn9yGCx3HS4DR+BIcVSD50lJbgB/7X6GW4W/s/qfIrW 3vGpks+nGbSvOxbA9xCbmXVuXHtH5Rrzqb0US665VaMn+Pl4UKxCtMn89BMyYtrAQix1 LFIpg1AlN51imB3xEU9uCmhAQ6Vx8XXfEH75cKEGlOjZQI0wbigjchqE1yurwIiyV/6B cqPcR9oCqbdSNPshhbWDMnGOaDBe5UlLbvHJvte7rUkfaVVSRS9afTClHTvUV4APXV+J s+jg==
In-reply-to: <1370646215-6543-1-git-send-email-ddaney.cavm@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1370646215-6543-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

For a warning free compile, we need to use the width aware PTR_LI and
PTR_LA macros.  Use LI variant for immediate data and LA variant for
addresses.

Signed-off-by: David Daney <david.daney@cavium.com>
---
 arch/mips/kvm/kvm_locore.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S
index dca2aa6..e86fa2a 100644
--- a/arch/mips/kvm/kvm_locore.S
+++ b/arch/mips/kvm/kvm_locore.S
@@ -310,7 +310,7 @@ NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra)
     LONG_S  t0, VCPU_R26(k1)
 
     /* Get GUEST k1 and save it in VCPU */
-    la      t1, ~0x2ff
+       PTR_LI  t1, ~0x2ff
     mfc0    t0, CP0_EBASE
     and     t0, t0, t1
     LONG_L  t0, 0x3000(t0)
@@ -384,14 +384,14 @@ NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra)
     mtc0        k0, CP0_DDATA_LO
 
     /* Restore RDHWR access */
-    la      k0, 0x2000000F
+       PTR_LI  k0, 0x2000000F
     mtc0    k0,  CP0_HWRENA
 
     /* Jump to handler */
 FEXPORT(__kvm_mips_jump_to_handler)
     /* XXXKYMA: not sure if this is safe, how large is the stack?? */
     /* Now jump to the kvm_mips_handle_exit() to see if we can deal with this 
in the kernel */
-    la          t9,kvm_mips_handle_exit
+       PTR_LA  t9, kvm_mips_handle_exit
     jalr.hb     t9
     addiu       sp,sp, -CALLFRAME_SIZ           /* BD Slot */
 
@@ -566,7 +566,7 @@ __kvm_mips_return_to_host:
     mtlo    k0
 
     /* Restore RDHWR access */
-    la      k0, 0x2000000F
+       PTR_LI  k0, 0x2000000F
     mtc0    k0,  CP0_HWRENA
 
 
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>