Re: [Xen-ia64-devel] [Patch] linux: set memory attribute in inlineasm

2008-04-07 Thread Akio Takebe
Hi,

>On Sat, Apr 05, 2008 at 04:33:12PM +0200, [EMAIL PROTECTED] wrote:
>> Selon Isaku Yamahata <[EMAIL PROTECTED]>:
>> 
>> > diff -r bb2f8ba47833 include/asm-ia64/xen/privop.h
>> > --- a/include/asm-ia64/xen/privop.hTue Mar 25 12:37:54 2008 -0600
>> > +++ b/include/asm-ia64/xen/privop.hSat Apr 05 07:27:30 2008 +0900
>> > @@ -67,7 +67,7 @@
>> >  #endif
>> >
>> >  #ifndef __ASSEMBLY__
>> > -#define   XEN_HYPER_SSM_I asm("break %0" : : "i" 
(HYPERPRIVOP_SSM_I))
>> > +#define   XEN_HYPER_SSM_I asm("break %0" : : "i" 
(HYPERPRIVOP_SSM_I):
>> > "memory")
>> >  #define   XEN_HYPER_GET_IVR   asm("break %0" : : "i" 
(HYPERPRIVOP_GET_IVR))
>> >
>> >  //
>> >
>> > Shouldn't those be asm volatile, but asm?
>> 
>> IIRC, according to the gcc doc asm without outputs are volatile.
>
>Ah, right. From gcc info.
>> Assembler Instructions with C Expression Operands
>>  An `asm' instruction without any output operands will be treated
>> identically to a volatile `asm' instruction.
Thank you for your comments.
I also think it's right.
And I found XEN_HYPER_GET_IVR is wrong because it doesn't have return value.
But it is not used, so I just remove it.
I updated my patch.

Signed-off-by: Akio Takebe <[EMAIL PROTECTED]>

Best Regards,

Akio Takebe

inline_asm_barrier.3.patch
Description: Binary data
___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel

Re: [Xen-ia64-devel] [Patch] linux: set memory attribute in inlineasm

2008-04-06 Thread Isaku Yamahata
On Sat, Apr 05, 2008 at 04:33:12PM +0200, [EMAIL PROTECTED] wrote:
> Selon Isaku Yamahata <[EMAIL PROTECTED]>:
> 
> > diff -r bb2f8ba47833 include/asm-ia64/xen/privop.h
> > --- a/include/asm-ia64/xen/privop.h Tue Mar 25 12:37:54 2008 -0600
> > +++ b/include/asm-ia64/xen/privop.h Sat Apr 05 07:27:30 2008 +0900
> > @@ -67,7 +67,7 @@
> >  #endif
> >
> >  #ifndef __ASSEMBLY__
> > -#defineXEN_HYPER_SSM_I asm("break %0" : : "i" 
> > (HYPERPRIVOP_SSM_I))
> > +#defineXEN_HYPER_SSM_I asm("break %0" : : "i" 
> > (HYPERPRIVOP_SSM_I):
> > "memory")
> >  #defineXEN_HYPER_GET_IVR   asm("break %0" : : "i" 
> > (HYPERPRIVOP_GET_IVR))
> >
> >  //
> >
> > Shouldn't those be asm volatile, but asm?
> 
> IIRC, according to the gcc doc asm without outputs are volatile.

Ah, right. From gcc info.
> Assembler Instructions with C Expression Operands
>  An `asm' instruction without any output operands will be treated
> identically to a volatile `asm' instruction.


-- 
yamahata

___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel


Re: [Xen-ia64-devel] [Patch] linux: set memory attribute in inlineasm

2008-04-05 Thread tgingold
Selon Isaku Yamahata <[EMAIL PROTECTED]>:

> diff -r bb2f8ba47833 include/asm-ia64/xen/privop.h
> --- a/include/asm-ia64/xen/privop.h   Tue Mar 25 12:37:54 2008 -0600
> +++ b/include/asm-ia64/xen/privop.h   Sat Apr 05 07:27:30 2008 +0900
> @@ -67,7 +67,7 @@
>  #endif
>
>  #ifndef __ASSEMBLY__
> -#define  XEN_HYPER_SSM_I asm("break %0" : : "i" 
> (HYPERPRIVOP_SSM_I))
> +#define  XEN_HYPER_SSM_I asm("break %0" : : "i" 
> (HYPERPRIVOP_SSM_I):
> "memory")
>  #define  XEN_HYPER_GET_IVR   asm("break %0" : : "i" 
> (HYPERPRIVOP_GET_IVR))
>
>  //
>
> Shouldn't those be asm volatile, but asm?

IIRC, according to the gcc doc asm without outputs are volatile.

Tristan.

___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel


Re: [Xen-ia64-devel] [Patch] linux: set memory attribute in inlineasm

2008-04-04 Thread Isaku Yamahata
diff -r bb2f8ba47833 include/asm-ia64/xen/privop.h
--- a/include/asm-ia64/xen/privop.h Tue Mar 25 12:37:54 2008 -0600
+++ b/include/asm-ia64/xen/privop.h Sat Apr 05 07:27:30 2008 +0900
@@ -67,7 +67,7 @@
 #endif
 
 #ifndef __ASSEMBLY__
-#defineXEN_HYPER_SSM_I asm("break %0" : : "i" 
(HYPERPRIVOP_SSM_I))
+#defineXEN_HYPER_SSM_I asm("break %0" : : "i" 
(HYPERPRIVOP_SSM_I): "memory")
 #defineXEN_HYPER_GET_IVR   asm("break %0" : : "i" 
(HYPERPRIVOP_GET_IVR))
 
 //

Shouldn't those be asm volatile, but asm?

-- 
yamahata

___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel


Re: [Xen-ia64-devel] [Patch] linux: set memory attribute in inlineasm

2008-04-04 Thread Akio Takebe
Hi, Aron

>Hi Akio,
>
>Akio Takebe wrote:  [Fri Apr 04 2008, 05:44:10AM EDT]
>> @@ -251,7 +251,7 @@ extern void xen_set_eflag(unsigned long)
>>  #define xen_ia64_intrin_local_irq_restore(x)
\
>>  {   \
>>   if (is_running_on_xen()) { 
\
>> -if ((x) & IA64_PSR_I) { xen_ssm_i(); }  \
>> +if (x) { xen_ssm_i(); } \
>>  else { xen_rsm_i(); }   \
>>  }   
\
>>  else __ia64_intrin_local_irq_restore((x));  
\
>
>What does this part do?
Thank you for your review.
Sorry for my confusion.

The (x)&IA64_PSR_I should be not unnecessary part,
because ia64_intrin_local_irq_restore() is always called
via __local_irq_restore(x).
It is the same as __ia64_intrin_local_irq_restore(x)
in include/asm-ia64/gcc_intrin.h.

But since it's a different concept with this title,
I droped the hunk.

Signed-off-by: Akio Takebe <[EMAIL PROTECTED]>

Best Regards,

Akio Takebe

inline_asm_barrier.2.patch
Description: Binary data
___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel