From patchwork Tue Jul 30 13:22:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Guthro X-Patchwork-Id: 2835686 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 254A39F9CE for ; Tue, 30 Jul 2013 13:23:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 771C020416 for ; Tue, 30 Jul 2013 13:23:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21FD820410 for ; Tue, 30 Jul 2013 13:23:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753288Ab3G3NW7 (ORCPT ); Tue, 30 Jul 2013 09:22:59 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:55383 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753017Ab3G3NW6 (ORCPT ); Tue, 30 Jul 2013 09:22:58 -0400 X-IronPort-AV: E=Sophos;i="4.89,778,1367971200"; d="scan'208";a="38241596" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/AES128-SHA; 30 Jul 2013 13:22:57 +0000 Received: from citrite.net (10.204.241.11) by FTLPEX01CL01.citrite.net (10.13.107.78) with Microsoft SMTP Server id 14.2.342.4; Tue, 30 Jul 2013 09:22:57 -0400 From: Ben Guthro To: Konrad Rzeszutek Wilk , Jan Beulich , "Rafael J . Wysocki" , , , CC: Ben Guthro , , Gang Wei Subject: [PATCH v8.1] x86/tboot: Fail extended mode reduced hardware sleep Date: Tue, 30 Jul 2013 09:22:37 -0400 Message-ID: <1375190557-21474-1-git-send-email-benjamin.guthro@citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1411346.4e01ECe1J5@vostro.rjw.lan> References: <1411346.4e01ECe1J5@vostro.rjw.lan> MIME-Version: 1.0 X-Originating-IP: [10.204.241.11] Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Register for the extended sleep callback from acpi. As tboot currently does not support the reduced hardware sleep interface, fail this extended call. Signed-off-by: Jan Beulich Signed-off-by: Ben Guthro Cc: tboot-devel@lists.sourceforge.net Cc: Gang Wei Reviewed-by: Konrad Rzeszutek Wilk --- arch/x86/kernel/tboot.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c index addf7b5..91a4496 100644 --- a/arch/x86/kernel/tboot.c +++ b/arch/x86/kernel/tboot.c @@ -301,6 +301,15 @@ static int tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control) return 0; } +static int tboot_extended_sleep(u8 sleep_state, u32 val_a, u32 val_b) +{ + if (!tboot_enabled()) + return 0; + + pr_warning("tboot is not able to suspend on platforms with reduced hardware sleep (ACPIv5)"); + return -ENODEV; +} + static atomic_t ap_wfs_count; static int tboot_wait_for_aps(int num_aps) @@ -422,6 +431,7 @@ static __init int tboot_late_init(void) #endif acpi_os_set_prepare_sleep(&tboot_sleep); + acpi_os_set_prepare_extended_sleep(&tboot_extended_sleep); return 0; }