From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v1] soc/tegra: pmc: Drop locking from tegra_powergate_is_powered() Date: Thu, 25 Oct 2018 16:22:04 +0200 Message-ID: <20181025142204.GC21521@ulmo> References: <20181021183614.454-1-digetx@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RIYY1s2vRbPFwWeW" Return-path: Content-Disposition: inline In-Reply-To: <20181021183614.454-1-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Dmitry Osipenko Cc: Jonathan Hunter , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-tegra@vger.kernel.org --RIYY1s2vRbPFwWeW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 21, 2018 at 09:36:14PM +0300, Dmitry Osipenko wrote: > This fixes splats like the one below if CONFIG_DEBUG_ATOMIC_SLEEP=3Dy > and machine (Tegra30) booted with SMP=3Dn or all secondary CPU's are put > offline. Locking isn't needed because it protects atomic operation. >=20 > # echo 0 | tee /sys/devices/system/cpu/cpu[1-3]/online >=20 > BUG: sleeping function called from invalid context at kernel/locking/mute= x.c:254 > in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0 > CPU: 0 PID: 0 Comm: swapper/0 Tainted: G C 4.18.0-next-201= 80821-00180-gc3ebb6544e44-dirty #823 > Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) > [] (unwind_backtrace) from [] (show_stack+0x20/0x24) > [] (show_stack) from [] (dump_stack+0x94/0xa8) > [] (dump_stack) from [] (___might_sleep+0x13c/0x174) > [] (___might_sleep) from [] (__might_sleep+0x70/0xa8) > [] (__might_sleep) from [] (mutex_lock+0x2c/0x70) > [] (mutex_lock) from [] (tegra_powergate_is_powered+0= x44/0xa8) > [] (tegra_powergate_is_powered) from [] (tegra30_cpu_= rail_off_ready+0x30/0x74) > [] (tegra30_cpu_rail_off_ready) from [] (tegra30_idle= _lp2+0xa0/0x108) > [] (tegra30_idle_lp2) from [] (cpuidle_enter_state+0x= 140/0x540) > [] (cpuidle_enter_state) from [] (cpuidle_enter+0x40/= 0x4c) > [] (cpuidle_enter) from [] (call_cpuidle+0x30/0x48) > [] (call_cpuidle) from [] (do_idle+0x238/0x28c) > [] (do_idle) from [] (cpu_startup_entry+0x28/0x2c) > [] (cpu_startup_entry) from [] (rest_init+0xd8/0xdc) > [] (rest_init) from [] (start_kernel+0x41c/0x430) >=20 > Signed-off-by: Dmitry Osipenko > --- > drivers/soc/tegra/pmc.c | 2 -- > 1 file changed, 2 deletions(-) Applied to for-4.21/soc, thanks. Thierry --RIYY1s2vRbPFwWeW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlvR0YwACgkQ3SOs138+ s6HvdxAAwH2jMQXr+gO5iAE+91oNZuJDEj80IO96BcrdHX5Q79Noe8rtRvoBBzJM tdMQfpsIP6BYxTYL4914Jxs2ComlkUDR2uww571Zk6XSrkJ5PqAkC6ZKp7HHCjwM JVdvgEpyj5ZkLfryTscnZOWHPkS0VUzO5kSgIV4/pisbUvRKLaJaOWXQwXNfTBqn PyM5x4PyWyHl1BkSXCbGt1uRtMzgP6lKgZWKHs3lIJ2Cz96ATEO6SnC2ednS4B9T hi0amZnYZzbhO3FWjXriyID6JWKFRHx7CjKXszWeII4jcOrQVnHPb505V4agzCe8 2/+EZmaqq4HPIWEfnYaaNKJDUHLbG/2wFCRO92SZYb4QlidUY3VMZ8nOr0IpY6E2 +COrYt/vIlhsYEpjs2HfNDZ1Kf2aAG4vFmhNuxmZ9kxNFVTDEMytkdhgYe+IdwR8 7l7pY6HaxKK9Gwgc1qjuFrTlhnr97XS/omPQpKhFu2KSnoZFwrk2cAJS6e7dhPvV cJLeOX4KINMHAB4YwD7MUgF8+K6qDnUW6UeEZZ+Kh/DMX0tiP14Ei59goQKiCRUl N/GvxalY9llCNK+MyoC2xcc5T391dJF17JJ7+qfryZrqMp+kUfwnhYOofeOeJ5kA QJ7leXiP+paX5NtbGH2g+tdrik+KgmuoE1Edc+Dp9gFbqzaNwcQ= =q2/Z -----END PGP SIGNATURE----- --RIYY1s2vRbPFwWeW--