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/dist/drm/i915 Avoid bus_space_read/wri...
details: https://anonhg.NetBSD.org/src/rev/11d99b0d4152
branches: trunk
changeset: 330790:11d99b0d4152
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Jul 21 20:03:31 2014 +0000
description:
Avoid bus_space_read/write_8 on i386.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r 9ceafc084a74 -r 11d99b0d4152 sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c Mon Jul 21 20:01:18 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c Mon Jul 21 20:03:31 2014 +0000
@@ -38,8 +38,13 @@
#define __raw_i915_read32(dev_priv, reg) bus_space_read_4((dev_priv)->regs_bst, (dev_priv)->regs_bsh, (reg))
#define __raw_i915_write32(dev_priv, reg, val) bus_space_write_4((dev_priv)->regs_bst, (dev_priv)->regs_bsh, (reg), (val))
+#ifdef _LP64
#define __raw_i915_read64(dev_priv, reg) bus_space_read_8((dev_priv)->regs_bst, (dev_priv)->regs_bsh, (reg))
#define __raw_i915_write64(dev_priv, reg, val) bus_space_write_8((dev_priv)->regs_bst, (dev_priv)->regs_bsh, (reg), (val))
+#else
+#define __raw_i915_read64(dev_priv, reg) (bus_space_read_4((dev_priv)->regs_bst, (dev_priv)->regs_bsh, (reg)) | ((uint64_t)bus_space_read_4((dev_priv)->regs_bst, (dev_priv)->regs_bsh, (reg))
<< 32))
+#define __raw_i915_write64(dev_priv, reg, val) (bus_space_write_4((dev_priv)->regs_bst, (dev_priv)->regs_bsh, (reg), (uint32_t)(val)), bus_space_write_4((dev_priv)->regs_bst,
(dev_priv)->regs_bsh, (reg) + 4, (uint32_t)((val) >> 32)))
+#endif
#else
Home |
Main Index |
Thread Index |
Old Index