From patchwork Tue May 17 12:06:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 9111771 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 01CBFBF29F for ; Tue, 17 May 2016 12:07:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 24B0020279 for ; Tue, 17 May 2016 12:07:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 16C6C2034B for ; Tue, 17 May 2016 12:07:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754356AbcEQMHi (ORCPT ); Tue, 17 May 2016 08:07:38 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:35708 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754902AbcEQMHh (ORCPT ); Tue, 17 May 2016 08:07:37 -0400 Received: by mail-lf0-f50.google.com with SMTP id j8so5823574lfd.2 for ; Tue, 17 May 2016 05:07:35 -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=rExt1+bhqwPJdsa3p9xmoiU79CJldMDcg24GhcscWH4=; b=Lh225fUWuIpFdaC20Fogmgp3256/iXWN4mWL9+0S9eH9UeoJCSpGPv5j+eLLGBsh8L 9UKzTWT+A4XFEmmsu5ZO0Rrt7OaEDUqtN5RaILd5Na2JX8xDtnoYImQTz+1+aRYSz9DO 3BLS13OdG08AMBmnSFxxTQ/6S+Oy26PmklFdw= 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=rExt1+bhqwPJdsa3p9xmoiU79CJldMDcg24GhcscWH4=; b=hQ03/TXIqKtrDFU2Sc1WfyIZRdG2h4/MnMvYrSadPZ5+5IYXzvtQXrL2tZoRW6MKYm Oc31vAhuZluTyleQWAP7ugWKpM2TQ8qYA/xjCZWQgsd0oaPtaxAh9dsqgQoWa6HZKCG4 yYkiuusMF60IIWd/TGm9hH2rt/SN2D7+lsbTaRT6xBaMUNOC2K5Ph/96XWw9t9cK1hxP t052xTG2W7d6bQdYNEArqtFYR2hStfcX5j5amSJNxSgMA1K2QKrKp8JQAd53xAKRq1tY jzX8UO0Mc3YTRDC9xZZUoaLF5kZL43Q7yqKB+4Z6XoTo2Rmn/KrnpqkgDAxatmrMa229 vGMg== X-Gm-Message-State: AOPr4FV1jmN9VNDRxxzPoedG2ph9LOfor+NS4GPrRwQJQufbsPOkmVDOmRy6BhoDjx0h3qTO X-Received: by 10.25.16.73 with SMTP id f70mr415930lfi.34.1463486854864; Tue, 17 May 2016 05:07:34 -0700 (PDT) Received: from turnip.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id n37sm466314lfg.46.2016.05.17.05.07.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 May 2016 05:07:34 -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 1/3] ACPI: table upgrade: use cacheable map for tables Date: Tue, 17 May 2016 15:06:01 +0300 Message-Id: <1463486765-31827-2-git-send-email-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1463486765-31827-1-git-send-email-aleksey.makarov@linaro.org> References: <1463486765-31827-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-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index a372f9e..449a649 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, + 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;