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 Omit needless ioread32/i...



details:   https://anonhg.NetBSD.org/src/rev/2bf1caa23f0e
branches:  trunk
changeset: 365744:2bf1caa23f0e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 06:34:32 2018 +0000

description:
Omit needless ioread32/iowrite32.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c |  29 ++-----------------
 1 files changed, 4 insertions(+), 25 deletions(-)

diffs (60 lines):

diff -r f0e1a74bc36b -r 2bf1caa23f0e sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c      Mon Aug 27 06:34:15 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c      Mon Aug 27 06:34:32 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_opregion.c,v 1.10 2018/08/27 06:16:50 riastradh Exp $    */
+/*     $NetBSD: intel_opregion.c,v 1.11 2018/08/27 06:34:32 riastradh Exp $    */
 
 /*
  * Copyright 2008 Intel Corporation <hong.liu%intel.com@localhost>
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.10 2018/08/27 06:16:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.11 2018/08/27 06:34:32 riastradh Exp $");
 
 #include <linux/printk.h>
 #include <linux/acpi.h>
@@ -62,27 +62,6 @@
 #define MBOX_ASLE      (1<<2)
 #define MBOX_ASLE_EXT  (1<<4)
 
-#ifdef __NetBSD__              /* XXX acpi iomem */
-#  define      __iomem __acpi_iomem
-
-static inline uint32_t
-ioread32(const uint32_t __acpi_iomem *ptr)
-{
-       const uint32_t value = *ptr;
-
-       __insn_barrier();
-       return value;
-}
-
-static inline void
-iowrite32(uint32_t value, uint32_t __acpi_iomem *ptr)
-{
-
-       __insn_barrier();
-       *ptr = value;
-}
-#endif
-
 struct opregion_header {
        u8 signature[16];
        u32 size;
@@ -632,11 +611,11 @@
 
        if (notify != 0x80) {
                aprint_error_dev(self, "unknown notify 0x%02x\n", notify);
-       } else if ((ioread32(&acpi->cevt) & 1) == 0) {
+       } else if ((acpi->cevt & 1) == 0) {
                aprint_error_dev(self, "bad notify\n");
        }
 
-       iowrite32(0, &acpi->csts);
+       acpi->csts = 0;
 }
 #else  /* !__NetBSD__ */
 static int intel_opregion_video_event(struct notifier_block *nb,



Home | Main Index | Thread Index | Old Index