changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: bcm: add cache invalidate before accessing prop buffer

changeset 7236: 0a1134e2909d
parent 7235: b1dc95374307
child 7237: 667b41a48d2f
author: cinap_lenrek@felloff.net
date: Mon, 13 May 2019 19:21:14 +0200
files: sys/src/9/bcm/vcore.c
description: bcm: add cache invalidate before accessing prop buffer
     1.1--- a/sys/src/9/bcm/vcore.c
     1.2+++ b/sys/src/9/bcm/vcore.c
     1.3@@ -147,7 +147,7 @@ vcreq(int tag, void *buf, int vallen, in
     1.4 	prop->taglen = vallen;
     1.5 	if(vallen > 0)
     1.6 		memmove(prop->data, buf, vallen);
     1.7-	cachedwbinvse(prop, prop->len);
     1.8+	cachedwbinvse(prop, n);
     1.9 	for(;;){
    1.10 		aprop = busaddr? dmaaddr(prop) : (uintptr)prop;
    1.11 		vcwrite(ChanProps, aprop);
    1.12@@ -158,6 +158,7 @@ vcreq(int tag, void *buf, int vallen, in
    1.13 			return -1;
    1.14 		busaddr = 0;
    1.15 	}
    1.16+	cachedinvse(prop, n);
    1.17 	if(prop->req == RspOk &&
    1.18 	   prop->tag == tag &&
    1.19 	   (prop->taglen&TagResp)) {