On Fri, 26 Aug 2005, moreau francis wrote:
> I don't think that MIPS cpu reorder memory access, but gcc can ! And I
> don't think that the use of 'volatile' can prevent it to do that.
Well, certain MIPS implementations may merge multiple uncached writes in
the writeback buffer, e.g. writes to d
--- Andy Isaacson <[EMAIL PROTECTED]> a écrit :
>
> Did you *read* the post?
>
> # The _only_ acceptable use of "volatile" is basically:
> #
> # - in _code_ (not data structures), where we might mark a place as making
> # a special type of access. For example, in the PCI MMIO read functions,
On Thu, Aug 25, 2005 at 11:14:03AM +0200, moreau francis wrote:
> --- Andy Isaacson <[EMAIL PROTECTED]> a écrit :
> > The first register write will be completed before the second register
> > write because you use writel, which is defined to have the semantics you
> > want. (It uses a platform-spe
On Wed, 24 Aug 2005, Andy Isaacson wrote:
> You might benefit by running your source code through gcc -E and seeing
> what the writel() expands to. (I do something like "rm drivers/mydev.o;
> make V=1" and then copy-n-paste the gcc line, replacing the "-c -o mydev.o"
> options with -E.)
Well, `
On Iau, 2005-08-25 at 11:14 +0200, moreau francis wrote:
> I'm compiling Linux kernel for a MIPS32 cpu. On my platform, writel seems
> expand to:
>
> static inline writel(u32 val, volatile void __iomem *mem)
> {
> volatile u32 *__mem;
> u32 __val;
>
> _
--- Andy Isaacson <[EMAIL PROTECTED]> a écrit :
>
> The first register write will be completed before the second register
> write because you use writel, which is defined to have the semantics you
> want. (It uses a platform-specific method to guarantee this, possibly
> "volatile" or "asm("eiei
> Wrong. Reference:
>
> http://www.phy.duke.edu/~rgb/General/c_book/c_book/chapter8/sequen
> ce_points.html
>
> Cheers,
> Dick Johnson
That discussion is wrong. The form of the argument is simply invalid.
Just because an optimization could break things in some cases doesnt
mean
On Mer, 2005-08-24 at 14:43 +0200, moreau francis wrote:
> I'm currently trying to write a USB driver for Linux. The device must be
> configured by writing some values into the same register but I want to be
> sure that the writing order is respected by either the compiler and the cpu.
The Linux k
On Wednesday, August 24, 2005 2:45 pm, Alan Cox wrote:
> And in more detail from the deviceiobook..
>
>
> In addition to write posting, on some large multiprocessing
> systems
> (e.g. SGI Challenge, Origin and Altix machines) posted writes
> won't
> be strongly ordere
On Mer, 2005-08-24 at 12:53 -0700, Jesse Barnes wrote:
> writel() ensures ordering? Only from one CPU, another CPU issuing a
> write at some later time may have its write arrive first. See
> Documentation/io_ordering.txt for some documentation I put together on
> this issue.
And in more detai
> > The sequence point argument is obviously wrong, BTW - if it were the
> > case that a mere sequence point required the compiler to have completed
> > all externally-visible side effects, then almost every optimization that
> > gcc does with -O2 would be impossible. CSE, loop splitting, etc.
>
On Wed, 24 Aug 2005, Andy Isaacson wrote:
> On Wed, Aug 24, 2005 at 07:31:31PM +0200, moreau francis wrote:
>> --- "linux-os (Dick Johnson)" <[EMAIL PROTECTED]> a écrit :
>>> On Wed, 24 Aug 2005, moreau francis wrote:
I'm currently trying to write a USB driver for Linux. The device must be
>
> And you never even bothered to read what I said about that???
> The write ORDER will NOT change. Period. It's a FIFO. Writes
On current implementations of i386. That is not good enough.
We want code that works everywhere. You are wrong.
If you need to have ordered writes to a bus, use wmb().
On Wednesday, August 24, 2005 12:48 pm, Andy Isaacson wrote:
> The first register write will be completed before the second register
> write because you use writel, which is defined to have the semantics
> you want. (It uses a platform-specific method to guarantee this,
> possibly "volatile" or "a
On Wed, 24 Aug 2005, Oliver Neukum wrote:
> Am Mittwoch, 24. August 2005 20:22 schrieb linux-os (Dick Johnson):
>>> sorry but I'm not sure to understand you...Do you mean that the first write
>>> into reg_a pointer will be completed before the second write because they're
>>> separated by a (;) ?
On Wed, Aug 24, 2005 at 07:31:31PM +0200, moreau francis wrote:
> --- "linux-os (Dick Johnson)" <[EMAIL PROTECTED]> a écrit :
> > On Wed, 24 Aug 2005, moreau francis wrote:
> > > I'm currently trying to write a USB driver for Linux. The device must be
> > > configured by writing some values into th
Am Mittwoch, 24. August 2005 20:22 schrieb linux-os (Dick Johnson):
> > sorry but I'm not sure to understand you...Do you mean that the first write
> > into reg_a pointer will be completed before the second write because they're
> > separated by a (;) ?
>
> Yes. The compiler must make sure that ev
On Wed, 24 Aug 2005, moreau francis wrote:
>
> --- "linux-os (Dick Johnson)" <[EMAIL PROTECTED]> a écrit :
>
>>
>> On Wed, 24 Aug 2005, moreau francis wrote:
>>
>>> Hi,
>>>
>>> I'm currently trying to write a USB driver for Linux. The device must be
>>> configured by writing some values into the
--- "linux-os (Dick Johnson)" <[EMAIL PROTECTED]> a écrit :
>
> On Wed, 24 Aug 2005, moreau francis wrote:
>
> > Hi,
> >
> > I'm currently trying to write a USB driver for Linux. The device must be
> > configured by writing some values into the same register but I want to be
> > sure that the w
On Wed, 24 Aug 2005, moreau francis wrote:
> Hi,
>
> I'm currently trying to write a USB driver for Linux. The device must be
> configured by writing some values into the same register but I want to be
> sure that the writing order is respected by either the compiler and the cpu.
>
> For example,
20 matches
Mail list logo