Thread (19 messages) flat view 19 messages, 8 authors, 2006-09-20

Re: [POWERPC] convert string i/o operations to C

From: Segher Boessenkool <hidden>
Date: 2006-09-20 00:03:57

quoted
Perhaps this:
quoted
+void _insb(volatile u8 __iomem *port, void *buf, int ns)
+{
+	asm volatile("sync");
+	if (ns <= 0)
+		return;
+	asm volatile(
should be this:
quoted
+void _insb(volatile u8 __iomem *port, void *buf, int ns)
+{
+	if (ns <= 0)
+		return;
+	asm volatile("sync");
+	asm volatile(
No. The barrier should be there even if somebody is lame enough to  
give
a count of 0.
Why?  If "ns" <= 0 there is no I/O done...


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help