From 8eebae090b9b06e2ff6c2338bb8b13a54e845252 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 15 Sep 2005 17:09:42 +0000 Subject: [PATCH] Add a memory barrier for PREWRITE operations to ensure all writes by the CPU have drained before further writes to kick off the operation. MFC after: 1 week --- sys/alpha/alpha/busdma_machdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/alpha/alpha/busdma_machdep.c b/sys/alpha/alpha/busdma_machdep.c index ee2ee410fd7..a7eb1c5ad40 100644 --- a/sys/alpha/alpha/busdma_machdep.c +++ b/sys/alpha/alpha/busdma_machdep.c @@ -891,6 +891,10 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) } } } + + /* Ensure any pending writes have drained. */ + if (op & (BUS_DMASYNC_PREWRITE)) + alpha_mb(); } static void