kernel/resource: Introduce request_mem_region_muxed()
authorTerry Bowman <terry.bowman@amd.com>
Wed, 9 Feb 2022 17:27:09 +0000 (11:27 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 May 2022 07:57:22 +0000 (09:57 +0200)
commit879e811a41f8d3fc9294380d4663cb72f6d00208
treea89d972c5e51122fc7e13891b26222cab99466fe
parentfc2bee93e31bbba920e9eeba76af72264ced066f
kernel/resource: Introduce request_mem_region_muxed()

commit 27c196c7b73cb70bbed3a9df46563bab60e63415 upstream.

Support for requesting muxed memory region is implemented but not
currently callable as a macro. Add the request muxed memory
region macro.

MMIO memory accesses can be synchronized using request_mem_region() which
is already available. This call will return failure if the resource is
busy. The 'muxed' version of this macro will handle a busy resource by
using a wait queue to retry until the resource is available.

Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Cc: Mario Limonciello <Mario.Limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ioport.h