Module Name: src
Committed By: riastradh
Date: Mon Aug 27 07:32:11 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/include/linux: reservation.h
Log Message:
Add some reservation stubs.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/bsd/drm2/include/linux/reservation.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/reservation.h
diff -u src/sys/external/bsd/drm2/include/linux/reservation.h:1.1 src/sys/external/bsd/drm2/include/linux/reservation.h:1.2
--- src/sys/external/bsd/drm2/include/linux/reservation.h:1.1 Wed Jul 16 20:59:58 2014
+++ src/sys/external/bsd/drm2/include/linux/reservation.h Mon Aug 27 07:32:11 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: reservation.h,v 1.1 2014/07/16 20:59:58 riastradh Exp $ */
+/* $NetBSD: reservation.h,v 1.2 2018/08/27 07:32:11 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,14 +32,28 @@
#ifndef _ASM_RESERVATION_H_
#define _ASM_RESERVATION_H_
+#include <sys/atomic.h>
+
#include <linux/ww_mutex.h>
+struct fence;
+
extern struct ww_class reservation_ww_class;
struct reservation_object {
struct ww_mutex lock;
+
+ struct fence *robj_fence_excl;
};
+#define reservation_object_add_excl_fence linux_reservation_object_add_excl_fence
+#define reservation_object_add_shared_fence linux_reservation_object_add_shared_fence
+
+void reservation_object_add_excl_fence(struct reservation_object *,
+ struct fence *);
+void reservation_object_add_shared_fence(struct reservation_object *,
+ struct fence *);
+
static inline void
reservation_object_init(struct reservation_object *reservation)
{
@@ -54,4 +68,15 @@ reservation_object_fini(struct reservati
ww_mutex_destroy(&reservation->lock);
}
+static inline struct fence *
+reservation_object_get_excl(struct reservation_object *reservation)
+{
+ struct fence *fence;
+
+ fence = reservation->robj_fence_excl;
+ membar_datadep_consumer();
+
+ return fence;
+}
+
#endif /* _ASM_RESERVATION_H_ */