aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-arm925.S
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-04-27 08:08:53 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-05-02 06:12:49 -0400
commitc5102f5935503ebebad46e137d0eef68f272cc16 (patch)
tree888332340ca07cbd2a648fa603b8b252af02252a /arch/arm/mm/proc-arm925.S
parent435a7ef52db7d86e67a009b36cac1457f8972391 (diff)
ARM: 7408/1: cacheflush: return error to userspace when flushing syscall fails
The cacheflush syscall can fail for two reasons: (1) The arguments are invalid (nonsensical address range or no VMA) (2) The region generates a translation fault on a VIPT or PIPT cache This patch allows do_cache_op to return an error code to userspace in the case of the above. The various coherent_user_range implementations are modified to return 0 in the case of VIVT caches or -EFAULT in the case of an abort on v6/v7 cores. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/proc-arm925.S')
-rw-r--r--arch/arm/mm/proc-arm925.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
index 9dccd9a365b3..ec5b1180994f 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.S
@@ -258,6 +258,7 @@ ENTRY(arm925_coherent_user_range)
258 cmp r0, r1 258 cmp r0, r1
259 blo 1b 259 blo 1b
260 mcr p15, 0, r0, c7, c10, 4 @ drain WB 260 mcr p15, 0, r0, c7, c10, 4 @ drain WB
261 mov r0, #0
261 mov pc, lr 262 mov pc, lr
262 263
263/* 264/*