From patchwork Mon Jun 20 10:56:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 70435 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1447213qgy; Mon, 20 Jun 2016 03:57:41 -0700 (PDT) X-Received: by 10.107.137.165 with SMTP id t37mr21100637ioi.31.1466420261164; Mon, 20 Jun 2016 03:57:41 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si32722410pfb.208.2016.06.20.03.57.40; Mon, 20 Jun 2016 03:57:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753868AbcFTK5j (ORCPT + 5 others); Mon, 20 Jun 2016 06:57:39 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:35905 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753275AbcFTK5i (ORCPT ); Mon, 20 Jun 2016 06:57:38 -0400 Received: by mail-lf0-f54.google.com with SMTP id q132so35051563lfe.3 for ; Mon, 20 Jun 2016 03:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0k9p8YdEVt2E2cRYIADv2nNz31YiEp9gZyCAVl2D3TY=; b=kwRw4oP0bUAacX647R3dXCYkE09rVi/uM1XXrH7rjERO4Bh+a9Yjvi0dAr3JVxBXYs wUdbM1Vnm29vNCjQR9Pr71pyvuBeyZRa4rAaCopCn4wS7tBQNV96c4I196updY6K1peL WqHFaq2fjMgZeoox86feACdLeRNvxiCfU1Td0= 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=0k9p8YdEVt2E2cRYIADv2nNz31YiEp9gZyCAVl2D3TY=; b=IIN1UC0nC/BAygCz1p7Em9t2feggzSdc/GLGT+oLdrmJJlikGVCOwWIlLLfBPgned8 oXSaqqOglqmcJbNArMs3sg2PuwVY15m6rmRQFHezhAvMSiasE1lApZIZV8GCqs9CMA4O XPOMVHexN8GYbiMQLNb5PrTXR6vcsd9mRcc86sfJNJ+2WYsG58nJRNLQqtBiI31ShQVk f+1ZI/85GNlfKEQxkZfgVkSDJCxG2+OuzYoGb2z6z44QafS2JTiWY7EkmaxAm0pxQOOa Gm5y5gLTqlt5iWv4nGFlfsCgmvQBRu9ilqSiEOxtXAyjFPB7qxk/Wa26S6GxvS458+Au pCCg== X-Gm-Message-State: ALyK8tJyaTZ1NK1hOH5ogHHADKOsqMKnIrUVKewuvgnrZqzsoWG7y+mpHzRkM9r6AFXDj5pW X-Received: by 10.46.0.78 with SMTP id 75mr3839887lja.48.1466420197418; Mon, 20 Jun 2016 03:56:37 -0700 (PDT) Received: from localhost.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id g28sm6367133ljg.24.2016.06.20.03.56.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 03:56:36 -0700 (PDT) From: Aleksey Makarov To: "Rafael J . Wysocki" Cc: Catalin Marinas , Will Deacon , Len Brown , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Aleksey Makarov , Graeme Gregory , Jon Masters , "Zheng, Lv" , Mark Rutland , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Subject: [PATCH v4 3/5] ACPI: table upgrade: move arch-specific symbol to asm/acpi.h Date: Mon, 20 Jun 2016 13:56:11 +0300 Message-Id: <20160620105615.15538-4-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160620105615.15538-1-aleksey.makarov@linaro.org> References: <20160620105615.15538-1-aleksey.makarov@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The constant that defines max phys address where the new upgraded ACPI table should be allocated is arch-specific. Move it to Signed-off-by: Aleksey Makarov --- arch/x86/include/asm/acpi.h | 2 ++ drivers/acpi/tables.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 65f1e95..5391b0a 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h @@ -169,4 +169,6 @@ static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr) } #endif +#define ACPI_TABLE_UPGRADE_MAX_PHYS (max_low_pfn_mapped << PAGE_SHIFT) + #endif /* _ASM_X86_ACPI_H */ diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index b05df13..9f0ad6e 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "internal.h" #ifdef CONFIG_ACPI_CUSTOM_DSDT @@ -543,7 +544,7 @@ void __init acpi_table_upgrade(void) return; acpi_tables_addr = - memblock_find_in_range(0, max_low_pfn_mapped << PAGE_SHIFT, + memblock_find_in_range(0, ACPI_TABLE_UPGRADE_MAX_PHYS, all_tables_size, PAGE_SIZE); if (!acpi_tables_addr) { WARN_ON(1);