From owner-freebsd-arm@freebsd.org Sat Apr 7 19:34:23 2018 Return-Path: <owner-freebsd-arm@freebsd.org> Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B6F5FA16D2 for <freebsd-arm@mailman.ysv.freebsd.org>; Sat, 7 Apr 2018 19:34:23 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A76F382CB1 for <freebsd-arm@freebsd.org>; Sat, 7 Apr 2018 19:34:22 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Sat, 07 Apr 2018 21:34:14 +0200 id 00DD603A.5AC91D36.00002CD8 Date: Sat, 7 Apr 2018 21:34:13 +0200 From: Milan Obuch <freebsd-arm@dino.sk> To: freebsd-arm@freebsd.org Subject: Problem with regulator_shutdown() introduced in r331989 Message-ID: <20180407213413.0103754b@zeta.dino.sk> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; i386-portbld-freebsd10.4) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." <freebsd-arm.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/> List-Post: <mailto:freebsd-arm@freebsd.org> List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 07 Apr 2018 19:34:23 -0000 Hi, after some time with running slightly older sources based kernel I decided to upgrade, but current sources based kernel does not boot on Orange Pi Zero, maybe on other Allwinner based boards too, I did not test them. Problem manifests itself on console with following: Release APs CPU(3) applied BP hardening: not necessary CPU(1) applied BP hardening: not necessary CPU(2) applied BP hardening: not necessary WARNING: WITNESS option enabled, expect reduced performance. regulator: shuting down vcc3v0 Trying to mount root from ufs:/dev/mmcsd0s2a [rw]... GEOM: new disk mmcsd0 regulator: shuting down vcc5v0 regulator: shuting down vcc-wifi mmc0: panic: Invalid enable count cpuid = 0 time = 1 KDB: stack backtrace: db_trace_self() at db_trace_self pc = 0xc03be8dc lr = 0xc00bba1c (db_trace_self_wrapper+0x30) sp = 0xc0713c90 fp = 0xc0713da8 db_trace_self_wrapper() at db_trace_self_wrapper+0x30 pc = 0xc00bba1c lr = 0xc01ea0d8 (vpanic+0x154) sp = 0xc0713db0 fp = 0xc0713dd0 r4 = 0x00000100 r5 = 0x00000001 r6 = 0xc0431ec1 r7 = 0xc0553cc8 vpanic() at vpanic+0x154 pc = 0xc01ea0d8 lr = 0xc01e9ed0 (doadump) sp = 0xc0713dd8 fp = 0xc0713dec r4 = 0xc0431ec1 r5 = 0xc0713df4 r6 = 0x00000000 r7 = 0x00000000 r8 = 0xc2df0400 r9 = 0xc053b988 r10 = 0xc1b71e80 doadump() at doadump pc = 0xc01e9ed0 lr = 0xc00cd9e8 (regnode_fixed_enable+0x150) sp = 0xc0713df4 fp = 0xc0713e20 r4 = 0x00000000 r5 = 0xc1b71e80 regnode_fixed_enable() at regnode_fixed_enable+0x150 pc = 0xc00cd9e8 lr = 0xc00cbb60 (regnode_stop+0x1d4) sp = 0xc0713e28 fp = 0xc0713e48 r4 = 0x00000000 r5 = 0xc2ded780 r6 = 0xc2ded7b4 r7 = 0xc0504a00 r8 = 0xc05cacc8 r9 = 0xc053b988 r10 = 0xc05cabd0 regnode_stop() at regnode_stop+0x1d4 pc = 0xc00cbb60 lr = 0xc00cd2f0 (regulator_shutdown+0x9c) sp = 0xc0713e50 fp = 0xc0713e68 r4 = 0xc0548a54 r5 = 0xc2ded780 r6 = 0xc0431da6 r7 = 0xc0551c8c regulator_shutdown() at regulator_shutdown+0x9c pc = 0xc00cd2f0 lr = 0xc0189500 (mi_startup+0x18c) sp = 0xc0713e70 fp = 0xc0713e90 r4 = 0xc05caccc r5 = 0x00000001 r6 = 0xc053ac6c r7 = 0x00000000 mi_startup() at mi_startup+0x18c pc = 0xc0189500 lr = 0xc0000244 (_start+0x144) sp = 0xc0713e98 fp = 0x00000000 r4 = 0xc0000378 r5 = 0xc05e4000 r6 = 0x42050680 r7 = 0x00c52078 r8 = 0xc06dc000 r9 = 0x00000002 r10 = 0x01c28000 _start() at _start+0x144 pc = 0xc0000244 lr = 0xc0000244 (_start+0x144) sp = 0xc0713e98 fp = 0x00000000 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at $d.3: ldrb r15, [r15, r15, ror r15]! db> I can override it with either manually entering set hw.regulator.disable_unused=0 on loader prompt, or putting line hw.regulator.disable_unused=0 into /boot/loader.conf file. Either way, system boots then normally and works as expected. Has anybody any explanation what's going on? What purpose does this function actually serve? Reading source, disabling unused regulatos looks like a way to conserve power, but I am not sure if I think about it the right way. Anyway, something is wrong - why has mmc0 invalid enable count? Looks strange to me... Regards, Milan