From patchwork Thu Jul 24 13:00:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 4617761 Return-Path: X-Original-To: patchwork-linux-arm@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 2D93BC0514 for ; Thu, 24 Jul 2014 13:03:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A566201EF for ; Thu, 24 Jul 2014 13:03:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75B6B201DD for ; Thu, 24 Jul 2014 13:03:51 +0000 (UTC) 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 1XAIeW-0007tb-5x; Thu, 24 Jul 2014 13:01:44 +0000 Received: from mail-pa0-f53.google.com ([209.85.220.53]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAIeQ-0007LO-6H for linux-arm-kernel@lists.infradead.org; Thu, 24 Jul 2014 13:01:42 +0000 Received: by mail-pa0-f53.google.com with SMTP id kq14so3886692pab.40 for ; Thu, 24 Jul 2014 06:01:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FL5u/ijTXpMOyymVpHJuTyBgKbbM15vOpUHugZ5F4os=; b=ILOpqyLHIKD/MuYTTrCqJ6S0tNDqeyfLf2uoqDDPw7/i9/nh0NxXPP7hr/XnIvUPGg 4H0NC6pugzmMEcjQudSDyHfKvFiM/kLnKUJgNLhIoUUKv2vdYpNH4SaY2YdOjjwC8ISe M/qKDAF0Asyfp2PgkgM6Zwp/rUkXsib5ubZHcJPOJqRXVgkAO+clhXYnX2j2/EYNVjUw 5X9W/LgXeboVPHBiEfez5VXroDWavAVnVbCpZFQ7kZTen+w0Gi7Dm+j1SOIlDZAVzNqB FsiNYEBH3Fbpc+GmDaN2Pda73PGO9eAMzoGXwlEnTnLzLVdaIHCcyJx+RqFxPxHRAaaO /MAA== X-Gm-Message-State: ALoCoQlCto19DWwoBhJEtZTE6/D5mLNQGmJ5j2gIl87WcKeSGSzGb3JzRX2qZ68HsiekQ+istdOd X-Received: by 10.68.135.42 with SMTP id pp10mr10124178pbb.58.1406206864096; Thu, 24 Jul 2014 06:01:04 -0700 (PDT) Received: from localhost ([183.247.163.231]) by mx.google.com with ESMTPSA id fb7sm7356165pdb.68.2014.07.24.06.00.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Jul 2014 06:01:03 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland Subject: [PATCH 02/19] ARM64 / ACPI: Introduce early_param for "acpi" Date: Thu, 24 Jul 2014 21:00:08 +0800 Message-Id: <1406206825-15590-3-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406206825-15590-1-git-send-email-hanjun.guo@linaro.org> References: <1406206825-15590-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140724_060138_253387_7E19421A X-CRM114-Status: GOOD ( 13.80 ) X-Spam-Score: -0.7 (/) Cc: Mark Brown , Liviu Dudau , Lv Zheng , Lorenzo Pieralisi , Al Stone , Daniel Lezcano , Robert Moore , linux-acpi@vger.kernel.org, Grant Likely , Charles.Garcia-Tobin@arm.com, Robert Richter , Jason Cooper , Arnd Bergmann , Marc Zyngier , Will Deacon , linaro-acpi-private@linaro.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Graeme Gregory , Randy Dunlap , linux-kernel@vger.kernel.org, Hanjun Guo , Sudeep Holla 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, 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 From: Al Stone Introduce two early parameters for "acpi", one is the parameter to disable ACPI on ARM64 and another one is acpi=strict to disable out-of-spec workarounds. Reviewed-by: Grant Likely Signed-off-by: Al Stone Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- Documentation/kernel-parameters.txt | 3 ++- arch/arm64/kernel/acpi.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b7fa2f5..d130bd5 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -165,7 +165,7 @@ multipliers 'Kilo', 'Mega', and 'Giga', equalling 2^10, 2^20, and 2^30 bytes respectively. Such letter suffixes can also be entirely omitted. - acpi= [HW,ACPI,X86] + acpi= [HW,ACPI,X86,ARM] Advanced Configuration and Power Interface Format: { force | off | strict | noirq | rsdt } force -- enable ACPI if default was off @@ -175,6 +175,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. strictly ACPI specification compliant. rsdt -- prefer RSDT over (default) XSDT copy_dsdt -- copy DSDT to memory + For ARM64, ONLY "off" and "strict" are available. See also Documentation/power/runtime_pm.txt, pci=noacpi diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index c62fce6..ac78e4e 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -74,3 +74,24 @@ void __init acpi_boot_table_init(void) return; } } + +static int __init parse_acpi(char *arg) +{ + if (!arg) + return -EINVAL; + + /* "acpi=off" disables both ACPI table parsing and interpreter */ + if (strcmp(arg, "off") == 0) { + disable_acpi(); + } + /* acpi=strict disables out-of-spec workarounds */ + else if (strcmp(arg, "strict") == 0) { + acpi_strict = 1; + } else { + /* Core will printk when we return error */ + return -EINVAL; + } + + return 0; +} +early_param("acpi", parse_acpi);