>Cool, that's what I was interested in.. That was my guess because any
>other way seemed less than sane, but I wasn't sure whether h/w vendors
>would adopt a vague interpretation of the rules, as PC h/w vendors are
>known to do every now and then :)
Depends on the situation really. You might get nonatomic transactions if you
try accesses that span more than one bus address (eg 32-bit write with only
16-bit alignment), but so long as you stick to correctly-aligned addresses you
should be fine.
>I wouldn't be surprised if a lot of drivers could be made
>faster on both SMP and UP by careful tuning of spinlocks and use of
>atomic variables.
Very likely. I imagine there are plenty of driver authors who don't
understand all the issues relating to concurrency and have opted for a
conservative approach.
>Another question -- is there a reasonably-portable way to do
>read-modify-write PCI op in Linux kernel drivers?
Most machines don't provide this as a primitive operation, so the best you can
do in general is the naive "a = readl(x); a++; writel(a, x);".
p.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:24 EST