Re: [PATCH] fix ldcw inline assembler

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

 



On Fri, 01 May 2009, Carlos O'Donell wrote:

> Historical note...
> 
> We clobber all of memory in userspace, like this:
> ~~~
> #define __ldcw(a) \
> ({                                                                      \
>   unsigned int __ret;                                                   \
>   __asm__ __volatile__("ldcw 0(%1),%0"                                  \
>                        : "=r" (__ret) : "r" (a) : "memory");            \
>   __ret;                                                                \
> })
> ~~~
> I wonder if I should change that to match the kernel?

The above is perfectly safe.  I believe the kernel provides a memory
barrier when necessary.  There's a discussion somewhere in the mail
archives.

Dave
-- 
J. David Anglin                                  dave.anglin@xxxxxxxxxxxxxx
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux