Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build xrt drivers on Linux 6.12-rc3 #8555

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/runtime_src/core/common/drv/include/xrt_cu.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,19 +413,19 @@ static inline char *prot2str(enum CU_PROTOCOL prot)
}
}

static void inline xrt_cu_enable_intr(struct xrt_cu *xcu, u32 intr_type)
static inline void xrt_cu_enable_intr(struct xrt_cu *xcu, u32 intr_type)
{
if (xcu->funcs)
xcu->funcs->enable_intr(xcu->core, intr_type);
}

static void inline xrt_cu_disable_intr(struct xrt_cu *xcu, u32 intr_type)
static inline void xrt_cu_disable_intr(struct xrt_cu *xcu, u32 intr_type)
{
if (xcu->funcs)
xcu->funcs->disable_intr(xcu->core, intr_type);
}

static u32 inline xrt_cu_clear_intr(struct xrt_cu *xcu)
static inline u32 xrt_cu_clear_intr(struct xrt_cu *xcu)
{
return xcu->funcs ? xcu->funcs->clear_intr(xcu->core) : 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static struct attribute_group accel_deadlock_detector_attr_group = {
.attrs = accel_deadlock_detector_attrs,
};

static int accel_deadlock_detector_remove(struct platform_device *pdev)
static int __accel_deadlock_detector_remove(struct platform_device *pdev)
{
struct xocl_accel_deadlock_detector *accel_deadlock_detector = NULL;
void *hdl = NULL;
Expand All @@ -87,6 +87,15 @@ static int accel_deadlock_detector_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void accel_deadlock_detector_remove(struct platform_device *pdev)
{
__accel_deadlock_detector_remove(pdev);
}
#else
#define accel_deadlock_detector_remove __accel_deadlock_detector_remove
#endif

static int accel_deadlock_detector_probe(struct platform_device *pdev)
{
struct xocl_accel_deadlock_detector *accel_deadlock_detector = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static int addr_translator_probe(struct platform_device *pdev)
}


static int addr_translator_remove(struct platform_device *pdev)
static int __addr_translator_remove(struct platform_device *pdev)
{
struct addr_translator *addr_translator = platform_get_drvdata(pdev);

Expand All @@ -411,6 +411,15 @@ static int addr_translator_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void addr_translator_remove(struct platform_device *pdev)
{
__addr_translator_remove(pdev);
}
#else
#define addr_translator_remove __addr_translator_remove
#endif

struct xocl_drv_private addr_translator_priv = {
.ops = &addr_translator_ops,
};
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/aim.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static struct attribute_group aim_attr_group = {
.attrs = aim_attrs,
};

static int aim_remove(struct platform_device *pdev)
static int __aim_remove(struct platform_device *pdev)
{
struct xocl_aim *aim;
void *hdl;
Expand All @@ -269,6 +269,15 @@ static int aim_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void aim_remove(struct platform_device *pdev)
{
__aim_remove(pdev);
}
#else
#define aim_remove __aim_remove
#endif

static int aim_probe(struct platform_device *pdev)
{
struct xocl_aim *aim;
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/am.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static struct attribute_group am_attr_group = {
.attrs = am_attrs,
};

static int am_remove(struct platform_device *pdev)
static int __am_remove(struct platform_device *pdev)
{
struct xocl_am *am;
void *hdl;
Expand All @@ -255,6 +255,15 @@ static int am_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void am_remove(struct platform_device *pdev)
{
__am_remove(pdev);
}
#else
#define am_remove __am_remove
#endif

static int am_probe(struct platform_device *pdev)
{
struct xocl_am *am;
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static struct attribute_group asm_attr_group = {
.attrs = asm_attrs,
};

static int asm_remove(struct platform_device *pdev)
static int __asm_remove(struct platform_device *pdev)
{
struct xocl_asm *xocl_asm;
void *hdl;
Expand All @@ -195,6 +195,15 @@ static int asm_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void asm_remove(struct platform_device *pdev)
{
__asm_remove(pdev);
}
#else
#define asm_remove __asm_remove
#endif

static int asm_probe(struct platform_device *pdev)
{
struct xocl_asm *xocl_asm;
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/axigate.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static struct xocl_axigate_funcs axigate_ops = {
.get_status = axigate_status,
};

static int axigate_remove(struct platform_device *pdev)
static int __axigate_remove(struct platform_device *pdev)
{
struct axi_gate *gate;

Expand All @@ -170,6 +170,15 @@ static int axigate_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void axigate_remove(struct platform_device *pdev)
{
__axigate_remove(pdev);
}
#else
#define axigate_remove __axigate_remove
#endif

static int axigate_probe(struct platform_device *pdev)
{
struct axi_gate *gate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static int calib_storage_probe(struct platform_device *pdev)
}


static int calib_storage_remove(struct platform_device *pdev)
static int __calib_storage_remove(struct platform_device *pdev)
{
struct calib_storage *calib_storage = platform_get_drvdata(pdev);

Expand All @@ -190,6 +190,15 @@ static int calib_storage_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void calib_storage_remove(struct platform_device *pdev)
{
__calib_storage_remove(pdev);
}
#else
#define calib_storage_remove __calib_storage_remove
#endif

struct xocl_drv_private calib_storage_priv = {
.ops = &calib_storage_ops,
};
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/cfg_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static int32_t gpio_cfg(struct platform_device *pdev, enum ert_gpio_cfg type)
mutex_unlock(&cfg_gpio->lock);
return ret;
}
static int config_gpio_remove(struct platform_device *pdev)
static int __config_gpio_remove(struct platform_device *pdev)
{
struct config_gpio *config_gpio;
void *hdl;
Expand All @@ -122,6 +122,15 @@ static int config_gpio_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void config_gpio_remove(struct platform_device *pdev)
{
__config_gpio_remove(pdev);
}
#else
#define config_gpio_remove __config_gpio_remove
#endif

static int config_gpio_probe(struct platform_device *pdev)
{
struct config_gpio *config_gpio;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static struct xocl_clock_counter_funcs clock_counter_ops = {
.get_freq_counter = clock_counter_get_freq,
};

static int clock_counter_remove(struct platform_device *pdev)
static int __clock_counter_remove(struct platform_device *pdev)
{
struct clock_counter *clock_c;

Expand All @@ -288,6 +288,15 @@ static int clock_counter_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void clock_counter_remove(struct platform_device *pdev)
{
__clock_counter_remove(pdev);
}
#else
#define clock_counter_remove __clock_counter_remove
#endif

static int clock_counter_probe(struct platform_device *pdev)
{
struct clock_counter *clock_c = NULL;
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/clock_wiz.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ static struct xocl_clock_wiz_funcs clock_wiz_ops = {
.get_data = clock_wiz_get_data,
};

static int clock_wiz_remove(struct platform_device *pdev)
static int __clock_wiz_remove(struct platform_device *pdev)
{
struct clock_wiz *clock_w;

Expand All @@ -1266,6 +1266,15 @@ static int clock_wiz_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void clock_wiz_remove(struct platform_device *pdev)
{
__clock_wiz_remove(pdev);
}
#else
#define clock_wiz_remove __clock_wiz_remove
#endif

static int clock_wiz_probe(struct platform_device *pdev)
{
struct clock_wiz *clock_w = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ static struct xrt_ert_queue_funcs command_queue_func = {
.intc_config = command_queue_intc_config,
};

static int command_queue_remove(struct platform_device *pdev)
static int __command_queue_remove(struct platform_device *pdev)
{
struct xrt_ert *command_queue;
xdev_handle_t xdev = xocl_get_xdev(pdev);
Expand All @@ -651,6 +651,15 @@ static int command_queue_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void command_queue_remove(struct platform_device *pdev)
{
__command_queue_remove(pdev);
}
#else
#define command_queue_remove __command_queue_remove
#endif

static int command_queue_probe(struct platform_device *pdev)
{
struct command_queue *cmd_queue;
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/cu.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ static int cu_probe(struct platform_device *pdev)
return err;
}

static int cu_remove(struct platform_device *pdev)
static int __cu_remove(struct platform_device *pdev)
{
xdev_handle_t xdev = xocl_get_xdev(pdev);
struct xrt_cu_info *info;
Expand Down Expand Up @@ -563,6 +563,15 @@ static int cu_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void cu_remove(struct platform_device *pdev)
{
__cu_remove(pdev);
}
#else
#define cu_remove __cu_remove
#endif

static struct platform_device_id cu_id_table[] = {
{ XOCL_DEVNAME(XOCL_CU), 0 },
{ },
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/ddr_srsr.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static int xocl_ddr_srsr_probe(struct platform_device *pdev)
}


static int xocl_ddr_srsr_remove(struct platform_device *pdev)
static int __xocl_ddr_srsr_remove(struct platform_device *pdev)
{
struct xocl_ddr_srsr *xocl_ddr_srsr = platform_get_drvdata(pdev);

Expand All @@ -333,6 +333,15 @@ static int xocl_ddr_srsr_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void xocl_ddr_srsr_remove(struct platform_device *pdev)
{
__xocl_ddr_srsr_remove(pdev);
}
#else
#define xocl_ddr_srsr_remove __xocl_ddr_srsr_remove
#endif

struct xocl_drv_private srsr_priv = {
.ops = &srsr_ops,
};
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/dna.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static int xlnx_dna_probe(struct platform_device *pdev)
}


static int xlnx_dna_remove(struct platform_device *pdev)
static int __xlnx_dna_remove(struct platform_device *pdev)
{
struct xocl_xlnx_dna *xlnx_dna;

Expand All @@ -484,6 +484,15 @@ static int xlnx_dna_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void xlnx_dna_remove(struct platform_device *pdev)
{
__xlnx_dna_remove(pdev);
}
#else
#define xlnx_dna_remove __xlnx_dna_remove
#endif

struct xocl_drv_private dna_priv = {
.ops = &dna_ops,
};
Expand Down
11 changes: 10 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/subdev/ert.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static struct xocl_mb_funcs ert_ops = {
.stop = stop_ert,
};

static int ert_remove(struct platform_device *pdev)
static int __ert_remove(struct platform_device *pdev)
{
struct xocl_ert *ert;
void *hdl;
Expand Down Expand Up @@ -396,6 +396,15 @@ static int ert_remove(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void ert_remove(struct platform_device *pdev)
{
__ert_remove(pdev);
}
#else
#define ert_remove __ert_remove
#endif

static int ert_probe(struct platform_device *pdev)
{
struct xocl_ert *ert;
Expand Down
Loading
Loading