Re: [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2

From: Keith Owens <>
Date: 2006-11-02 14:39:50
"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 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

>+#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.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Thu Nov 02 14:40:14 2006

This archive was generated by hypermail 2.1.8 : 2006-11-02 14:40:30 EST