From patchwork Wed Jan 13 12:18:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hiroshi DOYU X-Patchwork-Id: 72616 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0DCIoE3031474 for ; Wed, 13 Jan 2010 12:18:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752410Ab0AMMSt (ORCPT ); Wed, 13 Jan 2010 07:18:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753201Ab0AMMSt (ORCPT ); Wed, 13 Jan 2010 07:18:49 -0500 Received: from smtp.nokia.com ([192.100.105.134]:29815 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752410Ab0AMMSs (ORCPT ); Wed, 13 Jan 2010 07:18:48 -0500 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0DCHKoJ024359; Wed, 13 Jan 2010 06:18:43 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 13 Jan 2010 14:18:33 +0200 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 13 Jan 2010 14:18:32 +0200 Received: from localhost (esdhcp040246.research.nokia.com [172.21.40.246]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0DCISsM004541; Wed, 13 Jan 2010 14:18:29 +0200 Date: Wed, 13 Jan 2010 14:18:28 +0200 (EET) Message-Id: <20100113.141828.59662176.Hiroshi.DOYU@nokia.com> To: linux-omap@vger.kernel.org Cc: hnagalla@ti.com, saaguirre@ti.com Subject: Re: [PATCH 1/3] omap iommu: cleanup iommu page address mask and definitions From: Hiroshi DOYU In-Reply-To: <20100113.085252.226801492.Hiroshi.DOYU@nokia.com> References: <1263195995-23244-1-git-send-email-Hiroshi.DOYU@nokia.com> <20100113.085252.226801492.Hiroshi.DOYU@nokia.com> X-Mailer: Mew version 6.2 on Emacs 22.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 X-OriginalArrivalTime: 13 Jan 2010 12:18:33.0013 (UTC) FILETIME=[86002E50:01CA944A] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From 0f299c722404f367733da07125b6e4b6c722432b Mon Sep 17 00:00:00 2001 From: Hiroshi DOYU Date: Fri, 8 Jan 2010 18:54:25 +0200 Subject: [PATCH 3/3] omap iommu: fix incorrect address for supersection 1st entry From: Hiroshi DOYU There was a potential risk that the following "memset" could override its range if a given address was not the 1st entry of a supersection. This is not the case for "iovmm". Signed-off-by: Hiroshi DOYU Signed-off-by: Hari Nagalla --- arch/arm/plat-omap/iommu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index ccf25b3..ce0072a 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c @@ -667,7 +667,7 @@ static size_t iopgtable_clear_entry_core(struct iommu *obj, u32 da) if ((*iopgd & IOPGD_SUPER) == IOPGD_SUPER) { nent *= 16; /* rewind to the 1st entry */ - iopgd = (u32 *)((u32)iopgd & IOSUPER_MASK); + iopgd = iopgd_offset(obj, (da & IOSUPER_MASK)); } bytes *= nent; } -- 1.6.0.4