sparc64: Handle extremely large kernel TSB range flushes sanely.
authorDavid S. Miller <davem@davemloft.net>
Wed, 26 Oct 2016 02:43:17 +0000 (19:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Nov 2016 09:06:41 +0000 (10:06 +0100)
commit2ba06323db413dd0b8f501dfc32df5d55f17c520
tree2d41f9a219e822fed3d453ef4f8e9cf47da39f03
parent75931800733c68082c530f6c5421928e4288ee9e
sparc64: Handle extremely large kernel TSB range flushes sanely.

[ Upstream commit 849c498766060a16aad5b0e0d03206726e7d2fa4 ]

If the number of pages we are flushing is more than twice the number
of entries in the TSB, just scan the TSB table for matches rather
than probing each and every page in the range.

Based upon a patch and report by James Clarke.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sparc/mm/tsb.c