question on pci, ordering, smp, etc.

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

 




Suppose I have a chunk of memory that is visible on the PCI bus. I ioremap_nocache() it into kernel space on multiple cpus. This memory is not used by any hardware devices, only the various cpus. No DMA is involved.

What are the rules for portably accessing this memory? I assume that I need to use readb/readw/readl/writeb/writew/writel and the other mmio helpers, and can't access it directly? Given that those all give little-endian access, is there any way to access without the byte-swapping on big-endian systems?

How can I portably ensure that a write from one cpu will be visible when another cpu does a read? Do I need to read from the device on the original cpu, or is there a way to flush it far enough that the other cpus will get the updated data even if it hasn't made it all the way back to the device yet?

Thanks,

Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux