projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1156a62
)
powerpc/time: Make get_tb() common to PPC32 and PPC64
author
Christophe Leroy
<christophe.leroy@csgroup.eu>
Thu, 1 Oct 2020 12:42:44 +0000
(12:42 +0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Thu, 8 Oct 2020 10:17:16 +0000
(21:17 +1100)
mftbu() is always defined now, so the #ifdef can be removed
and replaced by an IS_ENABLED(CONFIG_PPC64) inside the
PPC32 version of get_tb().
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/47e49717d2643169ffcbe5d507f184cf49f0fe95.1601556145.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/time.h
patch
|
blob
|
history
diff --git
a/arch/powerpc/include/asm/time.h
b/arch/powerpc/include/asm/time.h
index 6ec0409d10f43fba671fb12d9a5564a2f676b7ce..2f566c1a754cabc8105a7f8957b69553e8831825 100644
(file)
--- a/
arch/powerpc/include/asm/time.h
+++ b/
arch/powerpc/include/asm/time.h
@@
-53,16
+53,13
@@
static inline u64 get_vtb(void)
return 0;
}
-#ifdef CONFIG_PPC64
-static inline u64 get_tb(void)
-{
- return mftb();
-}
-#else /* CONFIG_PPC64 */
static inline u64 get_tb(void)
{
unsigned int tbhi, tblo, tbhi2;
+ if (IS_ENABLED(CONFIG_PPC64))
+ return mftb();
+
do {
tbhi = mftbu();
tblo = mftb();
@@
-71,7
+68,6
@@
static inline u64 get_tb(void)
return ((u64)tbhi << 32) | tblo;
}
-#endif /* !CONFIG_PPC64 */
static inline void set_tb(unsigned int upper, unsigned int lower)
{