Browse files

gdev: minor fix to the comment

  • Loading branch information...
1 parent 7425312 commit f07a8ba285d03ba44d964321bb21b4fd8a2afd37 @shinpei0208 shinpei0208 committed Oct 4, 2013
Showing with 14 additions and 3 deletions.
  1. +4 −3 lib/user/nouveau/nouveau_gdev.c
  2. +10 −0 lib/user/nvrm/nvrm_gdev.c
View
7 lib/user/nouveau/nouveau_gdev.c
@@ -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;
@@ -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;
}
}
@@ -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;
}
}
@@ -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;
}
View
10 lib/user/nvrm/nvrm_gdev.c
@@ -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 */

0 comments on commit f07a8ba

Please sign in to comment.