All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Sakari Ailus <sakari.ailus-X3B1VOXEql0@public.gmane.org>,
	Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>
Subject: [PATCH v2 1/6] iommu/omap: Correct init value of iotlb_entry valid field
Date: Thu,  3 Apr 2014 22:01:33 +0200	[thread overview]
Message-ID: <1396555298-25246-2-git-send-email-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <1396555298-25246-1-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>

From: Suman Anna <s-anna-l0cyMroinI0@public.gmane.org>

The iotlb_entry field values are used directly in omap2_alloc_cr,
a function used in preparing the MMU_CAM and MMU_RAM registers.
The iotlb_entry.valid value is being set incorrectly to 1 at the
moment, and this would result in overriding the PAGESIZE bit field
of the MMU_CAM register if prefetching of the entries were to be
supported.

The bug has not caused any MMU faults due to incorrect size
programming so far as the prefetching is disabled by default. Fix
this by using the correct init value for the iotlb_entry.valid
field.

Signed-off-by: Suman Anna <s-anna-l0cyMroinI0@public.gmane.org>
---
 drivers/iommu/omap-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 8acea87..4716af1 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1043,7 +1043,7 @@ static u32 iotlb_init_entry(struct iotlb_entry *e, u32 da, u32 pa,
 
 	e->da		= da;
 	e->pa		= pa;
-	e->valid	= 1;
+	e->valid	= MMU_CAM_V;
 	/* FIXME: add OMAP1 support */
 	e->pgsz		= flags & MMU_CAM_PGSZ_MASK;
 	e->endian	= flags & MMU_RAM_ENDIAN_MASK;
-- 
1.8.3.2

  parent reply	other threads:[~2014-04-03 20:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03 20:01 [PATCH v2 0/6] OMAP IOMMU fixes Laurent Pinchart
2014-04-03 20:01 ` [PATCH v2 2/6] iommu/omap: Remove omap_iommu_domain_has_cap() function Laurent Pinchart
     [not found] ` <1396555298-25246-1-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-04-03 20:01   ` Laurent Pinchart [this message]
2014-04-03 20:01   ` [PATCH v2 3/6] iommu/omap: Move to_iommu definition from omap-iopgtable.h Laurent Pinchart
2014-04-03 20:01   ` [PATCH v2 4/6] iommu/omap: Fix 'no page for' debug message in flush_iotlb_page() Laurent Pinchart
     [not found]     ` <1396555298-25246-5-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-04-03 20:56       ` Suman Anna
2014-04-03 20:01   ` [PATCH v2 5/6] iommu/omap: Remove comment about supporting single page mappings only Laurent Pinchart
2014-04-03 21:02   ` [PATCH v2 0/6] OMAP IOMMU fixes Suman Anna
     [not found]     ` <533DCC51.60101-l0cyMroinI0@public.gmane.org>
2014-04-03 21:11       ` Suman Anna
2014-04-03 21:23       ` Laurent Pinchart
2014-04-03 20:01 ` [PATCH v2 6/6] iommu/omap: Fix map protection value handling Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396555298-25246-2-git-send-email-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
    --cc=florian.vaussard-p8DiymsW2f8@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sakari.ailus-X3B1VOXEql0@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.