Re: memory barrier in user space



mcharon@xxxxxxxxx wrote:
i have a user space driver that's accessing and initializing the
hardware.

in the kernel driver, i can call barrier() but in the user space,
how can i execute memory barrier?

i am running on MIPS and powerPC.

thank you in advance.

IIRC the barrier() macro just emitted a single instruction. You might want to look at the gcc info and the stuff about asm() in particular.

--
These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html
.



Relevant Pages

  • Re: [PATCHv5 2/2] memory barrier: adding smp_mb__after_lock
    ... powerpc, arm, mips and probably others where there is an explicit memory ... barrier at the end of the read lock primitive. ...
    (Linux-Kernel)
  • Re: [PATCH] Added MIPS RM9K watchdog driver
    ... it maps to barrier. ... barrier() in this place. ... thumbs and probably also CPU dependant. ... On MIPS cpu_relaxso far is ...
    (Linux-Kernel)
  • Re: [PATCH] Added MIPS RM9K watchdog driver
    ... I tried to find out about the purpose of cpu_relax. ... On MIPS, at least, ... it maps to barrier. ... barrier() in this place. ...
    (Linux-Kernel)
  • Re: memory barrier in user space
    ... in the kernel driver, i can call barrier() but in the user space, ... IIRC the barriermacro just emitted a single instruction. ... On MIPS the instruction is SYNC, and on PowerPC it is EIEIO. ...
    (comp.os.linux.development.system)
  • memory barrier in user space
    ... i have a user space driver that's accessing and initializing the ... in the kernel driver, i can call barrier() but in the user space, ...
    (comp.os.linux.development.system)