From patchwork Mon Jun 20 10:56:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 9187179 X-Patchwork-Delegate: rjw@sisk.pl 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 19F8F6075E for ; Mon, 20 Jun 2016 11:03:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0530523B24 for ; Mon, 20 Jun 2016 11:03:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDA232684F; Mon, 20 Jun 2016 11:03:55 +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 7A24B23B24 for ; Mon, 20 Jun 2016 11:03:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932404AbcFTLDy (ORCPT ); Mon, 20 Jun 2016 07:03:54 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:34992 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932398AbcFTLDx (ORCPT ); Mon, 20 Jun 2016 07:03:53 -0400 Received: by mail-lf0-f41.google.com with SMTP id l188so35190980lfe.2 for ; Mon, 20 Jun 2016 04:03:10 -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=yA7HM89vOI7NRZgY8E9/OtjZAvQ2Aejr0Np7Axnh7YQ=; b=jqI8XXRcCHclACT18LMYSj6TgxwSJX+fQ8QLi4N/qesT2AaYWOVwjghkKa1zmQ0E19 YxfBrkQLi0NSUsGar+iTBlDGgYWU2I15kWQZKnwIrnH4FtuJGsB+2ADQdrjsWCYI5z3e xu8G9S1q8LyfxXFXIPcdpWMhL28HDkiibVStM= 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=yA7HM89vOI7NRZgY8E9/OtjZAvQ2Aejr0Np7Axnh7YQ=; b=BzgkDkShXj3/6s06g0aK8PXL0q1ibAB3wMmZ+YF0y5IkggN/c8E/rDQzkjQ0RRoF/P vhan/lI/KzUoBbpU01URo0+PD5i/8MKQ3MGCCpIHDJBfttM+KlLRTWXu1nrFkg5HqQ8a 7oNAOi3EdLNoK73GM78Qd5/4XUUP8kzbyAU0ncVflkA/XYWo3v4209JvL6a2/hfLYJGT zn+Cf+9L0+DQwMGedRyS2W04VS7NP1fbkS2iHUdcu58+rvLfrChK37OAnbJ7XB87gbZM qHrVxg364gcGiLVb2FZ/j95twEZIboeicI2fh7imai0gYRBDSg9zRt62zSiNH4icXK4q pqOg== X-Gm-Message-State: ALyK8tIzmNONCmC9AA/JgvUIlnwq+adsXwmdUIEJwSplLqLtUFHCluMYsshF2+ETBMOLssAW X-Received: by 10.46.9.215 with SMTP id 206mr3797320ljj.63.1466420191545; Mon, 20 Jun 2016 03:56:31 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 03:56:30 -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 Subject: [PATCH v4 1/5] ACPI: table upgrade: use cacheable map for tables Date: Mon, 20 Jun 2016 13:56:09 +0300 Message-Id: <20160620105615.15538-2-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 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;