* [PATCH] inline function prefix with __always_inline invsyscall function
@ 2006-04-11 3:13 mao, bibo
2006-04-11 5:04 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: mao, bibo @ 2006-04-11 3:13 UTC (permalink / raw)
To: ak; +Cc: linux-kernel
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.
Signed-off-by: bibo mao <bibo.mao@intel.com>
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);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] inline function prefix with __always_inline invsyscall function
2006-04-11 3:13 [PATCH] inline function prefix with __always_inline invsyscall function mao, bibo
@ 2006-04-11 5:04 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-04-11 5:04 UTC (permalink / raw)
To: mao, bibo; +Cc: linux-kernel
On Tuesday 11 April 2006 05:13, mao, bibo wrote:
> 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.
Applied.
Your patch was word wrapped. I fixed that by hand, but please avoid
it in future submissions.
Thanks,
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-11 5:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 3:13 [PATCH] inline function prefix with __always_inline invsyscall function mao, bibo
2006-04-11 5:04 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox