From owner-freebsd-arm@freebsd.org Fri Apr 20 21:45:30 2018 Return-Path: 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 70B7DFA512C for ; Fri, 20 Apr 2018 21:45:30 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EC69784E77 for ; Fri, 20 Apr 2018 21:45:29 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 51d732ff; Fri, 20 Apr 2018 23:38:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=tA5REbjTRtDV7Dx8q9njNMM5Sro=; b=OLacEB0jM/4lNjd2uBSbjcLq9cIa Z8lF9HfwREzBN2IWltY3qZ7tldd5f//rSFRAj9uVuiqXMZbMzw4IoKvUI1gAY6Eg w4jOO10ETS+BTcbId5KGJll82jF6rBl0fbg6MP92X5/X8JqHaVwqlLMCYEegNcvb dSlMA9PXPI7/WaE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=O83TzA0HtokaxcmWqHbfncpuIwFmlkQ/HLBQTxnzYxsefwdYlyLo2xpQ ev4d18zDiNTyIK7cX89b1UBZGj5p8oZD2kgC1K2PxsnSLrwTzO93+BJ/QTN9cYyv 1BT77uFR/vOwD7g2W7oI+4fH/xdnLakJ56yb3lFdMg3LAivh/u0= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 2c8a85a9 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Fri, 20 Apr 2018 23:38:47 +0200 (CEST) Date: Fri, 20 Apr 2018 23:38:47 +0200 From: Emmanuel Vadot To: Milan Obuch Cc: freebsd-arm@freebsd.org Subject: Re: Problem with regulator_shutdown() introduced in r331989 Message-Id: <20180420233847.15b91854dc85bb8113e40d5a@bidouilliste.com> In-Reply-To: <20180407213413.0103754b@zeta.dino.sk> References: <20180407213413.0103754b@zeta.dino.sk> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2018 21:45:30 -0000 On Sat, 7 Apr 2018 21:34:13 +0200 Milan Obuch wrote: > 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 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" Hi, r332843 should fix this problem. Cheers, -- Emmanuel Vadot