Turns out the problem was not in consistent_sync(), but blockops.c
overriding the the dmac_ functions with buggy ones... Undo previous
commit
a9a31cc4ef3830e31766f03f55daa4b43e1d6dac, and remove blockops.c
from Makefile until it's completely removed from mainline kernel.
obj-$(CONFIG_CPU_SA110) += proc-sa110.o
obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o
obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o
-obj-$(CONFIG_CPU_V6) += proc-v6.o blockops.o
+obj-$(CONFIG_CPU_V6) += proc-v6.o
void consistent_sync(void *vaddr, size_t size, int direction)
{
unsigned long start = (unsigned long)vaddr;
- unsigned long end = start + size - 1;
+ unsigned long end = start + size;
switch (direction) {
case DMA_FROM_DEVICE: /* invalidate only */