From nobody Mon Aug 23 13:07:34 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C0F291797B1B for ; Mon, 23 Aug 2021 13:07:43 +0000 (UTC) (envelope-from mats@exmandato.se) Received: from mailout.mellstrand.net (mailout.mellstrand.net [IPv6:2001:2040:4:1::52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailout.mellstrand.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GtXbL40qtz3kgJ for ; Mon, 23 Aug 2021 13:07:42 +0000 (UTC) (envelope-from mats@exmandato.se) Received: by mailout.mellstrand.net Mon, 23 Aug 2021 15:07:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=exmandato.se; s=mailout; t=1629724054; bh=TmbfQO9VYNuR6xtt7RshzqhVFySFj2YiXkpgPWBHdwk=; h=From:Subject:Date:To; b=OTnc37XRic14vnEiFegn7gdsIakdPjWwRqJp91sJGd3WUSK0kgz4E7rH4e9JnLuYq NXsSuQnNySuVUch5QP0XgGE30j0zvyqN/AMXxR23WUZq19aaJWgkpkw9ieujUR/8qk +QvsZSI21K678wFm+9xF++mbGkqrjF6aGr5uOcdfsusOuoRVt8LjzuokTSfcqOQVaD kwPFTPAaWM7co6M3Q9Lma9pwnHuZenBC7YCWEd7WE0yuKTdA3cq9MBh/UOdCUnmllg bgiTPf62QtMTDi327bXF4aKdp7/SaCYhw7p6xqBMGJjlGoi2su5LHAE2LMlNwCuufv JuNkSDch7uX/g== Content-Type: multipart/signed; boundary="Apple-Mail=_4C5BEB7F-7CD4-48EE-A6AD-A0D8E62B00A3"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 Subject: Raspberry Pi 4 panics when using /dev/led/led1 Message-Id: Date: Mon, 23 Aug 2021 15:07:34 +0200 To: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 4GtXbL40qtz3kgJ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=exmandato.se header.s=mailout header.b=OTnc37XR; dmarc=pass (policy=reject) header.from=exmandato.se; spf=pass (mx1.freebsd.org: domain of mats@exmandato.se designates 2001:2040:4:1::52 as permitted sender) smtp.mailfrom=mats@exmandato.se X-Spamd-Result: default: False [-5.60 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[exmandato.se:s=mailout]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; HAS_ATTACHMENT(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; R_SPF_ALLOW(-0.20)[+mx]; DKIM_TRACE(0.00)[exmandato.se:+]; DMARC_POLICY_ALLOW(-0.50)[exmandato.se,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3301, ipnet:2001:2040::/32, country:SE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Reply-To: mats@exmandato.se From: Mats Mellstrand via freebsd-arm X-Original-From: Mats Mellstrand X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_4C5BEB7F-7CD4-48EE-A6AD-A0D8E62B00A3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Raspberry Pi 4 8 Gbyte Booting from USB stick Latest snapshot FreeBSD XX 14.0-CURRENT FreeBSD 14.0-CURRENT #0 = main-n248803-eba8e643b19: Thu Aug 19 10:08:23 UTC 2021 = root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC = arm64 Booting works fine. # morse -l =E2=80=9CSOS=E2=80=9D > /dev/led/led0 works as expected. But when I try: # morse -l "SOS" > /dev/led/led1 # lock order reversal: (sleepable after non-sleepable) 1st 0xffff000000c31c58 LED mtx (LED mtx, sleep mutex) @ = /usr/src/sys/kern/kern_mutex.c:211 2nd 0xffffa00000ffec10 Raspberry Pi firmware gpio (Raspberry Pi = firmware gpio, sx) @ = /usr/src/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c:252 lock order LED mtx -> Raspberry Pi firmware gpio attempted at: #0 0xffff0000004e1b58 at witness_checkorder+0xc0c #1 0xffff00000047e348 at _sx_xlock+0x7c #2 0xffff0000007edc60 at rpi_fw_gpio_pin_set+0xe8 #3 0xffff0000001e998c at led_timeout+0xe8 #4 0xffff000000491368 at softclock_call_cc+0x13c #5 0xffff000000491674 at softclock+0x44 #6 0xffff000000430e64 at ithread_loop+0x2a8 #7 0xffff00000042d724 at fork_exit+0x74 #8 0xffff0000007774cc at fork_trampoline+0x14 panic: malloc(M_WAITOK) with sleeping prohibited cpuid =3D 0 time =3D 1629719529 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x184 panic() at panic+0x44 malloc_dbg() at malloc_dbg+0xf8 malloc() at malloc+0x2c bcm2835_firmware_property() at bcm2835_firmware_property+0x44 rpi_fw_gpio_pin_set() at rpi_fw_gpio_pin_set+0x100 led_timeout() at led_timeout+0xe8 softclock_call_cc() at softclock_call_cc+0x13c softclock() at softclock+0x44 ithread_loop() at ithread_loop+0x2a8 fork_exit() at fork_exit+0x74 fork_trampoline() at fork_trampoline+0x14 KDB: enter: panic [ thread pid 12 tid 100028 ] Stopped at kdb_enter+0x44: undefined f905011f db> --Apple-Mail=_4C5BEB7F-7CD4-48EE-A6AD-A0D8E62B00A3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEDr+9RcE612tpmSJHQ/tbBFhN7RsFAmEjnZYACgkQQ/tbBFhN 7RucaQ//aa+V4yOgYxEyR9Y1JoNpn7Mq1rm0ppbBBGJ1NKIuaeIcqfvksEKnHLEv fWnMzq8qxXGH2buHh/np6QY3V8cMZaq1d2BLBtbOtFP5QK7eTheHVUhRmhpt9Vji JZNNfnvs0QqLkOMbV05i6nJzBRJxOpuF8WRYo+bq7TqWmxEdLu8/yk6ImHDchhGp thFxUAiw4RxP4sF28OJEMssIv/e2tvJ2Az0sZQmuNfEDxZ45tRA50b2Yotl/aHSC 1t51wet1eHZ5aWal2m6SZV0iaD0cio/BVkBjJYh0lRooyVLmge40z1Ej7GzR3Unc nF99oxole1uKj7kNmTkKVQf6PRPrjxfL9XlnFrep/VCA0HMqma5ikhEwYuEhSPbK 5pXGf5V1own4VeOGzN4gcqcX930quL0fQ/vqWEDDHH39jZCOhVyPOq5OhQFs4UPc MP2qLl6VncqtYrk1wVmTNMutAxeH3W8pMfaAhLdbQs9/MWR/fcrFjhAyL2Ek39sl RBaoKcX1XWLjrSMh751fhCB//aFD5EYGaowxt6SSRZNdabR8sjNW1+/IIGHIU5m4 HQkO0HoLhiZ/fwIg5DTouu+NDgINF3leiwS6H7DUrXnrgeDiV8tzodKSfT+KbTbi rN2RjOxD8A+8OMcygi9I3Pe1eGh+NV5fQX2VECUMUm+BEi67Uxw= =y708 -----END PGP SIGNATURE----- --Apple-Mail=_4C5BEB7F-7CD4-48EE-A6AD-A0D8E62B00A3--