public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "mao, bibo" <bibo.mao@intel.com>
To: ak@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] inline function prefix with __always_inline invsyscall function
Date: Tue, 11 Apr 2006 11:13:16 +0800	[thread overview]
Message-ID: <1144725196.9974.10.camel@maobb.site> (raw)

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);

             reply	other threads:[~2006-04-11  3:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-11  3:13 mao, bibo [this message]
2006-04-11  5:04 ` [PATCH] inline function prefix with __always_inline invsyscall function Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1144725196.9974.10.camel@maobb.site \
    --to=bibo.mao@intel.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox