diff options
author | Yangbo Lu <yangbo.lu@nxp.com> | 2020-04-10 10:47:05 +0800 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-05-07 12:53:06 +0200 |
commit | cddd4591404fb4c53dc0b3c0b15b942cdbed4356 (patch) | |
tree | 392c1179de46b0f804e3789edca19069b64e6b44 /target/linux/layerscape/patches-5.4/701-net-0052-sdk_dpaa-ceetm-remove-tc-class-reference-counting.patch | |
parent | d1d2c0b5579ea4f69a42246c9318539d61ba1999 (diff) | |
download | upstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.tar.gz upstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.tar.bz2 upstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.zip |
layerscape: add patches-5.4
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release
which was tagged LSDK-20.04-V5.4.
https://source.codeaurora.org/external/qoriq/qoriq-components/linux/
For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in
LSDK, port the dts patches from 4.14.
The patches are sorted into the following categories:
301-arch-xxxx
302-dts-xxxx
303-core-xxxx
701-net-xxxx
801-audio-xxxx
802-can-xxxx
803-clock-xxxx
804-crypto-xxxx
805-display-xxxx
806-dma-xxxx
807-gpio-xxxx
808-i2c-xxxx
809-jailhouse-xxxx
810-keys-xxxx
811-kvm-xxxx
812-pcie-xxxx
813-pm-xxxx
814-qe-xxxx
815-sata-xxxx
816-sdhc-xxxx
817-spi-xxxx
818-thermal-xxxx
819-uart-xxxx
820-usb-xxxx
821-vfio-xxxx
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Diffstat (limited to 'target/linux/layerscape/patches-5.4/701-net-0052-sdk_dpaa-ceetm-remove-tc-class-reference-counting.patch')
-rw-r--r-- | target/linux/layerscape/patches-5.4/701-net-0052-sdk_dpaa-ceetm-remove-tc-class-reference-counting.patch | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-5.4/701-net-0052-sdk_dpaa-ceetm-remove-tc-class-reference-counting.patch b/target/linux/layerscape/patches-5.4/701-net-0052-sdk_dpaa-ceetm-remove-tc-class-reference-counting.patch new file mode 100644 index 0000000000..473720b41f --- /dev/null +++ b/target/linux/layerscape/patches-5.4/701-net-0052-sdk_dpaa-ceetm-remove-tc-class-reference-counting.patch @@ -0,0 +1,106 @@ +From 024d664114310fe103c2c31f2253bed58238951d Mon Sep 17 00:00:00 2001 +From: Camelia Groza <camelia.groza@nxp.com> +Date: Wed, 17 Jan 2018 16:47:07 +0200 +Subject: [PATCH] sdk_dpaa: ceetm: remove tc class reference counting + +Signed-off-by: Camelia Groza <camelia.groza@nxp.com> +--- + .../ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c | 38 +++------------------- + .../ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h | 1 - + 2 files changed, 4 insertions(+), 35 deletions(-) + +--- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c ++++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c +@@ -774,7 +774,6 @@ static int ceetm_init_prio(struct Qdisc + } + + child_cl->common.classid = TC_H_MAKE(sch->handle, (i + 1)); +- child_cl->refcnt = 1; + child_cl->parent = sch; + child_cl->type = CEETM_PRIO; + child_cl->shaped = priv->shaped; +@@ -986,7 +985,6 @@ static int ceetm_init_wbfs(struct Qdisc + } + + child_cl->common.classid = TC_H_MAKE(sch->handle, (i + 1)); +- child_cl->refcnt = 1; + child_cl->parent = sch; + child_cl->type = CEETM_WBFS; + child_cl->shaped = priv->shaped; +@@ -1297,29 +1295,9 @@ static void ceetm_attach(struct Qdisc *s + } + } + +-static unsigned long ceetm_cls_get(struct Qdisc *sch, u32 classid) ++static unsigned long ceetm_cls_search(struct Qdisc *sch, u32 handle) + { +- struct ceetm_class *cl; +- +- pr_debug(KBUILD_BASENAME " : %s : classid %X from qdisc %X\n", +- __func__, classid, sch->handle); +- cl = ceetm_find(classid, sch); +- +- if (cl) +- cl->refcnt++; /* Will decrement in put() */ +- return (unsigned long)cl; +-} +- +-static void ceetm_cls_put(struct Qdisc *sch, unsigned long arg) +-{ +- struct ceetm_class *cl = (struct ceetm_class *)arg; +- +- pr_debug(KBUILD_BASENAME " : %s : classid %X from qdisc %X\n", +- __func__, cl->common.classid, sch->handle); +- cl->refcnt--; +- +- if (cl->refcnt == 0) +- ceetm_cls_destroy(sch, cl); ++ return (unsigned long)ceetm_find(handle, sch); + } + + static int ceetm_cls_change_root(struct ceetm_class *cl, +@@ -1540,7 +1518,6 @@ static int ceetm_cls_change(struct Qdisc + cl->root.tbl = copt->tbl; + + cl->common.classid = classid; +- cl->refcnt = 1; + cl->parent = sch; + cl->root.child = NULL; + cl->root.wbfs_grp_a = false; +@@ -1696,15 +1673,9 @@ static int ceetm_cls_delete(struct Qdisc + + sch_tree_lock(sch); + qdisc_class_hash_remove(&priv->clhash, &cl->common); +- cl->refcnt--; +- +- /* The refcnt should be at least 1 since we have incremented it in +- * get(). Will decrement again in put() where we will call destroy() +- * to actually free the memory if it reaches 0. +- */ +- WARN_ON(cl->refcnt == 0); + + sch_tree_unlock(sch); ++ ceetm_cls_destroy(sch, cl); + return 0; + } + +@@ -1824,8 +1795,7 @@ static void ceetm_tcf_unbind(struct Qdis + const struct Qdisc_class_ops ceetm_cls_ops = { + .graft = ceetm_cls_graft, + .leaf = ceetm_cls_leaf, +- .get = ceetm_cls_get, +- .put = ceetm_cls_put, ++ .find = ceetm_cls_search, + .change = ceetm_cls_change, + .delete = ceetm_cls_delete, + .walk = ceetm_cls_walk, +--- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h ++++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h +@@ -191,7 +191,6 @@ struct wbfs_c { + + struct ceetm_class { + struct Qdisc_class_common common; +- int refcnt; /* usage count of this class */ + struct tcf_proto *filter_list; /* class attached filters */ + struct tcf_block *block; + struct Qdisc *parent; |