From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mylene JOSSERAND Subject: Re: [PATCH 0/4] Sunxi: Add SMP support on A83T Date: Tue, 12 Dec 2017 09:19:45 +0100 Message-ID: <20171212091945.5f08a337@dell-desktop.home> References: <20171211075001.6100-1-mylene.josserand@free-electrons.com> <20171211193534.GA3967@Red> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <20171211193534.GA3967@Red> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Corentin Labbe Cc: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, wens-jdAy2FN1RRM@public.gmane.org, linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org Hello Corentin, Le Mon, 11 Dec 2017 20:35:34 +0100, Corentin Labbe a écrit : > On Mon, Dec 11, 2017 at 08:49:57AM +0100, Mylène Josserand wrote: > > Hello everyone, > > > > This series adds SMP support for Allwinner Sun8i-a83t > > with MCPM (Multi-Cluster Power Management). > > Series information: > > - Based on last linux-next (next-20171211) > > - Had dependencies on Chen Yu's patch that add MCPM > > support: > > https://patchwork.kernel.org/patch/6402801/ > > > > Patch 01: Convert the mcpm driver (initially for A80) to be able > > to use it for A83T. This SoC has a bit flip that needs to be > > handled. Patch 02: Add registers nodes (prcm, cpucfg and r_cpucfg) > > needed for MCPM. > > Patch 03: Add CCI-400 node for a83t. > > Patch 04: Fix the use of virtual timers that hangs the kernel in > > case of SMP support. > > > > If you have any remarks/questions, let me know. > > Thank you in advance, > > Mylène > > > > Hello > > As we discussed in private, Chen Yu's patch should be added in your > series. Yep, I will do that. > > Furthermore, MCPM is not automaticaly selected via imply. It is selected if you run again a sunxi_defconfig. I guess I can change to "select". > > With all patchs I hit a bug: > [ 0.898668] BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:238 [ 0.911162] in_atomic(): 1, > irqs_disabled(): 0, pid: 1, name: swapper/0 [ 0.917776] CPU: 0 > PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2-next-20171211+ #73 > [ 0.925418] Hardware name: Allwinner sun8i Family [ 0.930118] > Backtrace: [ 0.932596] [] (dump_backtrace) from > [] (show_stack+0x18/0x1c) [ 0.940158] r7:c0b261e4 > r6:60000013 r5:00000000 r4:c0b51958 [ 0.945820] [] > (show_stack) from [] (dump_stack+0x8c/0xa0) [ 0.953045] > [] (dump_stack) from [] > (___might_sleep+0x150/0x170) [ 0.960779] r7:c0b261e4 r6:00000000 > r5:000000ee r4:ee844000 [ 0.966437] [] (___might_sleep) > from [] (__might_sleep+0x68/0xa0) [ 0.974253] > r4:c0861690 [ 0.976796] [] (__might_sleep) from > [] (mutex_lock+0x24/0x68) [ 0.984269] r6:c0892f6c > r5:ffffffff r4:c0b1bb24 [ 0.988891] [] (mutex_lock) from > [] (perf_pmu_register+0x24/0x3e4) [ 0.996795] > r5:ffffffff r4:ee98b014 [ 1.000375] [] > (perf_pmu_register) from [] (cci_pmu_probe+0x340/0x484) > [ 1.008631] r10:c0892f6c r9:c0bfd5f0 r8:eea19010 r7:c0b261e4 > r6:c0b26240 r5:eea19000 [ 1.016447] r4:ee98b010 [ 1.018989] > [] (cci_pmu_probe) from [] > (platform_drv_probe+0x58/0xb8) [ 1.027158] r10:00000000 > r9:c0b2610c r8:00000000 r7:fffffdfb r6:c0b2610c r5:ffffffed > [ 1.034974] r4:eea19010 [ 1.037511] [] > (platform_drv_probe) from [] > (driver_probe_device+0x254/0x330) [ 1.046371] r7:00000000 > r6:c0bff498 r5:c0bff494 r4:eea19010 [ 1.052026] [] > (driver_probe_device) from [] > (__device_attach_driver+0xa0/0xd4) [ 1.061062] r10:00000000 > r9:c0bff470 r8:00000000 r7:00000001 r6:eea19010 r5:ee845ac0 > [ 1.068879] r4:c0b2610c r3:00000000 [ 1.072454] [] > (__device_attach_driver) from [] > (bus_for_each_drv+0x68/0x9c) [ 1.081228] r7:00000001 r6:c045cb24 > r5:ee845ac0 r4:00000000 [ 1.086883] [] > (bus_for_each_drv) from [] (__device_attach+0xb8/0x11c) > [ 1.095135] r6:c0b3e848 r5:eea19044 r4:eea19010 [ 1.099750] > [] (__device_attach) from [] > (device_initial_probe+0x14/0x18) [ 1.108263] r7:c0b0a4c8 > r6:c0b3e848 r5:eea19010 r4:eea19018 [ 1.113919] [] > (device_initial_probe) from [] (bus_probe_device+0x8c/0x94) > [ 1.122523] [] (bus_probe_device) from [] > (device_add+0x40c/0x5a0) [ 1.130429] r7:c0b0a4c8 r6:eea19010 > r5:eea18a10 r4:eea19018 [ 1.136089] [] (device_add) from > [] (of_device_add+0x3c/0x44) [ 1.143564] r10:00000000 > r9:00000000 r8:00000000 r7:eedf21a4 r6:eea18a10 r5:00000000 > [ 1.151380] r4:eea19000 [ 1.153915] [] > (of_device_add) from [] > (of_platform_device_create_pdata+0x7c/0xac) [ 1.163210] > [] (of_platform_device_create_pdata) from [] > (of_platform_bus_create+0xf4/0x1f0) [ 1.173372] r9:00000000 > r8:00000000 r7:00000001 r6:00000000 r5:eedf2154 r4:00000000 > [ 1.181107] [] (of_platform_bus_create) from > [] (of_platform_populate+0x74/0xd4) [ 1.190229] > r10:00000001 r9:eea18a10 r8:00000000 r7:00000000 r6:00000000 > r5:eedf1d04 [ 1.198045] r4:eedf2154 [ 1.200580] [] > (of_platform_populate) from [] > (cci_platform_probe+0x3c/0x54) [ 1.209356] r10:00000000 > r9:c0b26168 r8:00000000 r7:fffffdfb r6:c0b26168 r5:ffffffed > [ 1.217172] r4:eea18a00 [ 1.219708] [] > (cci_platform_probe) from [] (platform_drv_probe+0x58/0xb8) > [ 1.228306] r5:ffffffed r4:eea18a10 [ 1.231881] [] > (platform_drv_probe) from [] > (driver_probe_device+0x254/0x330) [ 1.240742] r7:00000000 > r6:c0bff498 r5:c0bff494 r4:eea18a10 [ 1.246397] [] > (driver_probe_device) from [] > (__device_attach_driver+0xa0/0xd4) [ 1.255433] r10:00000000 > r9:c0bff470 r8:00000000 r7:00000001 r6:eea18a10 r5:ee845ce8 > [ 1.263250] r4:c0b26168 r3:00000000 [ 1.266825] [] > (__device_attach_driver) from [] > (bus_for_each_drv+0x68/0x9c) [ 1.275598] r7:00000001 r6:c045cb24 > r5:ee845ce8 r4:00000000 [ 1.281253] [] > (bus_for_each_drv) from [] (__device_attach+0xb8/0x11c) > [ 1.289506] r6:c0b3e848 r5:eea18a44 r4:eea18a10 [ 1.294120] > [] (__device_attach) from [] > (device_initial_probe+0x14/0x18) [ 1.302633] r7:c0b0a4c8 > r6:c0b3e848 r5:eea18a10 r4:eea18a18 [ 1.308288] [] > (device_initial_probe) from [] (bus_probe_device+0x8c/0x94) > [ 1.316890] [] (bus_probe_device) from [] > (device_add+0x40c/0x5a0) [ 1.324796] r7:c0b0a4c8 r6:eea18a10 > r5:ee993810 r4:eea18a18 [ 1.330450] [] (device_add) from > [] (of_device_add+0x3c/0x44) [ 1.337926] r10:00000000 > r9:c07759d8 r8:00000000 r7:eedf1d54 r6:ee993810 r5:00000000 > [ 1.345743] r4:eea18a00 [ 1.348277] [] > (of_device_add) from [] > (of_platform_device_create_pdata+0x7c/0xac) [ 1.357572] > [] (of_platform_device_create_pdata) from [] > (of_platform_bus_create+0xf4/0x1f0) [ 1.367734] r9:c07759d8 > r8:00000000 r7:00000001 r6:00000000 r5:eedf1d04 r4:00000000 > [ 1.375469] [] (of_platform_bus_create) from > [] (of_platform_bus_create+0x150/0x1f0) [ 1.384938] > r10:ee993810 r9:c07759d8 r8:00000000 r7:00000001 r6:00000000 > r5:eedefe1c [ 1.392754] r4:eedf1d04 [ 1.395289] [] > (of_platform_bus_create) from [] > (of_platform_populate+0x74/0xd4) [ 1.404411] r10:00000001 > r9:00000000 r8:00000000 r7:c07759d8 r6:00000000 r5:eedee844 > [ 1.412228] r4:eedefe1c [ 1.414769] [] > (of_platform_populate) from [] > (of_platform_default_populate_init+0x80/0x94) [ 1.424844] > r10:c0a37848 r9:00000000 r8:c0b59680 r7:c0a37834 r6:ffffe000 > r5:c0775ce8 [ 1.432661] r4:00000000 [ 1.435200] [] > (of_platform_default_populate_init) from [] > (do_one_initcall+0x5c/0x194) [ 1.444925] r5:c0a25e68 r4:c0b0a4c8 > [ 1.448506] [] (do_one_initcall) from [] > (kernel_init_freeable+0x1d4/0x268) [ 1.457195] r9:00000004 > r8:c0b59680 r7:c0a37834 r6:c0b59680 r5:c0a47308 r4:c090cfb8 > [ 1.464932] [] (kernel_init_freeable) from [] > (kernel_init+0x10/0x118) [ 1.473187] r10:00000000 r9:00000000 > r8:00000000 r7:00000000 r6:00000000 r5:c06cf3a0 [ 1.481004] > r4:00000000 [ 1.483540] [] (kernel_init) from > [] (ret_from_fork+0x14/0x2c) [ 1.491098] Exception > stack(0xee845fb0 to 0xee845ff8) [ 1.496146] > 5fa0: 00000000 00000000 00000000 > 00000000 [ 1.504313] 5fc0: 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 [ 1.512480] 5fe0: 00000000 > 00000000 00000000 00000000 00000013 00000000 [ 1.519084] > r5:c06cf3a0 r4:00000000 [ 1.522737] ARM CCI_400_r1 PMU driver > probed > > And only CPU 0 show up. I am really sorry about that. I tested the patches but not with my last modifications, I guess... I will fix it in a V2. Thank you for reporting the bug. Best regards, -- Mylène Josserand, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html