From patchwork Tue May 10 17:25:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 774932 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4AHPKJf031645 for ; Tue, 10 May 2011 17:25:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750900Ab1EJRZT (ORCPT ); Tue, 10 May 2011 13:25:19 -0400 Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]:56352 "EHLO na3sys009aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866Ab1EJRZS (ORCPT ); Tue, 10 May 2011 13:25:18 -0400 Received: from mail-px0-f170.google.com ([209.85.212.170]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKTcl0/bBb4uxeloJPuBIiUOgzgkdBCyE6@postini.com; Tue, 10 May 2011 10:25:18 PDT Received: by pxi19 with SMTP id 19so5053099pxi.1 for ; Tue, 10 May 2011 10:25:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.34.7 with SMTP id v7mr11903561pbi.371.1305048317317; Tue, 10 May 2011 10:25:17 -0700 (PDT) Received: by 10.68.56.167 with HTTP; Tue, 10 May 2011 10:25:17 -0700 (PDT) Date: Tue, 10 May 2011 10:25:17 -0700 Message-ID: Subject: [PATCH] omap: iommu: fix pte attributes for super section From: "Anna, Suman" To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: tony@atomide.com, Hiroshi.DOYU@nokia.com Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 10 May 2011 17:25:20 +0000 (UTC) From 5796d8d8a0ea5aee342b78ca6ead229971cff6c5 Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Wed, 4 May 2011 17:45:37 -0500 Subject: [PATCH] omap: iommu: fix pte attributes for super section The PTE programming causes a 16MB entry to be interpreted as a 4K entry because of the bitwise check, and therefore does not set the attributes properly in the first-level descriptor table. The bitwise check has been replaced appropriately. Signed-off-by: Suman Anna Acked-by: Hiroshi DOYU --- arch/arm/mach-omap2/iommu2.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index adb083e..c21fbe6 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -225,7 +225,8 @@ static u32 omap2_get_pte_attr(struct iotlb_entry *e) attr = e->mixed << 5; attr |= e->endian; attr |= e->elsz >> 3; - attr <<= ((e->pgsz & MMU_CAM_PGSZ_4K) ? 0 : 6); + attr <<= (((e->pgsz == MMU_CAM_PGSZ_4K) || + (e->pgsz == MMU_CAM_PGSZ_64K)) ? 0 : 6); return attr; }