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: 9111841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5C0449F1C3 for ; Tue, 17 May 2016 12:09:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 883DC20279 for ; Tue, 17 May 2016 12:09:48 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id CA899202EC for ; Tue, 17 May 2016 12:09:47 +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 1b2dnA-0006Ym-0k; Tue, 17 May 2016 12:08:04 +0000 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b2dn2-0006Tg-M0 for linux-arm-kernel@lists.infradead.org; Tue, 17 May 2016 12:07:57 +0000 Received: by mail-lf0-x22a.google.com with SMTP id u64so5843944lff.3 for ; Tue, 17 May 2016 05:07:36 -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=LPJ+B1XxxkAJ/r2R3p+07k2zY1GpwSQaadwQcKQdiPTW+SGtoptYiuitP2w+9FmhRK DapMehAOHDkbxK0tmcr/70rNgOdhX3j1w/gpiVjZO7FI9cQsBfOUOolKn6VhNgvbkAqu xT2Qy7MXc0appz8iRQBauLCIxqf8jXR0Oj/X3j3WkCTOVuy0aNm6s+9kRPMp0l87/Dnx jkAdrRMlouBKQ8ZVyYlOAFqJhgIBbE0P6OD4jpIDED6mp+GG0tdXiCQjhzN4LXwRy4do 36n5sIAgKRS1Zz/FmmZuIn33oqXT/ddRWFeVbydZTdEnPNHUPRJg7PPefLir+oPcsFmC 9/vw== X-Gm-Message-State: AOPr4FVDPOUAcWTggDLUegv6gDXEiMS2xlShIoHVq+xOTc5A9OJCDHD5FDbcANe5/uBIzRDg 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160517_050756_987102_C23CDE75 X-CRM114-Status: GOOD ( 13.81 ) X-Spam-Score: -2.7 (--) 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 , Graeme Gregory , Jon Masters , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Aleksey Makarov , "Zheng, Lv" , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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;