diff options
-rw-r--r-- | drivers/iommu/omap-iommu.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 3aad2e34cbab..966093a2fcf5 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
@@ -253,6 +253,7 @@ static struct cr_regs __iotlb_read_cr(struct iommu *obj, int n) | |||
253 | * @obj: target iommu | 253 | * @obj: target iommu |
254 | * @e: an iommu tlb entry info | 254 | * @e: an iommu tlb entry info |
255 | **/ | 255 | **/ |
256 | #ifdef PREFETCH_IOTLB | ||
256 | static int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e) | 257 | static int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e) |
257 | { | 258 | { |
258 | int err = 0; | 259 | int err = 0; |
@@ -310,6 +311,20 @@ out: | |||
310 | return err; | 311 | return err; |
311 | } | 312 | } |
312 | 313 | ||
314 | #else /* !PREFETCH_IOTLB */ | ||
315 | |||
316 | static int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e) | ||
317 | { | ||
318 | return 0; | ||
319 | } | ||
320 | |||
321 | #endif /* !PREFETCH_IOTLB */ | ||
322 | |||
323 | static int prefetch_iotlb_entry(struct iommu *obj, struct iotlb_entry *e) | ||
324 | { | ||
325 | return load_iotlb_entry(obj, e); | ||
326 | } | ||
327 | |||
313 | /** | 328 | /** |
314 | * flush_iotlb_page - Clear an iommu tlb entry | 329 | * flush_iotlb_page - Clear an iommu tlb entry |
315 | * @obj: target iommu | 330 | * @obj: target iommu |
@@ -663,10 +678,8 @@ int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e) | |||
663 | 678 | ||
664 | flush_iotlb_page(obj, e->da); | 679 | flush_iotlb_page(obj, e->da); |
665 | err = iopgtable_store_entry_core(obj, e); | 680 | err = iopgtable_store_entry_core(obj, e); |
666 | #ifdef PREFETCH_IOTLB | ||
667 | if (!err) | 681 | if (!err) |
668 | load_iotlb_entry(obj, e); | 682 | prefetch_iotlb_entry(obj, e); |
669 | #endif | ||
670 | return err; | 683 | return err; |
671 | } | 684 | } |
672 | EXPORT_SYMBOL_GPL(iopgtable_store_entry); | 685 | EXPORT_SYMBOL_GPL(iopgtable_store_entry); |