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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B09FC433DB for ; Fri, 5 Mar 2021 07:34:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 F2B8264F59 for ; Fri, 5 Mar 2021 07:34:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2B8264F59 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :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-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ii2eI52wmNLVfTgYIG4iADMm81bLCRJCn7T9Xx6x1Jc=; b=EUz50vq9EH3l3taVqmsAPSIdN cA6I3Su77jbIZYmKP7x0kQsVcPYLMXxQj2+XG0H7uQqM0SfKZX6tTE/TDLoaFgJDnoa+R89jQkKP0 exhtoM5niWaRyxlH8ZMxzYO+dlxEfztAqRHQIPA5+lFHmPUmI+LT3LvVmNhrFWIYNzndo0hkVf7Uo Vqo2flIrhhPOfnFoTx0uEQhPfnXZYKpmxm4h+7SQInvOYSLUkNguuxfXTiWpARgF63XIb6GIBBZ0f E7kyC7UhCUPc+/To7PpBxmbhH4lv5rd0zImfRuwA4XdsaDj860Y+iwLPeo1fCJps6/lYhVjicnae7 50nwsGQQw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI4wU-00Dir6-MV; Fri, 05 Mar 2021 07:32:11 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lI4wP-00Dip7-Cn for linux-arm-kernel@lists.infradead.org; Fri, 05 Mar 2021 07:32:07 +0000 Received: by mail-pj1-x1029.google.com with SMTP id ch11so1413587pjb.4 for ; Thu, 04 Mar 2021 23:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MTdKQB2Gsmruy+Q9zWhpChcNm8Ichv3FAZ+t4aTfi4c=; b=zxHU1IOGfcqjMkpH7aTe2arIDCiUtW4kQuFhkYjGeEBTiHQMVnFanCEiKO2hvymCDm nmAcgkrCw/Ej1nCed0RQFrw5nTx0i3p055ukKJ4Y3mRxwTMzC53E9m4Rx0+kvCFOV7ye VRIO+i3k1h2phAZwtk9KWKAYdqyoPOkyjmGw43tZeJSr44J51t7JuCRJrRwuZtH5MOEk hHZ+uSOrocxOk/0PCntiK6ltoHhSsnsCY5k09oXQIrYoYaqeElz3A1LLw4aHto3nFhfR wlFpQ2IyXHTl3L5I85ZDhF7M8v7WCJ2G8gLTFmzJoSXLJ8amjhoC1caDtxJhInztatRO t0mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MTdKQB2Gsmruy+Q9zWhpChcNm8Ichv3FAZ+t4aTfi4c=; b=CWrtdi0CuDy3UPO1f+m2yOyTCnTaq2Jc74mRROqxOXrtUuk6BvO5Hsm9mxSlAr263W DYyXyhzyhZprpciYlpY0EOg/0TVa2i4D7jGysFbtdKHcITjoutxShGLLPLeUVD2iug/2 ddvK4kJn0TDldki4ZJKGDhuV9xunExmtwr/cfpEPrRBNN0j+P2C097en9U2hb3kb4xGJ ViI1myYtd7y06ceTtfvgta3yRNQ8VqVfDX6A12IKNOkbJszW4Up6xrDuFK8VTtnm/4qC v8SWX2AmCPM8hatAFDuejqjG3xeJrjFW6ByJ3UNL0l25eaJ2f83U765dbMkr0Ut3QtkO j+cA== X-Gm-Message-State: AOAM532BtMMAcp4qEuXhUeL419rPDb4VVzv8wLg0eHW1yXvcH5W+Itnf eL0D96HZkqefeUX3K2oPZfUQ7Q== X-Google-Smtp-Source: ABdhPJyjvG+QHEVO9SJWduVkRkCLdX9UN/zRTwyetVnMryZdVVG46qnM910uHz5g1IHNHoE6WNlrpg== X-Received: by 2002:a17:90b:1b52:: with SMTP id nv18mr9112733pjb.19.1614929521292; Thu, 04 Mar 2021 23:32:01 -0800 (PST) Received: from dragon (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id i66sm1464028pfe.31.2021.03.04.23.31.58 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Mar 2021 23:32:00 -0800 (PST) Date: Fri, 5 Mar 2021 15:31:55 +0800 From: Shawn Guo To: Ard Biesheuvel Cc: Catalin Marinas , Will Deacon , Jeffrey Hugo , Bjorn Andersson , linux-efi , Linux ARM , linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] arm64: efi: add check for broken efi poweroff Message-ID: <20210305073151.GI17424@dragon> References: <20210305065120.11355-1-shawn.guo@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_073205_893878_74EE525A X-CRM114-Status: GOOD ( 21.01 ) 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 Fri, Mar 05, 2021 at 08:01:02AM +0100, Ard Biesheuvel wrote: > On Fri, 5 Mar 2021 at 07:51, Shawn Guo wrote: > > > > Poweroff via UEFI Runtime Services doesn't always work on every single > > arm64 machine. For example, on Lenovo Flex 5G laptop, it results in > > a system reboot rather than shutdown. Add a DMI check to keep such > > system stay with the original poweroff method (PSCI). > > > > Signed-off-by: Shawn Guo > > What is the point of using EFI runtime services on this machine if > poweroff doesn't work either? Hmm, I'm not sure how many EFI runtime services are being used by kernel, but this is the only one broken I have seen. Not sure we want to disable the whole thing completely. Also, I'm looking at commit log of 0c5ed61adbdb ("efi/reboot: Allow powering off machines using EFI") below. Not only can EfiResetSystem() be used to reboot, it can also be used to power down machines. By and large, this functionality doesn't work very well across the range of EFI machines in the wild, so it should definitely only be used as a last resort. In an ideal world, this wouldn't be needed at all. Unfortunately, we're starting to see machines where EFI is the *only* reliable way to power down, and nothing else, not PCI, not ACPI, works. It seems poweroff via EFI runtime services is known not working for every machine, and was meant to be the last resort if nothing else can power off system. If we try PSCI first on arm64, you do not see my patch at all :) > Can't we just boot this thing with > efi=noruntime? We are trying to get arm64 laptop support into distros, and patching kernel cmdline with 'efi=novamap' is already a pain. We do not really want to have more of it. Shawn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel