Skip to content

Commit

Permalink
gdev: minor fix to the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
shinpei0208 committed Oct 4, 2013
1 parent 7425312 commit f07a8ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/user/nouveau/nouveau_gdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct gdev_nouveau_ctx_objects {
struct nouveau_object *m2mf;
};

/* this ensures that SSE is not applied to memcpy. */
void* __nouveau_io_memcpy(void* s1, const void* s2, size_t n)
{
volatile char* out = (volatile char*)s1;
Expand Down Expand Up @@ -613,7 +614,7 @@ int gdev_raw_read(struct gdev_mem *mem, void *buf, uint64_t addr, uint32_t size)
return 0;
}
else {
/* libnvi doesn't support direct device read. */
/* nouveau doesn't support direct device read. */
return -EINVAL;
}
}
Expand All @@ -628,7 +629,7 @@ int gdev_raw_write(struct gdev_mem *mem, uint64_t addr, const void *buf, uint32_
return 0;
}
else {
/* libnvi doesn't support direct device read. */
/* nouveau doesn't support direct device read. */
return -EINVAL;
}
}
Expand All @@ -637,7 +638,7 @@ int gdev_raw_write(struct gdev_mem *mem, uint64_t addr, const void *buf, uint32_
void *gdev_raw_mem_map(struct gdev_mem *mem)
{
struct nouveau_bo *bo = mem->bo;
/* with libnvi, we suppose all memory objects to be mapped on the host. */
/* with nouveau we suppose all memory objects to be mapped on the host. */
return bo->map;
}

Expand Down
10 changes: 10 additions & 0 deletions lib/user/nvrm/nvrm_gdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
struct gdev_device *lgdev; /* local gdev_device structure for user-space scheduling */
static struct nvrm_context *nvrm_ctx = 0;

/* this ensures that SSE is not applied to memcpy. */
void* __nvrm_io_memcpy(void* s1, const void* s2, size_t n)
{
volatile char* out = (volatile char*)s1;
const volatile char* in = (const volatile char*)s2;
size_t i;
for (i = 0; i < n; ++i) out[i] = in[i];
return s1;
}

int gdev_raw_query(struct gdev_device *gdev, uint32_t type, uint64_t *result)
{
#ifndef GDEV_SCHED_DISABLED/* fix this */
Expand Down

0 comments on commit f07a8ba

Please sign in to comment.