Compare commits
3 commits
64dde8dd15
...
f00aa9947a
Author | SHA1 | Date | |
---|---|---|---|
f00aa9947a | |||
|
d40d64fc62 | ||
|
fdb563c1a5 |
6 changed files with 179 additions and 20 deletions
|
@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk
|
|||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=cryptodev-linux
|
||||
PKG_VERSION:=1.12
|
||||
PKG_VERSION:=1.13
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938
|
||||
PKG_HASH:=33b7915c46eb39a37110e88c681423c0dd0df25d784b6e1475ac3196367f0db5
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
From 99ae2a39ddc3f89c66d9f09783b591c0f2dbf2e9 Mon Sep 17 00:00:00 2001
|
||||
From: Gaurav Jain <gaurav.jain@nxp.com>
|
||||
Date: Wed, 28 Jun 2023 12:44:32 +0530
|
||||
Subject: [PATCH] cryptodev_verbosity: Fix build for Linux 6.4
|
||||
|
||||
register_sysctl_table api is removed in kernel.
|
||||
migrate to the new api register_sysctl.
|
||||
|
||||
child is also removed in linux 6.4 ctl_table struct.
|
||||
|
||||
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
|
||||
---
|
||||
ioctl.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/ioctl.c b/ioctl.c
|
||||
index 8f241b86..4262bbd5 100644
|
||||
--- a/ioctl.c
|
||||
+++ b/ioctl.c
|
||||
@@ -1246,7 +1246,9 @@ static struct ctl_table verbosity_ctl_root[] = {
|
||||
{
|
||||
.procname = "ioctl",
|
||||
.mode = 0555,
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
.child = verbosity_ctl_dir,
|
||||
+#endif
|
||||
},
|
||||
{},
|
||||
};
|
||||
@@ -1267,7 +1269,11 @@ static int __init init_cryptodev(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
|
||||
+#else
|
||||
+ verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
|
||||
+#endif
|
||||
|
||||
pr_info(PFX "driver %s loaded.\n", VERSION);
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 592017c3a910a3905b1925aee88c4674e9a596b7 Mon Sep 17 00:00:00 2001
|
||||
From: Gaurav Jain <gaurav.jain@nxp.com>
|
||||
Date: Tue, 30 May 2023 17:09:42 +0530
|
||||
Subject: [PATCH] zero copy: Fix build for Linux 6.4
|
||||
|
||||
get_user_pages_remote api prototype is changed in kernel.
|
||||
struct vm_area_struct **vmas argument is removed.
|
||||
Migrate to the new API.
|
||||
|
||||
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
|
||||
---
|
||||
zc.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/zc.c b/zc.c
|
||||
index fdf7da17..6637945a 100644
|
||||
--- a/zc.c
|
||||
+++ b/zc.c
|
||||
@@ -80,10 +80,14 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
|
||||
ret = get_user_pages_remote(task, mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
||||
-#else
|
||||
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
ret = get_user_pages_remote(mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
||||
+#else
|
||||
+ ret = get_user_pages_remote(mm,
|
||||
+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
+ pg, NULL);
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
|
||||
up_read(&mm->mmap_sem);
|
|
@ -0,0 +1,60 @@
|
|||
From bb8bc7cf60d2c0b097c8b3b0e807f805b577a53f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
|
||||
Date: Mon, 3 Jul 2023 00:46:02 +0000
|
||||
Subject: [PATCH] Move recent Linux version #ifdefs from v6.4 to v6.5
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The latest commits, meant to fix the build on Linux 6.4, are actually
|
||||
fixing the build for API changes introduced in the merge window of the
|
||||
yet-unreleased Linux 6.5, and actually break the build for Linux 6.4.
|
||||
|
||||
In particular, the upstream commits introducing the API changes are the
|
||||
following, which are *not* included in the Linux v6.4 tag:
|
||||
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19c4e618a1bc3d0cad1f04c857be8076cb05bbb2
|
||||
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca5e863233e8f6acd1792fd85d6bc2729a1b2c10
|
||||
|
||||
Change to #ifdef's to v6.5, where they will most likely be included.
|
||||
|
||||
Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
|
||||
---
|
||||
ioctl.c | 4 ++--
|
||||
zc.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ioctl.c b/ioctl.c
|
||||
index 4262bbd..e3eefe1 100644
|
||||
--- a/ioctl.c
|
||||
+++ b/ioctl.c
|
||||
@@ -1246,7 +1246,7 @@ static struct ctl_table verbosity_ctl_root[] = {
|
||||
{
|
||||
.procname = "ioctl",
|
||||
.mode = 0555,
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
|
||||
.child = verbosity_ctl_dir,
|
||||
#endif
|
||||
},
|
||||
@@ -1269,7 +1269,7 @@ static int __init init_cryptodev(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
|
||||
verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
|
||||
#else
|
||||
verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
|
||||
diff --git a/zc.c b/zc.c
|
||||
index 6637945..00e00c1 100644
|
||||
--- a/zc.c
|
||||
+++ b/zc.c
|
||||
@@ -80,7 +80,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
|
||||
ret = get_user_pages_remote(task, mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
||||
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
|
||||
ret = get_user_pages_remote(mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
|
@ -0,0 +1,35 @@
|
|||
From 5e7121e45ff283d30097da381fd7e97c4bb61364 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
|
||||
Date: Sun, 10 Dec 2023 13:57:55 +0000
|
||||
Subject: [PATCH] Fix build for Linux 6.7-rc1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since Linux 6.7-rc1, no ahash algorithms set a nonzero alignmask,
|
||||
and therefore `crypto_ahash_alignmask` has been removed.
|
||||
|
||||
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f8660c82b79af595b056f6b9f4f227edeb88574
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c626910f3f1bbce6ad18bc613d895d2a089ed95e
|
||||
|
||||
Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
|
||||
---
|
||||
cryptlib.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/cryptlib.c b/cryptlib.c
|
||||
index 4d739e5..0e59d4c 100644
|
||||
--- a/cryptlib.c
|
||||
+++ b/cryptlib.c
|
||||
@@ -381,7 +381,11 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name,
|
||||
}
|
||||
|
||||
hdata->digestsize = crypto_ahash_digestsize(hdata->async.s);
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0))
|
||||
hdata->alignmask = crypto_ahash_alignmask(hdata->async.s);
|
||||
+#else
|
||||
+ hdata->alignmask = 0;
|
||||
+#endif
|
||||
|
||||
init_completion(&hdata->async.result.completion);
|
||||
|
|
@ -22,8 +22,6 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
|||
src/init/ssdk_dts.c | 27 +++++++++++++++++++++++++++
|
||||
4 files changed, 32 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/init/ssdk_dts.h b/include/init/ssdk_dts.h
|
||||
index 00fa4c1..210c788 100755
|
||||
--- a/include/init/ssdk_dts.h
|
||||
+++ b/include/init/ssdk_dts.h
|
||||
@@ -101,6 +101,7 @@ typedef struct
|
||||
|
@ -34,7 +32,7 @@ index 00fa4c1..210c788 100755
|
|||
} ssdk_dt_cfg;
|
||||
|
||||
#define SSDK_MAX_NR_ETH 6
|
||||
@@ -163,6 +164,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t index);
|
||||
@@ -162,6 +163,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t
|
||||
struct device_node *ssdk_dts_node_get(a_uint32_t dev_id);
|
||||
struct clk *ssdk_dts_essclk_get(a_uint32_t dev_id);
|
||||
struct clk *ssdk_dts_cmnclk_get(a_uint32_t dev_id);
|
||||
|
@ -42,8 +40,6 @@ index 00fa4c1..210c788 100755
|
|||
|
||||
int ssdk_switch_device_num_init(void);
|
||||
void ssdk_switch_device_num_exit(void);
|
||||
diff --git a/src/adpt/cppe/adpt_cppe_portctrl.c b/src/adpt/cppe/adpt_cppe_portctrl.c
|
||||
index 00d0404..6b32f79 100755
|
||||
--- a/src/adpt/cppe/adpt_cppe_portctrl.c
|
||||
+++ b/src/adpt/cppe/adpt_cppe_portctrl.c
|
||||
@@ -33,6 +33,7 @@
|
||||
|
@ -54,7 +50,7 @@ index 00d0404..6b32f79 100755
|
|||
#include "adpt.h"
|
||||
#include "adpt_hppe.h"
|
||||
#include "adpt_cppe_portctrl.h"
|
||||
@@ -60,8 +61,7 @@ _adpt_cppe_port_mux_mac_set(a_uint32_t dev_id, fal_port_t port_id,
|
||||
@@ -60,8 +61,7 @@ _adpt_cppe_port_mux_mac_set(a_uint32_t d
|
||||
case SSDK_PHYSICAL_PORT3:
|
||||
case SSDK_PHYSICAL_PORT4:
|
||||
if (mode0 == PORT_WRAPPER_PSGMII) {
|
||||
|
@ -64,11 +60,9 @@ index 00d0404..6b32f79 100755
|
|||
cppe_port_mux_ctrl.bf.port3_pcs_sel =
|
||||
CPPE_PORT3_PCS_SEL_PCS0_CHANNEL4;
|
||||
cppe_port_mux_ctrl.bf.port4_pcs_sel =
|
||||
diff --git a/src/adpt/hppe/adpt_hppe_uniphy.c b/src/adpt/hppe/adpt_hppe_uniphy.c
|
||||
index 5e36602..bad1eab 100644
|
||||
--- a/src/adpt/hppe/adpt_hppe_uniphy.c
|
||||
+++ b/src/adpt/hppe/adpt_hppe_uniphy.c
|
||||
@@ -1122,9 +1122,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uint32_t dev_id, a_uint32_t uniphy_index)
|
||||
@@ -1122,9 +1122,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
|
||||
{
|
||||
a_uint32_t i;
|
||||
sw_error_t rv = SW_OK;
|
||||
|
@ -78,7 +72,7 @@ index 5e36602..bad1eab 100644
|
|||
|
||||
union uniphy_mode_ctrl_u uniphy_mode_ctrl;
|
||||
|
||||
@@ -1134,9 +1131,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uint32_t dev_id, a_uint32_t uniphy_index)
|
||||
@@ -1134,9 +1131,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
|
||||
SSDK_DEBUG("uniphy %d is psgmii mode\n", uniphy_index);
|
||||
#if defined(CPPE)
|
||||
if (adpt_ppe_type_get(dev_id) == CPPE_TYPE) {
|
||||
|
@ -89,11 +83,9 @@ index 5e36602..bad1eab 100644
|
|||
SSDK_INFO("cypress uniphy %d is qca8072 psgmii mode\n", uniphy_index);
|
||||
rv = __adpt_cppe_uniphy_mode_set(dev_id, uniphy_index,
|
||||
PORT_WRAPPER_PSGMII);
|
||||
diff --git a/src/init/ssdk_dts.c b/src/init/ssdk_dts.c
|
||||
index 686b6d2..70b0a09 100644
|
||||
--- a/src/init/ssdk_dts.c
|
||||
+++ b/src/init/ssdk_dts.c
|
||||
@@ -279,6 +279,13 @@ struct clk *ssdk_dts_cmnclk_get(a_uint32_t dev_id)
|
||||
@@ -272,6 +272,13 @@ struct clk *ssdk_dts_cmnclk_get(a_uint32
|
||||
return cfg->cmnblk_clk;
|
||||
}
|
||||
|
||||
|
@ -107,7 +99,7 @@ index 686b6d2..70b0a09 100644
|
|||
#ifndef BOARD_AR71XX
|
||||
#if defined(CONFIG_OF) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
|
||||
static void ssdk_dt_parse_mac_mode(a_uint32_t dev_id,
|
||||
@@ -313,6 +320,25 @@ static void ssdk_dt_parse_mac_mode(a_uint32_t dev_id,
|
||||
@@ -306,6 +313,25 @@ static void ssdk_dt_parse_mac_mode(a_uin
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -133,7 +125,7 @@ index 686b6d2..70b0a09 100644
|
|||
#ifdef IN_UNIPHY
|
||||
static void ssdk_dt_parse_uniphy(a_uint32_t dev_id)
|
||||
{
|
||||
@@ -1307,6 +1333,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *cfg, a_uint32_t num, a_uint32_t *dev_id)
|
||||
@@ -1292,6 +1318,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *
|
||||
rv = ssdk_dt_parse_access_mode(switch_node, ssdk_dt_priv);
|
||||
SW_RTN_ON_ERROR(rv);
|
||||
ssdk_dt_parse_mac_mode(*dev_id, switch_node, cfg);
|
||||
|
@ -141,6 +133,3 @@ index 686b6d2..70b0a09 100644
|
|||
ssdk_dt_parse_mdio(*dev_id, switch_node, cfg);
|
||||
ssdk_dt_parse_port_bmp(*dev_id, switch_node, cfg);
|
||||
ssdk_dt_parse_interrupt(*dev_id, switch_node);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
Loading…
Reference in a new issue