From patchwork Fri Aug 29 15:05:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 36307 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EAF49202DD for ; Fri, 29 Aug 2014 15:08:10 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id c9sf8917075qcz.4 for ; Fri, 29 Aug 2014 08:08:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=VH2P2WDmfieA8UT/P1YXY4X1j+JIyf96uTrH1Vfi6bs=; b=Ia6Ed5bnIXR+lR4cMtCzNyTZm98/W1laJlZ1B7vQLlJlbPv8KuOekJWpk+npqSZ99d mQW6bCUfywwRF7yHw9E8DsSTJYehIyXP3W1btyfRgo4lL0gRBUTKY+fDRHe2UhY38pVi LiUgzFMlnCtvpc73G8bx1XGSW1nWZCztyWpa99WP9wcza7tvEXBVYopYsrGq93Utn34g dJlYoTL4aRLXfvYGMGnhJRg2eVXR87gcxB+QFdimLjzgCcgZpjv71Sd8AFhHU1mmWJIq 5CLW3N7z/J6bKspFJ9tSpKqyuL/j69EHSNqivg9sP8dDqLdaM4Ym1DI8Rs7PDP+tR3Ux UEXw== X-Gm-Message-State: ALoCoQksJ8oPcWua+JpuMQZxH3UZyLb2U/Qs4nrnRS6ezUfZHtkyTCN/DJjAjonT1zO1ikxku+LN X-Received: by 10.236.118.37 with SMTP id k25mr4097155yhh.1.1409324890813; Fri, 29 Aug 2014 08:08:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.242 with SMTP id m105ls1004833qga.84.gmail; Fri, 29 Aug 2014 08:08:10 -0700 (PDT) X-Received: by 10.52.165.129 with SMTP id yy1mr1949881vdb.57.1409324890736; Fri, 29 Aug 2014 08:08:10 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id wj18si379423vcb.9.2014.08.29.08.08.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Aug 2014 08:08:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hy4so2601400vcb.38 for ; Fri, 29 Aug 2014 08:08:10 -0700 (PDT) X-Received: by 10.52.120.51 with SMTP id kz19mr352300vdb.95.1409324890578; Fri, 29 Aug 2014 08:08:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp31095vcb; Fri, 29 Aug 2014 08:08:10 -0700 (PDT) X-Received: by 10.68.225.133 with SMTP id rk5mr16049221pbc.101.1409324889684; Fri, 29 Aug 2014 08:08:09 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id so2si393953pab.132.2014.08.29.08.08.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Aug 2014 08:08:09 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XNNkz-00015R-De; Fri, 29 Aug 2014 15:06:29 +0000 Received: from mail-wg0-f52.google.com ([74.125.82.52]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XNNkw-00010i-FD for linux-arm-kernel@lists.infradead.org; Fri, 29 Aug 2014 15:06:27 +0000 Received: by mail-wg0-f52.google.com with SMTP id m15so2288802wgh.35 for ; Fri, 29 Aug 2014 08:06:03 -0700 (PDT) X-Received: by 10.180.223.4 with SMTP id qq4mr4445004wic.47.1409324763244; Fri, 29 Aug 2014 08:06:03 -0700 (PDT) Received: from ards-macbook-pro.local (BSN-61-35-126.dial-up.dsl.siol.net. [86.61.35.126]) by mx.google.com with ESMTPSA id ll20sm761320wic.14.2014.08.29.08.06.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Aug 2014 08:06:02 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, leif.lindholm@linaro.org Subject: [PATCH 1/2] efi/arm64: use UEFI for system poweroff Date: Fri, 29 Aug 2014 17:05:56 +0200 Message-Id: <1409324757-12607-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140829_080626_657696_71AC66A8 X-CRM114-Status: UNSURE ( 8.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.52 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: roy.franz@linaro.org, Ard Biesheuvel , msalter@redhat.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 If UEFI Runtime Services are available, they are preferred over direct PSCI calls or other methods to power down the system. Enable the existing efi_reboot() code by supplying a definition of efi_poweroff_required() that returns true. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/efi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index e72f3100958f..78c85c4252bc 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -475,3 +475,11 @@ err_unmap: return -1; } early_initcall(arm64_enter_virtual_mode); + +/* + * Override the weak definition in drivers/firmware/efi/reboot.c + */ +bool efi_poweroff_required(void) +{ + return true; +}