From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A595C433F5 for ; Mon, 4 Oct 2021 14:13:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D37761251 for ; Mon, 4 Oct 2021 14:13:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0D37761251 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=c7E7aeERze5P5U+s2ldq0ljJY+rt2sIrFDkszGtDdiA=; b=0u1Z2cHeOWN4snaD3H5WNJ23E7 c8AYP14WIPz7890X+R/3ubYerNp72iY61mr3qwVdZ12RygF82PbC1yBca3W888y5X1s7EqUdUdIuG 6qYalonEkUqlUCd91X7wjSU10DmNshgo8rRGqiyMTXxeg/+MF1ZvTylPKSHc4i5e7ZoqHIyA+bHLE z2Zv2ENHKlp1rr3KH8YCDzd+z03AUQYXnTiUxrQfnlaFUraBHJSgzZbErx9X0AOKoaIjU8Oa3FeE1 uOlriTGuDWxbB7T+LO5kO2bRsUjARGxBnmqxTlSPZ7yFqpUDh6Bkxaz2eRbsSBmb1L0P/WlC9AxLP BzOc6F7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXOhf-006jb9-Fj; Mon, 04 Oct 2021 14:12:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXOhb-006jaE-1Z; Mon, 04 Oct 2021 14:12:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 42D0F61354; Mon, 4 Oct 2021 14:12:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633356742; bh=8C70wqLG2kw6y622LgfXYt7HTq8THcyBWE+2lsIEJnQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i16hIkQvFR9+0QnWNgtrxQXynBVcw7MTqsN/lomrM4Xv0IHDDXIbfbY+vXWmQLORl Rpi5wOu4YkBGEf0r7GlQ9viZo9+FTuFx3X6dM5GruG/oUsN/4Nq/5vC9oth/eSi9lV 18Leo1JskxjEWyLZUJc96etV/3U2ZNB9A5X+zC1N3oaEAeACStCqyvpXe9Dxgy1Kk7 npT06ZcHDdYyw2aWa6YUEw1YOsjz+OwEV5DmOvJ6M6WHS1Xtopz9mOO1Cps6w45Gg8 uYTCUO9e8tIFn2qm7UePSC9ZIeaj47fAxFvhfsLT4tLMVCSqx6N7fZv3jgk4gjFTY6 N8OsW2BRG9lTA== Date: Mon, 4 Oct 2021 15:12:20 +0100 From: Mark Brown To: Jason Gunthorpe Cc: Lino Sanfilippo , f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsaenz@kernel.org, linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, p.rosenberger@kunbus.com, linux-integrity@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] spi: bcm2835: do not unregister controller in shutdown handler Message-ID: References: <20210928195657.5573-1-LinoSanfilippo@gmx.de> <20211001175422.GA53652@sirena.org.uk> <2c4d7115-7a02-f79e-c91b-3c2dd54051b2@gmx.de> <20211004131756.GW3544071@ziepe.ca> MIME-Version: 1.0 In-Reply-To: <20211004131756.GW3544071@ziepe.ca> X-Cookie: If it heals good, say it. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211004_071223_128259_F1870CEE X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5341165738491319967==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5341165738491319967== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d4pFysLjW10458eo" Content-Disposition: inline --d4pFysLjW10458eo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 04, 2021 at 10:17:56AM -0300, Jason Gunthorpe wrote: > Shutdown is supposed to quiet the HW so it is not doing DMAs any > more. This is basically an 'emergency' kind of path, the HW should be > violently stopped if available - ie clearing the bus master bits on > PCI, for instance. > When something like kexec happens we need the machine to be in a state > where random DMA's are not corrupting memory. That's all well and good but there's no point in implementing something half baked that's opening up a whole bunch of opportunities to crash the system if more work comes in after it's half broken the device setup. =20 > Due to the emergency sort of nature it is not appropriate to do > locking complicated sorts of things like struct device unregistrations > here. That's just not what's actually implemented in a bunch of places, nor something one would infer from the documentation ("Called at shut-down to quiesce the device", no mention of emergency cases which I'd guess would just be kdump) - there's a bunch of locks in shutdown paths, and drivers on sleeping buses with shutdown callbacks. Never mind the few of them that use a shutdown callback to power the system down, though that's a different thing and definitely abusing the API. I would guess that a good proportion of people implementing it are more worried about clean system shutdown than they are about kdump. --d4pFysLjW10458eo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmFbC8MACgkQJNaLcl1U h9A9ZQf9H8HngYbz4lcBHU1c64oQ/goR+5zcEkFnEgDZ36zSAaLm0y97biTrlmqv qB9KRporje388T9XAfOsyt02dXnMdt0sqrg5C/dUfO554axWtv27CgzPR2MReklb KUYGA65DtHm57pyAJYpQ2LyaWHGHmGaJfa8cfxsA7cZd92LfL+89teR7DlU8nrnw mgnuECKes199R6AZfrj2Iva3m7bbtYrh52uMIyWTWIi26rv3LJvu2RNINOrdf4c8 QTYHiztY7h+oxW9iz/704UcnU30lWzoEy6WkazOUC8WAYmNfQyOlMF8dL6AVBqqV uGYmfraX2n5BpPf2ZE+wkpRGjlpBVQ== =PKtu -----END PGP SIGNATURE----- --d4pFysLjW10458eo-- --===============5341165738491319967== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5341165738491319967==--