[ewg] Re: [PATCH] Fix Compile problem on EL 5.1 on IA64 in OFED 1.4
Vladimir Sokolovsky
vlad at mellanox.co.il
Thu Jul 24 01:30:09 PDT 2008
Woodruff, Robert J wrote:
> Hi Vlad,
>
> Can you apply this patch to the OFED 1.4 tree, backports for
> EL 5.1. It fixes a bug with compiling on IA64. bug number 1102.
>
> Thanks
> woody
>
> diff -Naurp
> ofa_kernel-1.4/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma-map
> ping.h
> ofa_kernel-1.4-new/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma
> -mapping.h
> ---
> ofa_kernel-1.4/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma-map
> ping.h 2008-07-16 09:07:15.000000000 -0400
> +++
> ofa_kernel-1.4-new/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma
> -mapping.h 2008-07-18 16:01:28.000000000 -0400
> @@ -3,7 +3,7 @@
>
> #include_next <linux/dma-mapping.h>
>
> -#if !defined(__x86_64__) && !defined(__powerpc__)
> +#if !defined(__x86_64__) && !defined(__powerpc__) && !defined(__ia64__)
>
> /* x86_64 was the only architecture that had valid_dma_direction
> * before 2.6.18 */
Hi Woody,
I used the following patch instead:
diff --git a/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma-mapping.h b/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma-mapping.h
index 7fd3254..3dc8342 100644
--- a/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma-mapping.h
+++ b/kernel_addons/backport/2.6.18-EL5.1/include/linux/dma-mapping.h
@@ -1,22 +1,3 @@
-#ifndef BACKPORT_LINUX_DMA_MAPPING_TO_2_6_18_H
-#define BACKPORT_LINUX_DMA_MAPPING_TO_2_6_18_H
-
-#include_next <linux/dma-mapping.h>
-
-#if !defined(__x86_64__) && !defined(__powerpc__)
-
-/* x86_64 was the only architecture that had valid_dma_direction
- * before 2.6.18 */
-static inline int valid_dma_direction(int dma_direction)
-{
- return ((dma_direction == DMA_BIDIRECTIONAL) ||
- (dma_direction == DMA_TO_DEVICE) ||
- (dma_direction == DMA_FROM_DEVICE));
-}
-#endif
-
-#endif
-
Regards,
Vladimir
More information about the ewg
mailing list