Skip to content

Commit

Permalink
IBM PowerPC(PPC64le) redhat uses 4.14 as of 7.5 and 7.6 (Xilinx#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
xdavidz committed Oct 28, 2019
1 parent c8a718f commit 04fba80
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
/* drm_dev_put was introduced with Linux 4.15 and backported to Red Hat 7.6. */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
#define XOCL_DRM_DEV_PUT drm_dev_put
#elif defined(RHEL_RELEASE_CODE)
#elif defined(RHEL_RELEASE_CODE) && !defined(__PPC64__)
#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,6)
#define XOCL_DRM_DEV_PUT drm_dev_put
#else
Expand Down Expand Up @@ -226,6 +226,24 @@ static inline void xocl_memcpy_toio(void *iomem, void *buf, u32 size)
#define XOCL_XILINX_VEN 0x10EE
#define XOCL_CHARDEV_REG_COUNT 16

#ifdef RHEL_RELEASE_VERSION
#if defined(__PPC64__)
#define RHEL_P2P_SUPPORT_74 0
#define RHEL_P2P_SUPPORT_76 0
#elif RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 6)
#define RHEL_P2P_SUPPORT_74 0
#define RHEL_P2P_SUPPORT_76 1
#elif RHEL_RELEASE_CODE > RHEL_RELEASE_VERSION(7, 3) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7, 6)
#define RHEL_P2P_SUPPORT_74 1
#define RHEL_P2P_SUPPORT_76 0
#endif
#else
#define RHEL_P2P_SUPPORT_74 0
#define RHEL_P2P_SUPPORT_76 0
#endif

#define RHEL_P2P_SUPPORT (RHEL_P2P_SUPPORT_74 | RHEL_P2P_SUPPORT_76)

#define INVALID_SUBDEVICE ~0U

#define XOCL_INVALID_MINOR -1
Expand Down

0 comments on commit 04fba80

Please sign in to comment.