ARM: 7917/1: cacheflush: correctly limit range of memory region being flushed
ARM: 7917/1: cacheflush: correctly limit range of memory region being flushed

The __do_cache_op function operates with a 'chunk' size of one page
but fails to limit the size of the final chunk so as to not exceed
the specified memory region. Fix this.

Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org>
Reported-by: Christian Gmeiner <7d98dcb0e8545320ffc03d45630c91ed21ec4c41@gmail.com>
Tested-by: Christian Gmeiner <7d98dcb0e8545320ffc03d45630c91ed21ec4c41@gmail.com>
Acked-by: Will Deacon <b913f13ef92ac157955c954ccaaff7be065faba4@arm.com>
Signed-off-by: Jon Medhurst <90cd1a2bf502062a09a1a38db4b5d470886df04b@linaro.org>
Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs