From patchwork Thu Dec 19 07:51:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yi Lee X-Patchwork-Id: 3375401 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 99E49C0D4A for ; Thu, 19 Dec 2013 07:56:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C98F720170 for ; Thu, 19 Dec 2013 07:56:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 002852018E for ; Thu, 19 Dec 2013 07:56:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037Ab3LSHz2 (ORCPT ); Thu, 19 Dec 2013 02:55:28 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:34754 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752682Ab3LSHzZ (ORCPT ); Thu, 19 Dec 2013 02:55:25 -0500 Received: by mail-pb0-f41.google.com with SMTP id jt11so810637pbb.14 for ; Wed, 18 Dec 2013 23:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gQ2feAgcfLQRccfiEnJTBQmpKAl/B2vdWkDpRLI3Z00=; b=P8ANnZThAgZFlpsUXBerxz2jR/Y0Aj5YkuDCjlNYXtc7NNtVYSTajwEf5uRD86T2E7 t9VcIjxK/FpaEZRYXA2dRAiPLV6C2K5K9NyhXvk50qLireDrqnVL+QEedZgM9+OHS4XI GpXZIfakE9s6+cC3+dGK8DXKALehqN5h8rqImd/VGj8HBIw4M2bD3/HwIj6YfVJW7IE9 61rGlMVPw+mti1L549aBDbZR6yoLl8wydLdSmY3sZuMk8w7Os9xLEvr17NidZueRZXlD HLejyFXsCWXtOuOOnrUkl3jVheZWnmTx2VPk3uF7F5I5lzPVM/44Z6WJSnQo8A2tzsT/ fv8Q== X-Received: by 10.66.154.197 with SMTP id vq5mr25657395pab.155.1387439725308; Wed, 18 Dec 2013 23:55:25 -0800 (PST) Received: from localhost.localdomain ([130.57.30.250]) by mx.google.com with ESMTPSA id qp15sm5173154pbb.2.2013.12.18.23.55.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 18 Dec 2013 23:55:24 -0800 (PST) From: "Lee, Chun-Yi" To: "Rafael J. Wysocki" , Alessandro Zummo , "H. Peter Anvin" , Matt Fleming , Matthew Garrett Cc: Elliott@hp.com, samer.el-haj-mahmoud@hp.com, Oliver Neukum , werner@suse.com, trenn@suse.de, JBeulich@suse.com, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com, x86@kernel.org, "linux-efi@vger.kernel.org" , linux-acpi@vger.kernel.org, "Lee, Chun-Yi" Subject: [TEST PATCH 14/14] acpi: add early parameter to set CMOS RTC Not Present bit for testing Date: Thu, 19 Dec 2013 15:51:55 +0800 Message-Id: <1387439515-8926-15-git-send-email-jlee@suse.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1387439515-8926-1-git-send-email-jlee@suse.com> References: <1387439515-8926-1-git-send-email-jlee@suse.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 This is a patch for testing that will not go to any git tree. Add a early kernel parameter to set CMOS RTC Not Present bit in acpi_gbl_FADT variable for testing. Use acpi_no_cmos_rtc=1 to enable this bit to block rtc cmos interface. Signed-off-by: Lee, Chun-Yi --- arch/x86/kernel/acpi/boot.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 6c0b43b..64925dd 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -83,6 +83,8 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; #warning ACPI uses CMPXCHG, i486 and later hardware #endif +static bool acpi_no_cmos_rtc; + /* -------------------------------------------------------------------------- Boot-time Configuration -------------------------------------------------------------------------- */ @@ -1531,6 +1533,13 @@ int __init acpi_boot_init(void) */ acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt); + /* Dummy NO_CMOS_RTC enable option to fake out RTC CMOS */ + if (acpi_no_cmos_rtc) { + acpi_gbl_FADT.header.revision = 5; + acpi_gbl_FADT.boot_flags |= ACPI_FADT_NO_CMOS_RTC; + pr_info("acpi: Set NO_CMOS_RTC bit in FADT for testing\n"); + } + /* * Process the Multiple APIC Description Table (MADT), if present */ @@ -1673,3 +1682,11 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size) e820_add_region(addr, size, E820_ACPI); update_e820(); } + +/* Dummy NO_CMOS_RTC enable option to fake out RTC CMOS */ +static int __init setup_acpi_no_cmos_rtc(char *arg) +{ + acpi_no_cmos_rtc = true; + return 0; +} +early_param("acpi_no_cmos_rtc", setup_acpi_no_cmos_rtc);