Skip to contentSkip to conversation

ppc: define mftbl/mftbu for ppc64 builds

PATCH New Hollis Blanchard 1 participant 1 message Sep 29, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc: define mftbl/mftbu for ppc64 builds

# HG changeset patch
# User Hollis Blanchard <[email protected]> # 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.

arch/powerpc/include/asm/reg.h +1 -2
@@ -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))