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/linux Wait for the read to be valid!



details:   https://anonhg.NetBSD.org/src/rev/4aaeb85d5fe1
branches:  trunk
changeset: 364621:4aaeb85d5fe1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 13:35:35 2018 +0000

description:
Wait for the read to be valid!

diffstat:

 sys/external/bsd/drm2/linux/linux_reservation.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 3f59ddbb80a4 -r 4aaeb85d5fe1 sys/external/bsd/drm2/linux/linux_reservation.c
--- a/sys/external/bsd/drm2/linux/linux_reservation.c   Mon Aug 27 13:35:15 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_reservation.c   Mon Aug 27 13:35:35 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_reservation.c,v 1.1 2018/08/27 13:33:59 riastradh Exp $  */
+/*     $NetBSD: linux_reservation.c,v 1.2 2018/08/27 13:35:35 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_reservation.c,v 1.1 2018/08/27 13:33:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_reservation.c,v 1.2 2018/08/27 13:35:35 riastradh Exp $");
 
 #include <linux/fence.h>
 #include <linux/reservation.h>
@@ -281,7 +281,8 @@
     struct reservation_object_read_ticket *ticket)
 {
 
-       ticket->version = robj->robj_version;
+       while ((ticket->version = robj->robj_version) & 1)
+               SPINLOCK_BACKOFF_HOOK;
        membar_consumer();
 }
 



Home | Main Index | Thread Index | Old Index