powerpc: uaccess s/might_sleep/might_fault/
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 26 May 2013 14:31:38 +0000 (17:31 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 May 2013 07:41:09 +0000 (09:41 +0200)
commit1af1717dbf96eba8a74a2d6a99e75a7795075a02
tree6e77e8dc8c1ba17c10d41504663aa5302e41dc41
parent3837a3cfe4a27836e0e9f207eb2d4f00b5a8fcba
powerpc: uaccess s/might_sleep/might_fault/

The only reason uaccess routines might sleep
is if they fault. Make this explicit.

Arnd Bergmann suggested that the following code
if (!is_kernel_addr((unsigned long)__pu_addr))
might_fault();
can be further simplified by adding a version of might_fault
that includes the kernel addr check.

Will be considered as a further optimization in future.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1369577426-26721-7-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/powerpc/include/asm/uaccess.h