From: Terry Bowman <terry.bowman@amd.com>
To: <terry.bowman@amd.com>, <linux@roeck-us.net>,
<linux-watchdog@vger.kernel.org>, <jdelvare@suse.com>,
<linux-i2c@vger.kernel.org>, <wsa@kernel.org>,
<andy.shevchenko@gmail.com>, <rafael.j.wysocki@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <wim@linux-watchdog.org>,
<rrichter@amd.com>, <thomas.lendacky@amd.com>,
<sudheesh.mavila@amd.com>, <Nehal-bakulchandra.Shah@amd.com>,
<Basavaraj.Natikar@amd.com>, <Shyam-sundar.S-k@amd.com>,
<Mario.Limonciello@amd.com>
Subject: [PATCH v5 1/9] kernel/resource: Introduce request_mem_region_muxed()
Date: Wed, 9 Feb 2022 11:27:09 -0600 [thread overview]
Message-ID: <20220209172717.178813-2-terry.bowman@amd.com> (raw)
In-Reply-To: <20220209172717.178813-1-terry.bowman@amd.com>
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>
---
include/linux/ioport.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 8359c50f9988..ec5f71f7135b 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -262,6 +262,8 @@ resource_union(struct resource *r1, struct resource *r2, struct resource *r)
#define request_muxed_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), IORESOURCE_MUXED)
#define __request_mem_region(start,n,name, excl) __request_region(&iomem_resource, (start), (n), (name), excl)
#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name), 0)
+#define request_mem_region_muxed(start, n, name) \
+ __request_region(&iomem_resource, (start), (n), (name), IORESOURCE_MUXED)
#define request_mem_region_exclusive(start,n,name) \
__request_region(&iomem_resource, (start), (n), (name), IORESOURCE_EXCLUSIVE)
#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
--
2.30.2
next prev parent reply other threads:[~2022-02-09 17:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 17:27 [PATCH v5 0/9] i2c: piix4: Replace cd6h/cd7h port I/O accesses with MMIO accesses Terry Bowman
2022-02-09 17:27 ` Terry Bowman [this message]
2022-02-09 17:27 ` [PATCH v5 2/9] i2c: piix4: Replace hardcoded memory map size with a #define Terry Bowman
2022-02-09 17:27 ` [PATCH v5 3/9] i2c: piix4: Move port I/O region request/release code into functions Terry Bowman
2022-02-11 9:53 ` Jean Delvare
2022-02-11 14:42 ` Wolfram Sang
2022-02-11 15:00 ` Terry Bowman
2022-02-11 18:25 ` Terry Bowman
2022-02-15 8:37 ` Jean Delvare
2022-02-15 9:00 ` Wolfram Sang
2022-02-09 17:27 ` [PATCH v5 4/9] i2c: piix4: Move SMBus controller base address detect into function Terry Bowman
2022-02-09 17:27 ` [PATCH v5 5/9] i2c: piix4: Move SMBus port selection " Terry Bowman
2022-02-09 17:27 ` [PATCH v5 6/9] i2c: piix4: Add EFCH MMIO support to region request and release Terry Bowman
2022-02-09 17:27 ` [PATCH v5 7/9] i2c: piix4: Add EFCH MMIO support to SMBus base address detect Terry Bowman
2022-02-09 17:27 ` [PATCH v5 8/9] i2c: piix4: Add EFCH MMIO support for SMBus port select Terry Bowman
2022-02-09 17:27 ` [PATCH v5 9/9] i2c: piix4: Enable EFCH MMIO for Family 17h+ Terry Bowman
2022-02-10 21:49 ` [PATCH v5 0/9] i2c: piix4: Replace cd6h/cd7h port I/O accesses with MMIO accesses Wolfram Sang
2022-02-11 12:34 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220209172717.178813-2-terry.bowman@amd.com \
--to=terry.bowman@amd.com \
--cc=Basavaraj.Natikar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Nehal-bakulchandra.Shah@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=andy.shevchenko@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rafael.j.wysocki@intel.com \
--cc=rrichter@amd.com \
--cc=sudheesh.mavila@amd.com \
--cc=thomas.lendacky@amd.com \
--cc=wim@linux-watchdog.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox