Skip to contentSkip to conversation

backports: fixes for RHEL7.0

PATCH Applied Stefan Assmann 2 participants 5 messages Apr 25, 2014 – May 2, 2014

lore
Share & tools
lore
#0 lore raw

cover backports: fixes for RHEL7.0

Get backports ready for RHEL7.0.

Stefan Assmann (3):
backports: wrap dma_set_mask_and_coherent in LINUX_BACKPORT()
backports: add linux/of_graph.h to copy-list
backports: ifdef code already present in RHEL7.0

 backport/backport-include/linux/device.h      | 2 +-
 backport/backport-include/linux/dma-mapping.h | 1 +
 backport/backport-include/linux/skbuff.h      | 2 +-
 backport/compat/dma-shared-helpers.c          | 2 ++
 copy-list                                     | 1 +
 5 files changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/3 backports: wrap dma_set_mask_and_coherent in LINUX_BACKPORT()

To avoid conflicts with any distribution kernel wrap dma_set_mask_and_coherent with LINUX_BACKPORT().

---
 backport/backport-include/linux/dma-mapping.h | 1 +
 1 file changed, 1 insertion(+)
backport/backport-include/linux/dma-mapping.h +1 -0
index 9b2bc90..fdc3331 100644
@@ -22,6 +22,7 @@ static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
  * as the DMA API guarantees that the coherent DMA mask can be set to
  * the same or smaller than the streaming DMA mask.
  */
+#define dma_set_mask_and_coherent LINUX_BACKPORT(dma_set_mask_and_coherent)
 static inline int dma_set_mask_and_coherent(struct device *dev, u64 mask)
 {
 	int rc = dma_set_mask(dev, mask);
Signature · 1 line
1.9.0
#2 lore raw

PATCH 2/3 backports: add linux/of_graph.h to copy-list

In reply to Stefan Assmann

Required by CONFIG_VIDEO_ADV7343 and others.

---
 copy-list | 1 +
 1 file changed, 1 insertion(+)
copy-list +1 -0
index 2794c0c..76c07cb 100644
@@ -178,6 +178,7 @@ include/trace/events/v4l2.h
 drivers/media/
 include/linux/platform_data/vsp1.h
 include/linux/platform_data/camera-rcar.h
+include/linux/of_graph.h
 
 include/net/6lowpan.h
 include/net/netns/ieee802154_6lowpan.h
Signature · 1 line
1.9.0
#3 lore raw

PATCH 3/3 backports: ifdef code already present in RHEL7.0

In reply to Stefan Assmann

Avoid conflicts with RHEL7.0 as DEVICE_ATTR_* defines, enum pkt_hash_types, skb_set_hash(), dma_common_get_sgtable() are already present.

---
 backport/backport-include/linux/device.h | 2 +-
 backport/backport-include/linux/skbuff.h | 2 +-
 backport/compat/dma-shared-helpers.c     | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)
backport/backport-include/linux/device.h +1 -1
index 3f57bd9..d6226ab 100644
@@ -102,7 +102,7 @@ backport_device_release_driver(struct device *dev)
 #define device_release_driver LINUX_BACKPORT(device_release_driver)
 #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
 #ifndef DEVICE_ATTR_RO
 #define DEVICE_ATTR_RO(_name) \
 struct device_attribute dev_attr_ ## _name = __ATTR_RO(_name);
backport/backport-include/linux/skbuff.h +1 -1
index fae13b7..2576faf 100644
@@ -327,7 +327,7 @@ static inline void skb_frag_set_page(struct sk_buff *skb, int f,
 }
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
 /*
  * Packet hash types specify the type of hash in skb_set_hash.
  *
backport/compat/dma-shared-helpers.c +2 -0
index f76cf06..2ada681 100644
@@ -20,6 +20,7 @@
 #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
 
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
 /*
  * Create scatter-list for the already allocated DMA buffer.
  */
@@ -37,3 +38,4 @@ int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
 	return 0;
 }
 EXPORT_SYMBOL_GPL(dma_common_get_sgtable);
+#endif /* RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) */
Signature · 1 line
1.9.0
#4 lore raw
In reply to Stefan Assmann
Quoted 7 lines · Stefan Assmann

Get backports ready for RHEL7.0.

Stefan Assmann (3):
backports: wrap dma_set_mask_and_coherent in LINUX_BACKPORT()
backports: add linux/of_graph.h to copy-list
backports: ifdef code already present in RHEL7.0

Quoted 6 lines
 backport/backport-include/linux/device.h      | 2 +-
 backport/backport-include/linux/dma-mapping.h | 1 +
 backport/backport-include/linux/skbuff.h      | 2 +-
 backport/compat/dma-shared-helpers.c          | 2 ++
 copy-list                                     | 1 +
 5 files changed, 6 insertions(+), 2 deletions(-)

Thanks, applied!

Luis