From patchwork Mon May 14 17:49:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Andrianov X-Patchwork-Id: 8602 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 26E6623E49 for ; Mon, 14 May 2012 17:52:00 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id C9B38A1878D for ; Mon, 14 May 2012 17:51:59 +0000 (UTC) Received: by ggnf1 with SMTP id f1so3704073ggn.11 for ; Mon, 14 May 2012 10:51:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to :date:message-id:x-mailer:mime-version:x-mailman-approved-at:cc :subject:x-beenthere:x-mailman-version:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :content-type:content-transfer-encoding:sender:errors-to :x-gm-message-state; bh=8HOTxEbtaODQHhYHfjkAPfgwdV/XYX94snT6BWMmQ/U=; b=DT2s3fF3Oww35vI3ruDy6zDkvRsYKolAwMdcuPl8MMQc6F/S5JQSRp3UJcE/PiIfCV LDDA6aner++8mRCTQjLHmOknwPIJqF9M4EAYMaoH16KozoGk4i6anSVvcHix3dfiD/8c Gb2ElmFH2igRpMm3O92avU11uOl014NhCz0nHcztcCWBXbQS4II3O9x1u09bVb/YEt/q Ar15rGhwDUau/pc3/erA5gKB+q4AMkEf9kZf5yPMfucAKbviRt3PNZa3/1nJ1f1+M1rX dOobxkwbbHJ0mzTx4KYORJbnnGOqfoOmZyhglzj+a5cacUq4lIQIJ44KS7d7jS+QIR6I nPNg== Received: by 10.42.89.72 with SMTP id f8mr2512605icm.33.1337017919178; Mon, 14 May 2012 10:51:59 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp361606ibd; Mon, 14 May 2012 10:51:58 -0700 (PDT) Received: by 10.180.81.36 with SMTP id w4mr268685wix.16.1337017917588; Mon, 14 May 2012 10:51:57 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id g6si20246359wie.28.2012.05.14.10.51.55; Mon, 14 May 2012 10:51:57 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1STzR0-0003NE-P2; Mon, 14 May 2012 17:51:50 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1STzPJ-0002hj-Lz for linaro-mm-sig@lists.linaro.org; Mon, 14 May 2012 17:50:05 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q4EHo0ee016158; Mon, 14 May 2012 12:50:00 -0500 Received: from DFLE70.ent.ti.com (dfle70.ent.ti.com [128.247.5.40]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q4EHo0NB023210; Mon, 14 May 2012 12:50:00 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle70.ent.ti.com (128.247.5.40) with Microsoft SMTP Server id 14.1.323.3; Mon, 14 May 2012 12:50:00 -0500 Received: from uda0794637 (uda0794637.am.dhcp.ti.com [158.218.103.61]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id q4EHo0jp025147; Mon, 14 May 2012 12:50:00 -0500 Received: from a0794637local by uda0794637 with local (Exim 4.76) (envelope-from ) id 1STzPE-00076L-8m; Mon, 14 May 2012 13:50:00 -0400 From: Vitaly Andrianov To: , Date: Mon, 14 May 2012 13:49:56 -0400 Message-ID: <1337017796-27267-1-git-send-email-vitalya@ti.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 14 May 2012 17:51:49 +0000 Cc: linaro-mm-sig@lists.linaro.org, Vitaly Andrianov , linux-arm-kernel@lists.infradead.org Subject: [Linaro-mm-sig] [PATCH] ARM: dma-mapping: use PMD size for section unmap X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQnqKukhxpC0doTUbXlBR+YQPYpmH9nLzVIAQLgDWk0ZQ/G4/zHd9h46YTz3BVjD4Ao3oTXk The dma_contiguous_remap() function clears existing section maps using the wrong size (PGDIR_SIZE instead of PMD_SIZE). This is a bug which does not affect non-LPAE systems, where PGDIR_SIZE and PMD_SIZE are the same. On LPAE systems, however, this bug causes the kernel to hang at this point. This fix has been tested on both LPAE and non-LPAE kernel builds. Signed-off-by: Vitaly Andrianov --- arch/arm/mm/dma-mapping.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 446dc1b..d220d4f 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -414,7 +414,7 @@ void __init dma_contiguous_remap(void) * Clear previous low-memory mapping */ for (addr = __phys_to_virt(start); addr < __phys_to_virt(end); - addr += PGDIR_SIZE) + addr += PMD_SIZE) pmd_clear(pmd_off_k(addr)); iotable_init(&map, 1);