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 A73F7C433EF for ; Mon, 4 Oct 2021 16:58:08 +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 7E79961264 for ; Mon, 4 Oct 2021 16:58:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7E79961264 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=pb4wfd322qXW2vqc0nVs8okapyZT20bMVlKtiWeabSw=; b=T3lGD6u/jMO+oxTRqlBQxn/vKV mNuVxjV9IYby+KFPTrKbIfwxmZJsWUCn+ZGKqZUfxtfZ0l1ua/omXlPPpBCn/jPuFMhdUKCjfo4Xk zEHv0hGfMPnqqm4OdkkbzH3A4kl+Q4gYsjMDCRscjuzWq20fdaafEkOvwB+v7H1UQEGP6dcKM4De0 WkBHaw9QKzEmrZS8kcK2xrsuSsgJQivKUEnsbA3JVBntaPPrxrnU5VsMwD1vWy5BVxQvlMUMW1BNl kzboUSDInCMux0u2rCoOi3yyv5vivHoweCS34/YX05Gq54A1ol2+8tIr2WBW1CSRj8cPoFF0eZJNX ABl1w36Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXRFd-007D8N-GX; Mon, 04 Oct 2021 16:55:41 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXRFX-007D6n-Un; Mon, 04 Oct 2021 16:55:37 +0000 Received: by mail-pl1-x62c.google.com with SMTP id t4so358916plo.0; Mon, 04 Oct 2021 09:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=U+IYaXIi0kevdp5VDl9CH/x102yc2TdcKtkx6wZCCI8=; b=fAmWcBughkCFp8PjZC1ANlvrxWbWHcbidKFu5qpnkTfk0RQeOQsIsa0/6aF/WhaP8u bfVWFsrGTObyWnDhiIinn8LE2+IyrAIf8g7tpJsV7BtsdRnGbhsVrrAoyLUpFbw/ICy9 PFpeG7RbYwRVtcAJaS2JLImKex1hmpA0Fp7YFHJBXzVBmHrzF2wnLeZh4c+YhJzoEQnw 6eouDhm1+g7JVn41R33DoWQh9lLw1/MVvVXX5UnaAtUtpMWhiFMyay8c3yWz0Vp+sVse 2kw+TdCW0ln0ncRYC/4S8q170M2CqMkc6ihq56DelJVOWEuoMl8lWvftzF8ZF6Hi6jQX lA7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=U+IYaXIi0kevdp5VDl9CH/x102yc2TdcKtkx6wZCCI8=; b=ejj66IsDPmg4FIQcMs9CfSi5ypY9qjQI3TO32ptDeUNUyCysIYAD/CBeNKmgKiSSy1 MoiBIxiA1ximEpmxkyQj8JQ8S1vexKnt+HYHO+6vPaS0PBA3bDv9OsKAnJv1oj3YQ4Mu dQeV+7yHvC2/XJufCabR3D5xNjVA6egCOHwxoBvRW+pDCPud270aJ21fyFfp7yPU8TGT J9t2BzKkDPyiCHv8TgUbdadXmhz+TmHkKdJ1Q5mUsFYBM3cOVaE5qoYsdiE8znT0Z1Uz Y8GIzc0oS6LukFgZofLbRvm3FYRUhXjUaD7Me3S9/LTzfMuyTu8n0LLssN1//049iKb3 nqkA== X-Gm-Message-State: AOAM533scauDluc9MrPIPtuul31vP4VNjWRjstEg2ZFLk3GIIbZ6kr2H ws357opvLxH9YwBxmGarbzA= X-Google-Smtp-Source: ABdhPJz3jre+tCrbqpCLHc4fMU0v5RCM+YxSKIXkMlyTRYbyN0I6ZL/TOyE/x7UiHXAUi1zU8m+mhQ== X-Received: by 2002:a17:902:c204:b0:13e:6361:839 with SMTP id 4-20020a170902c20400b0013e63610839mr634508pll.57.1633366534945; Mon, 04 Oct 2021 09:55:34 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id g3sm14592770pgj.66.2021.10.04.09.55.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Oct 2021 09:55:34 -0700 (PDT) Subject: Re: [PATCH] spi: bcm2835: do not unregister controller in shutdown handler To: Jason Gunthorpe Cc: Mark Brown , Lino Sanfilippo , 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 References: <20210928195657.5573-1-LinoSanfilippo@gmx.de> <20211001175422.GA53652@sirena.org.uk> <2c4d7115-7a02-f79e-c91b-3c2dd54051b2@gmx.de> <20211004131756.GW3544071@ziepe.ca> <20211004154436.GY3544071@ziepe.ca> <20211004165127.GZ3544071@ziepe.ca> From: Florian Fainelli Message-ID: Date: Mon, 4 Oct 2021 09:55:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211004165127.GZ3544071@ziepe.ca> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211004_095536_049211_85F4CCA5 X-CRM114-Status: GOOD ( 21.48 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/4/21 9:51 AM, Jason Gunthorpe wrote: > On Mon, Oct 04, 2021 at 09:36:37AM -0700, Florian Fainelli wrote: > >> No please don't, I should have arguably justified the reasons why >> better, but the main reason is that one of the platforms on which this >> driver is used has received extensive power management analysis and >> changes, and shutting down every bit of hardware, including something as >> small as a SPI controller, and its clock (and its PLL) helped meet >> stringent power targets. > > Huh? for device shutdown? What would this matter if the next step is > reboot or power off? Power off, the device is put into a low power state (equivalent to ACPI S5) and then a remote control key press, or a GPIO could wake-up the device again. While it is in that mode, it consumes less than 0.5W(AC). Imagine your stick/cast/broom behind your TV falling in that category. > >> TBH, I still wonder why we have .shutdown() and we simply don't use >> .remove() which would reduce the amount of work that people have to do >> validate that the hardware is put in a low power state and would also >> reduce the amount of burden on the various subsystems. > > The difference between remove and shutdown really is that 'emergency' > sense that shutdown is something that must complete in bounded time > and thus only has to concern itself with quieting hardware to a safe > state for the next step in the shutdown/reboot/kexec/kdump sequence. I am fairly sure that no driver write knows about the being bound in time aspect. > > Many remove handlers happily block until, eg all user files are closed > or something to allow a graceful module unload. Fair point. -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel