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: 9187173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4532F6075F for ; Mon, 20 Jun 2016 10:58:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2313C273F1 for ; Mon, 20 Jun 2016 10:58:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15C78272AA; Mon, 20 Jun 2016 10:58:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7800D27813 for ; Mon, 20 Jun 2016 10:58:58 +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 1bEwtM-0005LT-6K; Mon, 20 Jun 2016 10:57:20 +0000 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bEwt0-0005Br-4l for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2016 10:56:59 +0000 Received: by mail-lf0-x234.google.com with SMTP id h129so34323858lfh.1 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=WOwGHpbFWaYtEQ44mw1+nenIZku6FErEjz2mOX3VedtKx9zOj3qYC281Gb+cnZYPj1 Rv6K0eAPfIkMN7iykdW5JF2Lc90mFrveoZCaFgAqY8LNpf3wBDsWFPNfosR3NSJjFCsN BulOX8WrAQg1qJA2Ies5iHhhW+yh7HUI4l2HhmlEgp6bIgeUjjiAhASFx7xSEARKsEQ/ btjCazEG4p0fzXTh531YueIFZ6JDhHjROSt5rIBdDj5koJ5UE/UvkLKKdl66sS1qKDQ4 llDdGRbF9W5svQv/taAzbUluAwsq6W5PMH2Fu2l2LIQNV8agyqTdtokMkZdMmCTnWZ+W 3/DA== X-Gm-Message-State: ALyK8tIJI+QIwDsJFDBR7J8XLUEdbL0uWaOcDcR3xeH1Qu9Cb1sH6yP2ssWWSS26TzZxE0Cm 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" 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_035658_404356_404AC905 X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , x86@kernel.org, Graeme Gregory , Catalin Marinas , "H. Peter Anvin" , Will Deacon , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Aleksey Makarov , Ingo Molnar , "Zheng, Lv" , Jon Masters , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Len Brown MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);