Blob Blame History Raw
From: Takashi Iwai <tiwai@suse.de>
Subject: drm: drm_file struct kABI compatibility workaround
Patch-mainline: Never, kABI workaround
References: bsc#1197914

The recent fix for DRM core
  patches.suse/drm-serialize-drm_file.master-with-a-new-spinlock.patch
introduced a new field in struct drm_file.
Apply the standard workaround to move it at the tail with __GENKSYMS__
for keeping the kABI compatibility; drm_file isn't embedded, so it
should be safe to do that.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 include/drm/drm_file.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/include/drm/drm_file.h
+++ b/include/drm/drm_file.h
@@ -244,9 +244,6 @@ struct drm_file {
 	 */
 	struct drm_master *master;
 
-	/** @master_lock: Serializes @master. */
-	spinlock_t master_lookup_lock;
-
 	/** @pid: Process that opened this file. */
 	struct pid *pid;
 
@@ -362,6 +359,10 @@ struct drm_file {
 #if IS_ENABLED(CONFIG_DRM_LEGACY)
 	unsigned long lock_count; /* DRI1 legacy lock count */
 #endif
+#ifndef __GENKSYMS__
+	/** @master_lock: Serializes @master. */
+	spinlock_t master_lookup_lock;
+#endif
 };
 
 /**