From patchwork Fri Aug 24 03:29:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 961688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41xRcH1RFZz9s47; Fri, 24 Aug 2018 13:30:06 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ft2nS-0004BL-9U; Fri, 24 Aug 2018 03:30:02 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1ft2nQ-0004AB-1e for fwts-devel@lists.ubuntu.com; Fri, 24 Aug 2018 03:30:00 +0000 Received: from [175.181.224.59] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ft2nP-0002Fe-74; Fri, 24 Aug 2018 03:29:59 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] efi_runtime: re-enable the resetsystem runtime interface Date: Fri, 24 Aug 2018 11:29:52 +0800 Message-Id: <1535081392-26787-1-git-send-email-ivan.hu@canonical.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Re-enable the UEFI runtime service ResetSystem interface, And also fix the gcc build warning, warning: ‘efi_runtime_reset_system’ defined but not used Signed-off-by: Ivan Hu Acked-by: Alex Hung Acked-by: Colin Ian King --- efi_runtime/efi_runtime.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c index d79db78..30a139a 100644 --- a/efi_runtime/efi_runtime.c +++ b/efi_runtime/efi_runtime.c @@ -561,10 +561,6 @@ static long efi_runtime_get_nexthighmonocount(unsigned long arg) return 0; } -#if 0 -/* - * Note: efi_runtime_reset_system currently not used - */ static long efi_runtime_reset_system(unsigned long arg) { struct efi_resetsystem __user *resetsystem_user; @@ -588,7 +584,6 @@ static long efi_runtime_reset_system(unsigned long arg) kfree(data); return 0; } -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) static long efi_runtime_query_variableinfo(unsigned long arg) @@ -724,6 +719,9 @@ static long efi_runtime_ioctl(struct file *file, unsigned int cmd, case EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT: return efi_runtime_get_nexthighmonocount(arg); + case EFI_RUNTIME_RESET_SYSTEM: + return efi_runtime_reset_system(arg); + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) case EFI_RUNTIME_QUERY_VARIABLEINFO: return efi_runtime_query_variableinfo(arg);