[PATCH] inline function prefix with __always_inline invsyscall function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>


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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux