public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2
Date: Thu, 02 Nov 2006 03:39:50 +0000	[thread overview]
Message-ID: <19255.1162438790@kao2.melbourne.sgi.com> (raw)
In-Reply-To: <454961EE.4070608@intel.com>

"bibo,mao" (on Thu, 02 Nov 2006 11:11:42 +0800) wrote:
>+#define ia64_ld16(low, addr)						\
>+	asm volatile(";;ld16 %0=[%1];;":"=r"(low):"r"(addr):"memory")
>+#define ia64_st16(low, addr)						\
>+	asm volatile(";;st16 [%1]=%0;;"::"r"(low),"r"(addr):"memory")
>...
>+#define ia64_st16(low, addr)    __st16(__sttype_none, __sthint_none, addr, low)
>+#define ia64_ld16(low, addr)					\
>+  	low =  __ld16(__ldtype_none, __ldtype_none, addr)
>+

ld16 clobbers ar.csd, that needs to be added to the definition of
ia64_ld16.

ia64_ld16 does not need a memory clobber.

Strictly speaking, ia64_st16 does not need a memory clobber.  addr
should be a write operand (not read as you have it) and gcc should see
that addr is clobbered.  However we clobber 16 bytes starting at addr
and I suspect that gcc has no way of telling about the second set of 8
bytes.  In this case, we may have to stick with a memory clobber on
ia64_st16.

>+#define kprobe_update_bundle(dest, src)		\
>+do {						\
>+	unsigned long low;			\
>+	ia64_ld16(low, src);			\
>+	ia64_st16(low, dest);			\
>+} while (0)

Using unsigned long (8 bytes) is misleading for a 16 byte operation.
Not sure what we can do about that.


  reply	other threads:[~2006-11-02  3:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02  3:11 [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2 bibo,mao
2006-11-02  3:39 ` Keith Owens [this message]
2006-11-02  5:04 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take bibo,mao
2006-11-02  6:51 ` bibo,mao
2006-11-02  7:17 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2 Keith Owens
2006-11-02  7:22 ` Keith Owens
2006-11-02  7:25 ` Keith Owens
2006-11-02  7:27 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take bibo,mao
2006-11-02  7:32 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2 Keith Owens
2006-11-02  7:38 ` Chen, Kenneth W
2006-11-02  7:45 ` Chen, Kenneth W
2006-11-02  7:52 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take bibo,mao
2006-11-02  8:17 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2 Chen, Kenneth W
2006-11-02  8:56 ` Chen, Kenneth W
2006-11-02  9:05 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take bibo,mao
2006-11-02  9:22 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2 Chen, Kenneth W
2006-11-02 19:50 ` Chen, Kenneth W
2006-11-02 19:57 ` Luck, Tony
2006-11-02 20:29 ` Chen, Kenneth W
2006-11-03  1:25 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take bibo,mao
2006-11-03  1:55 ` [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2 Chen, Kenneth W

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=19255.1162438790@kao2.melbourne.sgi.com \
    --to=kaos@sgi.com \
    --cc=linux-ia64@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