Thread (3 messages) flat view 3 messages, 3 authors, 2021-01-17

Re: [PATCH V2] ARM: imx: add smp support for imx7d

From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: 2021-01-17 12:33:41

On Sun, Jan 17, 2021 at 07:46:20PM +0800, Shawn Guo wrote:
On Thu, Jan 07, 2021 at 01:31:57PM +0100, Marek Vasut wrote:
quoted
From: Anson Huang <redacted>

Add SMP support for i.MX7D, including CPU hotplug support, for
systems where TFA is not present.

The arm,cpu-registers-not-fw-configured is required, otherwise the
timer does not work correctly.
As DT change becomes another patch, this should be dropped.
quoted
Signed-off-by: Anson Huang <redacted>
Signed-off-by: Arulpandiyan Vadivel <redacted> # Fix merge conflicts
Signed-off-by: Leonard Crestez <redacted>
Signed-off-by: Marek Vasut <marex@denx.de> # heavy cleanup
Checkpatch warnings:

WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc
#151: FILE: arch/arm/mach-imx/platsmp.c:108:
+	for (i = ncores; i < NR_CPUS; i++)
False. This is initialising the cpu possible map, so can't use
cpu_possible().
quoted
+void imx_gpcv2_set_m_core_pgc(bool enable, u32 offset)
static inline?
Only "static" not "static inline" in a .c file.
quoted
+void __init imx7_src_init(void)
+{
+	struct device_node *np;
+	gpr_v2 = true;
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,imx7d-src");
+	if (!np)
+		return;
+	src_base = of_iomap(np, 0);
+	WARN_ON(!src_base);
Don't we need of_node_put()?
I always worry about this. The resources of the node remains in use
after the initialisation function has completed, so why _shouldn't_
the node also have a reference to it - in the same way that any
bound driver effectively maintains a reference on its DT node for
its lifetime. The only difference is that system devices such as this
have a lifetime of the system.

It's not like you could drop the "fsl,imx7d-src" node at runtime and
the system will do the right thing.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help