Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/i915drm Cast from uint32_t to bus_addr...



details:   https://anonhg.NetBSD.org/src/rev/17c22ffefc3f
branches:  trunk
changeset: 795817:17c22ffefc3f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri May 02 14:36:10 2014 +0000

description:
Cast from uint32_t to bus_addr_t earlier, since it may exceed 32 bits.

diffstat:

 sys/external/bsd/drm2/i915drm/i915_gem_gtt.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f910681d421c -r 17c22ffefc3f sys/external/bsd/drm2/i915drm/i915_gem_gtt.c
--- a/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c      Fri May 02 03:05:41 2014 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c      Fri May 02 14:36:10 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_gtt.c,v 1.4 2014/05/01 14:37:36 riastradh Exp $       */
+/*     $NetBSD: i915_gem_gtt.c,v 1.5 2014/05/02 14:36:10 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_gtt.c,v 1.4 2014/05/01 14:37:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_gtt.c,v 1.5 2014/05/02 14:36:10 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -556,7 +556,7 @@
 {
        const uint32_t addr = (pte & ~(uint32_t)0xf);
 
-       return ((addr & 0xff0) << 28) | (addr & ~(uint32_t)0xff0);
+       return ((bus_addr_t)(addr & 0xff0) << 28) | (addr & ~(uint32_t)0xff0);
 }
 
 static int



Home | Main Index | Thread Index | Old Index