inline function prefix with __always_inline invsyscall function
PATCH 1/1 inline function prefix with __always_inline invsyscall function
In vsyscall function do_vgettimeofday(), some functions are declared as inlined, which is hint for gcc to compile the function inlined but it not forced. Sometimes compiler does not compiler the function as inlined, So here inline is replaced by __always_inline prefix.
It does not happen in gcc compiler actually, but it possibly happens.
diff -Nruap linux-2.6.17-rc1-mm1.org/include/asm-x86_64/io.h linux-2.6.17-rc1-mm1/include/asm-x86_64/io.h
--- linux-2.6.17-rc1-mm1.org/include/asm-x86_64/io.h 2006-04-07
15:13:06.000000000 +0800
+++ linux-2.6.17-rc1-mm1/include/asm-x86_64/io.h 2006-04-07
15:37:03.000000000 +0800
@@ -177,7 +177,7 @@ static inline __u16 __readw(const volati
{
return *(__force volatile __u16 *)addr;
}
-static inline __u32 __readl(const volatile void __iomem *addr) +static __always_inline __u32 __readl(const volatile void __iomem *addr)
{
return *(__force volatile __u32 *)addr;
}
diff -Nruap linux-2.6.17-rc1-mm1.org/include/linux/seqlock.h linux-2.6.17-rc1-mm1/include/linux/seqlock.h
--- linux-2.6.17-rc1-mm1.org/include/linux/seqlock.h 2006-04-07
15:13:06.000000000 +0800
+++ linux-2.6.17-rc1-mm1/include/linux/seqlock.h 2006-04-07
15:16:13.000000000 +0800
@@ -73,7 +73,7 @@ static inline int write_tryseqlock(seqlo
}
/* Start of read calculation -- fetch last complete writer token */
-static inline unsigned read_seqbegin(const seqlock_t *sl) +static __always_inline unsigned read_seqbegin(const seqlock_t *sl)
{
unsigned ret = sl->sequence;
smp_rmb();
@@ -88,7 +88,7 @@ static inline unsigned read_seqbegin(con
*
* Using xor saves one conditional branch.
*/
-static inline int read_seqretry(const seqlock_t *sl, unsigned iv) +static __always_inline int read_seqretry(const seqlock_t *sl, unsigned iv)
{
smp_rmb();
return (iv & 1) | (sl->sequence ^ iv);
Andi Kleen
AppliedQuoted 6 lines · bibo
In vsyscall function
do_vgettimeofday(), some functions are declared as inlined, which is hint for gcc to compile the function inlined but it not forced. Sometimes compiler does not compiler the function as inlined, So here inline is replaced by__always_inlineprefix.It does not happen in gcc compiler actually, but it possibly happens.
Applied.
Your patch was word wrapped. I fixed that by hand, but please avoid it in future submissions.
Thanks,
-Andi