]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/uaccess: Refactor user_{read/write/}_access_begin()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 24 Dec 2025 11:20:52 +0000 (12:20 +0100)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 7 Jan 2026 04:01:04 +0000 (09:31 +0530)
commit704f4300315396af94e26ec0127ff0cd3fd309bf
tree6dba167ad2ce9fd3ba64b8b2911ddadb99b8dd9a
parent5458989a0e48c2bd51a7d37a04ff6ae489fe5458
powerpc/uaccess: Refactor user_{read/write/}_access_begin()

user_read_access_begin() and user_write_access_begin() and
user_access_begin() are now very similar. Create a common
__user_access_begin() that takes direction as parameter.

In order to avoid a warning with the conditional call of
barrier_nospec() which is sometimes an empty macro, change it to a
do {} while (0).

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/2b4f9d4e521e0b56bf5cb239916b4a178c4d2007.1766574657.git.chleroy@kernel.org
arch/powerpc/include/asm/barrier.h
arch/powerpc/include/asm/uaccess.h