From: Will Deacon Date: Fri, 27 Apr 2012 12:08:53 +0000 (+0100) Subject: ARM: 7408/1: cacheflush: return error to userspace when flushing syscall fails X-Git-Tag: sz_161~84 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9868546c7ac8c49847fe8145283f0e5eb33b776c;p=pandora-kernel.git 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 Signed-off-by: Will Deacon Signed-off-by: Russell King --- Reading git-diff-tree failed