Skip to content

Commit

Permalink
iommu/omap: Correct init value of iotlb_entry valid field
Browse files Browse the repository at this point in the history
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@ti.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  • Loading branch information
Suman Anna authored and Laurent Pinchart committed Apr 16, 2014
1 parent c9eaa44 commit d760e3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/omap-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,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;
Expand Down

0 comments on commit d760e3e

Please sign in to comment.