From: Hollis Blanchard Date: Mon, 29 Sep 2008 18:36:35 +0000 Subject: [PATCH 6 of 7] ppc: define mftbl/mftbu for ppc64 builds Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org # HG changeset patch # User Hollis Blanchard # Date 1222712603 18000 # Node ID ff91d7d926813fe9ad9aa0f5c6aec7821ae3bbb7 # Parent 0741c43fc64489615024aaa91075f8f1ed4dd72d ppc: define mftbl/mftbu for ppc64 builds Though they probably aren't used, the TBU/TBL registers still exist in 64-bit architecture. Having these macros defined in all builds simplifies KVM instruction emulation code which can be built for 32- or 64-bit. Signed-off-by: Hollis Blanchard diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -747,13 +747,12 @@ asm volatile("mftb %0" : "=r" (rval)); rval;}) #endif /* !CONFIG_PPC_CELL */ -#else /* __powerpc64__ */ +#endif /* !__powerpc64__ */ #define mftbl() ({unsigned long rval; \ asm volatile("mftbl %0" : "=r" (rval)); rval;}) #define mftbu() ({unsigned long rval; \ asm volatile("mftbu %0" : "=r" (rval)); rval;}) -#endif /* !__powerpc64__ */ #define mttbl(v) asm volatile("mttbl %0":: "r"(v)) #define mttbu(v) asm volatile("mttbu %0":: "r"(v))