]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sif: fmr: invalidate keys before TLB bulk invalidates
authorKnut Omang <knut.omang@oracle.com>
Wed, 10 Aug 2016 11:07:55 +0000 (13:07 +0200)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 12 Aug 2016 19:18:11 +0000 (12:18 -0700)
commita27fbc4c36eec52e8af8152ce96862d8d31be71e
tree3d7712bd1c68befe9fe6859b6ef97f9d5aca188f
parent90cfc81e42e599c139ffe6d12ce61febecdc1077
sif: fmr: invalidate keys before TLB bulk invalidates

This commit reorders and sequentializes the cleanup phase when
bulk invalidates are used. The order was to post the TLB flushing
operation to the EPSC, then invalidate keys (potentially in parallel with the
ongoing flushing) before finally waiting for the TLB flushing to complete.
This way is not considered safe in general, as an incoming access to a key
can cause an invalidated PTE or PTW to be cached again and later cause
sif to read or write to a no longer valid location.

This commit makes sure that all keys are invalidated before
the TLB flushing is triggered.

Orabug: 24438867

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