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: 32607 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 866F7201EF for ; Fri, 27 Jun 2014 03:51:48 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id uz6sf25115224obc.0 for ; Thu, 26 Jun 2014 20:51:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=pe/MDznwY+mLN4NhmpWMJiEawV36FAVxVff0G7IO/sU=; b=jGzWLLA3lged8Iv2brQSnMCuA+tkx9sJbRhGNJgzztkivxfprQhmHK1tAg4WGgfk0O 7tJTaYfCGOqyFMNwXmNgfF7+AQLDphwaP2aKWbwX/rM0V4L07yp5BipHPyG9eG5/UenD alqA0NtDVYn4GigfokJa/i8/vQv4vzyPdtH+0vjF215ccOhpXVidAla3LdrBN1ihBI6t yfyqqTQ88y4yjNwHqYoLLoqeiIIfwkCU4XpuRFFqnqwI5wfMITOz6xOu7H7kLrs+XLre SVWPf8EjcxCksc1xx0mi+91MwZSZZM5FpKG19OzZvIaGCfUlpo0yhtxzfKFabBaKU3U+ jGkw== X-Gm-Message-State: ALoCoQlk9UvjaeMqYfCLPhGJl9NoqDYYI14eFW9Kj6uvG7kywNeJt4msb1UsSZE+03yynT2Ezl1C X-Received: by 10.42.49.138 with SMTP id w10mr9343747icf.13.1403841108132; Thu, 26 Jun 2014 20:51:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.227 with SMTP id j90ls432903qgd.47.gmail; Thu, 26 Jun 2014 20:51:48 -0700 (PDT) X-Received: by 10.220.166.9 with SMTP id k9mr17526454vcy.20.1403841108056; Thu, 26 Jun 2014 20:51:48 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id n9si5710466vcx.91.2014.06.26.20.51.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 20:51:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id jw12so4702678veb.39 for ; Thu, 26 Jun 2014 20:51:48 -0700 (PDT) X-Received: by 10.221.64.80 with SMTP id xh16mr17455234vcb.35.1403841107960; Thu, 26 Jun 2014 20:51:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp77029vcb; Thu, 26 Jun 2014 20:51:47 -0700 (PDT) X-Received: by 10.68.247.65 with SMTP id yc1mr27189385pbc.68.1403841107270; Thu, 26 Jun 2014 20:51:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce7si12424416pad.113.2014.06.26.20.51.46; Thu, 26 Jun 2014 20:51:46 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752745AbaF0Dvf (ORCPT + 27 others); Thu, 26 Jun 2014 23:51:35 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:44500 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbaF0Dvd (ORCPT ); Thu, 26 Jun 2014 23:51:33 -0400 Received: by mail-pb0-f48.google.com with SMTP id rq2so4017149pbb.21 for ; Thu, 26 Jun 2014 20:51:32 -0700 (PDT) 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 Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Bjorn Helgaas , rric@kernel.org, Grant Likely , Sudeep Holla , Mark Rutland , Charles.Garcia-Tobin@arm.com, lorenzo.pieralisi@arm.com, linaro-acpi@lists.linaro.org, Al Stone , Graeme Gregory , Hanjun Guo 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);