From patchwork Fri Jun 27 03:49:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 4433261 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 44B2DBEEAA for ; Fri, 27 Jun 2014 03:53:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 79D76201EF for ; Fri, 27 Jun 2014 03:53:58 +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 A975C201C0 for ; Fri, 27 Jun 2014 03:53:57 +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 1X0NCm-0004Vg-MH; Fri, 27 Jun 2014 03:52:04 +0000 Received: from mail-pd0-f172.google.com ([209.85.192.172]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0NCc-0004Aw-Fc for linux-arm-kernel@lists.infradead.org; Fri, 27 Jun 2014 03:51:55 +0000 Received: by mail-pd0-f172.google.com with SMTP id w10so3881234pde.31 for ; Thu, 26 Jun 2014 20:51:32 -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=t1Wsyom8UBIeySilS1fAueGRkn6anKE1ijPxtc8k8SM=; b=WQFCsE/GC/nXP7BmsKnz0MhAUQ8hMDWxhUrU3lJMlcQge8fQKORutZUE3jeyukvNW/ c/cL0OZNEerCuDhL3lhZDCq2bWKW/3xwH7sR9g6Zppqq6cdoBXkey7NV3AXZiX1H2pyV yDKkGrcBJQTA6E45JrF+CLnufMnI9vlbx0FSbg+URsWyRZM0zkyLWUvCFrNzkspDgY61 F9tdd5fj/5ygH6EnUWbpsOqt5mJdWoOGwri8yMm5bhMfhKLcdestjoA3s0splzLrND5K 0hM6H9Ojmh2gcFNoSxV85QN4BHMRasNzFv2lf8gI+WylIpl0G+SALJ2dzBFDLx2Pugwb TnhQ== X-Gm-Message-State: ALoCoQmaz7Tw0TtDg0hdQzypgNqH0FvYUCjgyfeHBq/XeDgnTKITPFDS041QD2WazPe/9+VLjvi2 X-Received: by 10.67.21.205 with SMTP id hm13mr27310591pad.112.1403841092880; Thu, 26 Jun 2014 20:51:32 -0700 (PDT) Received: from localhost ([183.247.163.231]) by mx.google.com with ESMTPSA id py7sm12298503pbb.78.2014.06.26.20.51.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 26 Jun 2014 20:51:32 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" , Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 06/13] ARM64 / ACPI: Introduce early_param for "acpi" Date: Fri, 27 Jun 2014 11:49:29 +0800 Message-Id: <1403840976-7456-7-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403840976-7456-1-git-send-email-hanjun.guo@linaro.org> References: <1403840976-7456-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_205154_550300_6E2485FF X-CRM114-Status: GOOD ( 13.57 ) X-Spam-Score: -0.0 (/) Cc: Mark Rutland , lorenzo.pieralisi@arm.com, rric@kernel.org, Al Stone , Arnd Bergmann , linaro-acpi@lists.linaro.org, linux-kernel@vger.kernel.org, Grant Likely , Hanjun Guo , Sudeep Holla , Bjorn Helgaas , Graeme Gregory , Charles.Garcia-Tobin@arm.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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_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 ++- drivers/acpi/plat/arm-core.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 8849049..b7e9fc0 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/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c index c6c7e03..cf46c25 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -108,3 +108,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);