Blob Blame History Raw
From: Joerg Roedel <jroedel@suse.de>
Date: Wed, 3 Nov 2021 10:49:56 +0100
Subject: [PATCH] kABI: Fix kABI after 36950f2da1ea
Patch-mainline: Never, kabi workaround
References: bsc#1191851

Fix kABI after backport of

	36950f2da1ea driver core: add a min_align_mask field to struct device_dma_parameters

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 include/linux/device.h      |    2 ++
 include/linux/dma-mapping.h |   12 ++++++++++++
 2 files changed, 14 insertions(+)

--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -882,7 +882,9 @@ struct device_dma_parameters {
 	 * sg limitations.
 	 */
 	unsigned int max_segment_size;
+#if !defined(__GENKSYMS__) && IS_ENABLED(CONFIG_64BIT)
 	unsigned int min_align_mask;
+#endif
 	unsigned long segment_boundary_mask;
 };
 
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -758,8 +758,14 @@ static inline int dma_set_seg_boundary(s
 
 static inline unsigned int dma_get_min_align_mask(struct device *dev)
 {
+	/*
+	 * XXX SLE kABI workaround - only 64bit arch has a hole in struct
+	 * device_dma_parameters
+	 */
+#if IS_ENABLED(CONFIG_64BIT)
 	if (dev->dma_parms)
 		return dev->dma_parms->min_align_mask;
+#endif
 	return 0;
 }
 
@@ -768,7 +774,13 @@ static inline int dma_set_min_align_mask
 {
 	if (WARN_ON_ONCE(!dev->dma_parms))
 		return -EIO;
+	/*
+	 * XXX SLE kABI workaround - only 64bit arch has a hole in struct
+	 * device_dma_parameters
+	 */
+#if IS_ENABLED(CONFIG_64BIT)
 	dev->dma_parms->min_align_mask = min_align_mask;
+#endif
 	return 0;
 }