From 1866368a8ab8cacf73aa47f67138040d5620439d Mon Sep 17 00:00:00 2001 From: Yutang Jiang Date: Sat, 24 Dec 2016 01:11:32 +0800 Subject: layerscape: add ls1088ardb device support LS1088A is an ARMv8 implementation combining eight ARM A53 processor cores. The LS1088ARDB is an evaluatoin platform that supports the LS1088A family SoCs. Features summary: - Eight 64-bit ARM v8 Cortex-A53 CPUs - Data path acceleration architecture 2.0 (DPAA2) - Ethernet interfaces - QUADSPI flash, 3 PCIe, 2 USB, 1 SD, 2 DUARTs etc Signed-off-by: Yutang Jiang --- ...fsl-mc-bus-Eliminate-double-function-call.patch | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 target/linux/layerscape/patches-4.4/7159-staging-fsl-mc-bus-Eliminate-double-function-call.patch (limited to 'target/linux/layerscape/patches-4.4/7159-staging-fsl-mc-bus-Eliminate-double-function-call.patch') diff --git a/target/linux/layerscape/patches-4.4/7159-staging-fsl-mc-bus-Eliminate-double-function-call.patch b/target/linux/layerscape/patches-4.4/7159-staging-fsl-mc-bus-Eliminate-double-function-call.patch new file mode 100644 index 0000000000..74ac4fd28f --- /dev/null +++ b/target/linux/layerscape/patches-4.4/7159-staging-fsl-mc-bus-Eliminate-double-function-call.patch @@ -0,0 +1,73 @@ +From ecd7b5d9616e50f48a400749f17db19fd8a43f25 Mon Sep 17 00:00:00 2001 +From: Bhaktipriya Shridhar +Date: Sun, 28 Feb 2016 23:58:05 +0530 +Subject: [PATCH 159/226] staging: fsl-mc: bus: Eliminate double function call + +A call to irq_find_matching_host was already made and the result +has been stored in mc_msi_domain. mc_msi_domain is again reassigned +using the same function call which is redundant. + +irq_find_matching_host returns/locates a domain for a given fwnode. +The domain is identified using device node and bus_token(if several +domains have same device node but different purposes they can be +distinguished using bus-specific token). +http://www.bricktou.com/include/linux/irqdomain_irq_find_matching_host_en.html + +Also, of_property_read_bool finds and reads a boolean from a property +device node from which the property value is to be read. It doesn't +alter the device node. +http://lists.infradead.org/pipermail/linux-arm-kernel/2012-February/083698.html + +Since, both the function calls have the same device node and bus_token, +the return values shall be the same. Hence, the second call has been +removed. + +This was done using Coccinelle: + +@r@ +idexpression *x; +identifier f; +position p1,p2; +@@ + +x@p1 = f(...) +... when != x +( +x@p2 = f(...) +) + +@script:python@ +p1 << r.p1; +p2 << r.p2; +@@ + +if (p1[0].line == p2[0].line): + cocci.include_match(False) + +@@ +idexpression *x; +identifier f; +position r.p1,r.p2; +@@ + +*x@p1 = f(...) +... +*x@p2 = f(...) + +Signed-off-by: Bhaktipriya Shridhar +Signed-off-by: Greg Kroah-Hartman +--- + .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c ++++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +@@ -118,8 +118,6 @@ void its_fsl_mc_msi_cleanup(void) + if (!of_property_read_bool(np, "msi-controller")) + continue; + +- mc_msi_domain = irq_find_matching_host(np, +- DOMAIN_BUS_FSL_MC_MSI); + if (mc_msi_domain && + mc_msi_domain->host_data == &its_fsl_mc_msi_domain_info) + irq_domain_remove(mc_msi_domain); -- cgit v1.2.3