Skip to content

Commit

Permalink
Fixed refs[i].frame statements
Browse files Browse the repository at this point in the history
Instead, shared[refs[i]] should be called. grant_ref_t is just an index
in the shared refs array.
  • Loading branch information
Pratyush Yadav committed May 26, 2018
1 parent 03060a3 commit 5104f5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/dev/xen/grant_table/grant_table.c
Expand Up @@ -683,7 +683,7 @@ xen_bus_dmamap_load_callback(void *callback_arg, bus_dma_segment_t
refs = callback_arg;

for (i = 0; i < nseg; i++) {
refs[i].frame = segs[i].ds_addr;
shared[refs[i]].frame = segs[i].ds_addr;
/* XXX Should I call wmb() for each iteration of the loop or is it ok if I
* call it just once after the loop. */
wmb();
Expand Down Expand Up @@ -715,7 +715,7 @@ xen_bus_dmamap_unload(bus_dma_tag_t dmat. bus_dmamap_t map, grant_ref_t *refs,
unsigned int i;

for (i = 0; i < refcount; i++) {
refs[i].frame = 0;
shared[refs[i]].frame = 0;
wmb();
}

Expand Down

0 comments on commit 5104f5e

Please sign in to comment.