]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: fmr: call sif_post_flush_tlb with ptw flush and in SR/IOV cases
authorKnut Omang <knut.omang@oracle.com>
Tue, 19 Jul 2016 05:54:45 +0000 (07:54 +0200)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Wed, 27 Jul 2016 17:24:22 +0000 (10:24 -0700)
Flush the ptw cache as part of the bulk tlb flush.

With the introduction of more dynamic page tables,
the code to distinguish between the two types of cases,
simple page table entries and entries with interior nodes
was simplified because we no longer always know if PTW entries
have been consumed. Unfortunately the code was unified to the
wrong case which does not flush the ptw cache possibly causing
cache entries to remain in the cache and theoretically have
sif look up pages that no longer exists or that has been reused
for other purposes.

Also now that the EPSC handles the tlb flushing, it is just fine
to call that code even in virtualized setups.
Remove tests for whether VFs exists or we are running in a VF.

Orabug: 24315529

Signed-off-by: Knut Omang <knut.omang@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
drivers/infiniband/hw/sif/sif_fmr.c

index 79ec9adc6926469b0539c140681e8f266be08643..bb88476fa5ba40e409260e1d40ab1743b1d43f6b 100644 (file)
@@ -169,15 +169,13 @@ int sif_unmap_phys_fmr_list(struct list_head *fmr_list)
                                sdev->ki_spqp.pool_sz);
        }
 
-       if (!sdev->is_vf && sdev->num_vfs == 0) {
-               /* Check if we should do a brute force whole MMU caches flush (PF only) */
-               list_for_each_entry(ib_fmr, fmr_list, list) {
-                       cnt++;
-                       if (cnt >= sif_fmr_cache_flush_threshold) {
-                               ret = sif_post_flush_tlb(sdev, false);
-                               flush_all = true;
-                               goto key_to_invalid;
-                       }
+       /* Check if we should do a brute force whole MMU caches flush */
+       list_for_each_entry(ib_fmr, fmr_list, list) {
+               cnt++;
+               if (cnt >= sif_fmr_cache_flush_threshold) {
+                       ret = sif_post_flush_tlb(sdev, true);
+                       flush_all = true;
+                       goto key_to_invalid;
                }
        }