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 F35E1C4332F for ; Mon, 4 Oct 2021 16:59:39 +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 C20FC61357 for ; Mon, 4 Oct 2021 16:59:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C20FC61357 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=AFqMzuEa3VmWEHHMWYi9NeHQMnSswn4ZMic0/3mgbco=; b=M1ju7Cm/fcitmq0fH6JF/ONTvB 1qgTb0Jra0aroEO9qN4GmDRDitQHgh3iXcFuP8/lGwkNiqtXI3ErhEXmm9W1PdTQcyOV02pgVUvwR EY2tPaOajZHM/YKkqcxUj2ABKnzGijeggDAzot35jJdo95SRgeJIbVzNrYgk9t1FhR9QMggsT6mRp DMnXUiUfnsnmlbnqwB1DZ6zHs0Zj2wsxWe29D6qf+B4qQoQTgMBSKG5m1qfJJhD++OnTygXMsTEvm TLblz2MHUkaQyHm9MChRWCF6lxzEs+RF+0gupIJh77GQFvdd0JyrC8XmUEKGlA1b+BGHHJ9NZkeoN XHXYet7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXRHU-007Dn9-0K; Mon, 04 Oct 2021 16:57:36 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXRHP-007DlY-H1; Mon, 04 Oct 2021 16:57:32 +0000 Received: by mail-pf1-x432.google.com with SMTP id p1so8987765pfh.8; Mon, 04 Oct 2021 09:57:31 -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=HEf/I/hk3U5Zpvreh8jDOQt8rMtCGugDMTgqZTR6bsc=; b=KBTZl0ZBXlVWC9XlsrU/j2wITUAo0PIQZ4fM0JOwdglV7xjyheU43HwGaZyyFyAzSw qICRLCHkiXTZ6IU+EzC0XKuFb8BX0iB84jKtmMO9buOdUrU7Oz4FZCp9Twqh8Kc0VHxB Cvzhwhg4oDgo+bxJfipsf1PhypV4J1pOi7B/TbcAJ8encQBK71JtygnSLXIh1Iu8snwa YO+lR13hVX2EhTx7+qEBzr0OG9Fq/zS8wRv12sbKserX//H8cDi9HDZk/GW0SRK5/4u1 C31Zlp8RhOGgbvdB2a5yjGzFKe4XLdShtWP7HLiEGbJ/jCJiDXkVwvzyXfiSL+vyMPQu LCAA== 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=HEf/I/hk3U5Zpvreh8jDOQt8rMtCGugDMTgqZTR6bsc=; b=ix6YWNIphqyrrFtn2CFJ+DsGiherLB0jQ2u8ymOZgrQbk5eDW+uDOz72Nmzhf/qAoR Kzhoqn6hN4+1k90xTENsd9L2+l1Thi0o2X4u7Y7TEdBXbqctfv0tlvUEr4yTnCLJuHYf goctVzwrEsihLOaRlPNguNecN7sF1DyFfKGnSNRtYFh58f4QTqUS12He6lVbmfBTxfxD 7OTcI7ORP+EaDx8TM05k+u1h6e+SQ2B7HFIS41VCjuZX8yEbCecwooqJXf4gPWwVTCbi G58v473XfTHNzzTmXTXugDooKWyXv9xTLUopWQ+vIfedZlYeGkj7eDJbwpCOplQRPsOh 3XJQ== X-Gm-Message-State: AOAM532dVJcHAIgyq2SMLAjS+CqZW1qcjGy0W4zHgg8+ZbiswbcfXn2o B/9i/ww67y45OlHH8b5AohM= X-Google-Smtp-Source: ABdhPJxXwVUsaeGBCQzqf8eS8c0cXt3lJpG5zqMzeMai5/73q4QPOURHKtVKoIpLjmlYleiZB/rdAQ== X-Received: by 2002:a63:a03:: with SMTP id 3mr11839165pgk.326.1633366650702; Mon, 04 Oct 2021 09:57:30 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id w185sm12075224pfd.113.2021.10.04.09.57.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Oct 2021 09:57:30 -0700 (PDT) Subject: Re: [PATCH] spi: bcm2835: do not unregister controller in shutdown handler To: Mark Brown Cc: Jason Gunthorpe , 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> From: Florian Fainelli Message-ID: <72d8920c-ccf2-50bf-36fd-1585f3932fd6@gmail.com> Date: Mon, 4 Oct 2021 09:57:15 -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: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211004_095731_630872_AEDCEFD3 X-CRM114-Status: GOOD ( 25.61 ) 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:52 AM, Mark Brown wrote: > On Mon, Oct 04, 2021 at 09:36:37AM -0700, Florian Fainelli wrote: >> On 10/4/21 9:31 AM, Mark Brown wrote: > >>> an issue, someone could press a button or whatever. Frankly for SPI the >>> quiescing part doesn't seem like logic that should be implemented in >>> drivers, it's a subsystem level thing since there's nothing driver >>> specific about it. > >> Surely the SPI subsystem can help avoid queuing new transfers towards >> the SPI controller while the controller can shut down the resources that >> only it knows about. > > Yes, that's what I was saying. > >>> In the case of this specific driver I'm still not clear that the best >>> thing isn't just to delete the shutdown callback and let any ongoing >>> transfers complete, though I guess there'd be issues in kexec cases with >>> long enough tansfers. > >> 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. > > OK, so it's similar to a lot of the other embedded cases where it's for > a power down that doesn't cut as much power as would be desirable - > that's reasonable. Like you say you didn't mention it at all in the > changelog. Ideally the hardware would just cut all power to the SoC in > shutdown but then IIRC those boards don't have a PMIC so... Yes, that's is what we do on other types of SoCs, this particular one however only has a single power domain and so software must come to the rescue to shut down as much as it can. Newer boards do have a PMIC that can help us with that, but not with everything, still. > >> 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. > > Yeah, it does seem a bit odd - I'd figured it was for speed reasons. > -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel