From patchwork Thu May 19 16:15:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 9127955 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 976BD60221 for ; Thu, 19 May 2016 16:18:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AE4928117 for ; Thu, 19 May 2016 16:18:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EE27281CE; Thu, 19 May 2016 16:18:11 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 171DD28117 for ; Thu, 19 May 2016 16:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932662AbcESQQz (ORCPT ); Thu, 19 May 2016 12:16:55 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:32768 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932658AbcESQQx (ORCPT ); Thu, 19 May 2016 12:16:53 -0400 Received: by mail-lf0-f44.google.com with SMTP id y84so39447869lfc.0 for ; Thu, 19 May 2016 09:16:52 -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=eSErC/vTD9A6Fp23m62IgoLrCPCMAa1D4rPLNo0iSsM=; b=HNV2M+x84hebipFOC3aK90HqWXOBDBSRicDpMC+83xWyXUjNUTcDqmU9bK0s37iS/B kfFET7vjF6ONu53mBk8HUmzbQcNxg2ui4Ex4ZJZnJdngrgMsZRo+ZDT8JdFaRqchYc5g LaOxuaWpRuebH93E2bupoq3jSrAUUbmACrIC0= 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=eSErC/vTD9A6Fp23m62IgoLrCPCMAa1D4rPLNo0iSsM=; b=Ik3W5S6OLUyVpzbqqKjEIH5tIhICAiMPTsO8Vkle/EcFllNkJ3KNxFD3smp3OHE1S6 NwffHlANphh4u+++7XuI4Blak6KZowPYLkhVBDo8Mgm9WUWmy6LkV/VCOBkNIol3sEPI 142AlnLKHF7lg/hyACTF3JWKoEKW72eV3Z7C9S0IyMLtc0vzsIBent9t3Ft3mo8SKwXH gToHF05hvxhvduybsqYJSRjVnVhnm6e6X+8P1asfsjwX3FLLrA1Xpml9POa7qUwH2vn6 7u9cX2+oX6lZZPuvbBvgHvyqRsMRarW1yLrzxwdPyuXSCR3uhYN7tvnEXKHvUVTQxkyL iYvA== X-Gm-Message-State: AOPr4FW23KriYA09Q4T/zIrKpn0kI8FVdYA87InfwzoezkEgZJKBI7UOtpKtNyrp3wWvoLzK X-Received: by 10.25.136.137 with SMTP id k131mr5009636lfd.88.1463674611582; Thu, 19 May 2016 09:16:51 -0700 (PDT) Received: from turnip.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id yf9sm2396538lbb.34.2016.05.19.09.16.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 May 2016 09:16:50 -0700 (PDT) From: Aleksey Makarov To: Russell King , "Rafael J . Wysocki" , Len Brown Cc: 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 Subject: [PATCH v2 1/5] ACPI: table upgrade: use cacheable map for tables Date: Thu, 19 May 2016 19:15:12 +0300 Message-Id: <1463674518-22477-2-git-send-email-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1463674518-22477-1-git-send-email-aleksey.makarov@linaro.org> References: <1463674518-22477-1-git-send-email-aleksey.makarov@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The new memory allocated in acpi_table_initrd_init() is used to copy the upgraded tables to it. So it should be mapped with early_memunmap() instead of early_ioremap(). This is critical for ARM. Signed-off-by: Aleksey Makarov Acked-by: Lv Zheng --- drivers/acpi/tables.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index a372f9e..f829e6a 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -578,10 +578,10 @@ static void __init acpi_table_initrd_init(void *data, size_t size) clen = size; if (clen > MAP_CHUNK_SIZE - slop) clen = MAP_CHUNK_SIZE - slop; - dest_p = early_ioremap(dest_addr & PAGE_MASK, - clen + slop); + dest_p = early_memremap(dest_addr & PAGE_MASK, + clen + slop); memcpy(dest_p + slop, src_p, clen); - early_iounmap(dest_p, clen + slop); + early_memunmap(dest_p, clen + slop); src_p += clen; dest_addr += clen; size -= clen;