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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02EBFC433EF for ; Sun, 28 Nov 2021 21:12:45 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4J2LmD46Xqz3fBd for ; Mon, 29 Nov 2021 08:12:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Tdth5Mz9; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::230; helo=mail-lj1-x230.google.com; envelope-from=digetx@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Tdth5Mz9; dkim-atps=neutral Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4J2LbD0chFz2xCy for ; Mon, 29 Nov 2021 08:04:55 +1100 (AEDT) Received: by mail-lj1-x230.google.com with SMTP id k23so30650999lje.1 for ; Sun, 28 Nov 2021 13:04:55 -0800 (PST) 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=n+c+fNjlqpkODMNA/7ywsu2Xpxn181Yex3QT1BC7YkM=; b=Tdth5Mz95ILIP2wZ5DYmwGwqL/g2a8NQfIdIuxgXXVVg6RH3yDMvHbIjMPlUPQ+Kfi e7TNCwLl7gW+gWhWCzY5kWF31Q6d3MXbcfyHlK5mTJBCO9B0yoazspZoQ9QauZAg4VOZ GU1Du/NMRetIl1HCPpoZ/wmPwFcTZx09G+/z/T3SmJwaMw6FiTLYrkBEti6ebPBTNx4P ztESfCaJHpZ8ANbOeJv7E8GcPhKYp2JvSlX4AwC23x/kyRaPVi2WsI1lt1XYwZg48qKe Ljtqv2XVdBLjgOpaFjZQzH+Idsti2zOEBowM2JGqBDzv5KQCJSPSnTBTLx3XoGX8clP3 1rSw== 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=n+c+fNjlqpkODMNA/7ywsu2Xpxn181Yex3QT1BC7YkM=; b=aQnrvyRzBebv7JoHA+/wFpl7NC+kRhL4PSFQ9wgvmYvPX6jUuMOhVQNt+LU8SmqmqT YO//1zTNy6D4wz9egiYWBPXcK9vwrUxSlZ944Lkl/fv0b0JFEDm9IQFKXhbBKjbG19y9 YFozDKmzT9DYDmnnx+vcuO9WPz6xjB7oE/A62T90LlmyMI6kKfNPIMv+/OxO4pTS+lQM N/u546EJlc94Ml7wSDpttoMWXKG1+VkqlFF629VU6gH85crv2KTll5AKcr0XHz5WpH0G Mw8S3r90k6V9p/w9bNwQdgZZpe+rzyA6jHRhztvghpVNtvdKeeJw1T48VMUI6JrhS3io bTag== X-Gm-Message-State: AOAM5307s5yQApdZf/GNDW5SbsLlULRAGL4fDyxZ8TqtbVRi90nloiST Dt9HZEf9GSQTd8sumogOD+Y= X-Google-Smtp-Source: ABdhPJyuVlGCEG84pwfg6BbsVNdI4G/2tvLYelnsvUn7CQTQlf25Ym3pMWyWhlfLoQNWZ9AePptWxg== X-Received: by 2002:a2e:97cb:: with SMTP id m11mr45829799ljj.324.1638133492517; Sun, 28 Nov 2021 13:04:52 -0800 (PST) Received: from [192.168.2.145] (94-29-46-111.dynamic.spd-mgts.ru. [94.29.46.111]) by smtp.googlemail.com with ESMTPSA id d30sm1105908lfv.58.2021.11.28.13.04.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Nov 2021 13:04:52 -0800 (PST) Subject: Re: [PATCH v4 22/25] memory: emif: Use kernel_can_power_off() To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= References: <20211126180101.27818-1-digetx@gmail.com> <20211126180101.27818-23-digetx@gmail.com> From: Dmitry Osipenko Message-ID: <98c5c3d3-1635-3a06-b57f-8facd409796a@gmail.com> Date: Mon, 29 Nov 2021 00:04:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 29 Nov 2021 08:05:26 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Rich Felker , linux-ia64@vger.kernel.org, Santosh Shilimkar , "Rafael J. Wysocki" , Boris Ostrovsky , Linus Walleij , Dave Hansen , Liam Girdwood , "James E.J. Bottomley" , Thierry Reding , Paul Mackerras , Pavel Machek , "H. Peter Anvin" , linux-riscv@lists.infradead.org, Vincent Chen , Will Deacon , Greg Ungerer , Stefano Stabellini , alankao@andestech.com, Yoshinori Sato , Krzysztof Kozlowski , linux-sh@vger.kernel.org, Helge Deller , x86@kernel.org, Russell King , linux-csky@vger.kernel.org, Jonathan Hunter , linux-acpi@vger.kernel.org, Ingo Molnar , Geert Uytterhoeven , Catalin Marinas , xen-devel@lists.xenproject.org, linux-mips@vger.kernel.org, Guenter Roeck , Len Brown , Albert Ou , Lee Jones , linux-m68k@lists.linux-m68k.org, Mark Brown , Borislav Petkov , Greentime Hu , Paul Walmsley , linux-tegra@vger.kernel.org, Thomas Gleixner , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Juergen Gross , Thomas Bogendoerfer , Daniel Lezcano , linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, Sebastian Reichel , linux-kernel@vger.kernel.org, "K . C . Kuen-Chern Lin" , Palmer Dabbelt , Philipp Zabel , Guo Ren , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Joshua Thompson Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 28.11.2021 04:23, Michał Mirosław пишет: > On Fri, Nov 26, 2021 at 09:00:58PM +0300, Dmitry Osipenko wrote: >> Replace legacy pm_power_off with kernel_can_power_off() helper that >> is aware about chained power-off handlers. >> >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/memory/emif.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c >> index 762d0c0f0716..cab10d5274a0 100644 >> --- a/drivers/memory/emif.c >> +++ b/drivers/memory/emif.c >> @@ -630,7 +630,7 @@ static irqreturn_t emif_threaded_isr(int irq, void *dev_id) >> dev_emerg(emif->dev, "SDRAM temperature exceeds operating limit.. Needs shut down!!!\n"); >> >> /* If we have Power OFF ability, use it, else try restarting */ >> - if (pm_power_off) { >> + if (kernel_can_power_off()) { >> kernel_power_off(); >> } else { >> WARN(1, "FIXME: NO pm_power_off!!! trying restart\n"); > > BTW, this part of the code seems to be better moved to generic code that > could replace POWER_OFF request with REBOOT like it is done for reboot() > syscall. Not sure that it can be done. Somebody will have to verify that it won't break all those platform power-off handlers. Better to keep this code as-is in the context of this patchset.