From: Michael Ellerman <mpe@ellerman.id.au>
To: Logan Gunthorpe <logang@deltatee.com>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-ntb@googlegroups.com, linux-crypto@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Horia Geantă" <horia.geanta@nxp.com>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Paul Mackerras" <paulus@samba.org>,
"Suresh Warrier" <warrier@linux.vnet.ibm.com>,
"Nicholas Piggin" <npiggin@gmail.com>
Subject: Re: [PATCH v22 3/6] iomap: introduce io{read|write}64_{lo_hi|hi_lo}
Date: Sat, 06 Oct 2018 21:56:13 +1000 [thread overview]
Message-ID: <877eivjnky.fsf@concordia.ellerman.id.au> (raw)
Message-ID: <20181006115613.sXwQgP7Mcs5e3G4pDuJ43N1_HEV4wwv6ordAw9hR4jM@z> (raw)
In-Reply-To: <20181002224108.3321-4-logang@deltatee.com>
Logan Gunthorpe <logang@deltatee.com> writes:
> In order to provide non-atomic functions for io{read|write}64 that will
> use readq and writeq when appropriate. We define a number of variants
> of these functions in the generic iomap that will do non-atomic
> operations on pio but atomic operations on mmio.
>
> These functions are only defined if readq and writeq are defined. If
> they are not, then the wrappers that always use non-atomic operations
> from include/linux/io-64-nonatomic*.h will be used.
>
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Suresh Warrier <warrier@linux.vnet.ibm.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> ---
> arch/powerpc/include/asm/io.h | 2 +
> include/asm-generic/iomap.h | 22 ++++++
> lib/iomap.c | 132 ++++++++++++++++++++++++++++++++++
> 3 files changed, 156 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
> index e0331e754568..20fe5d7515db 100644
> --- a/arch/powerpc/include/asm/io.h
> +++ b/arch/powerpc/include/asm/io.h
> @@ -798,8 +798,10 @@ extern void __iounmap_at(void *ea, unsigned long size);
>
> #define mmio_read16be(addr) readw_be(addr)
> #define mmio_read32be(addr) readl_be(addr)
> +#define mmio_read64be(addr) readq_be(addr)
> #define mmio_write16be(val, addr) writew_be(val, addr)
> #define mmio_write32be(val, addr) writel_be(val, addr)
> +#define mmio_write64be(val, addr) writeq_be(val, addr)
> #define mmio_insb(addr, dst, count) readsb(addr, dst, count)
> #define mmio_insw(addr, dst, count) readsw(addr, dst, count)
> #define mmio_insl(addr, dst, count) readsl(addr, dst, count)
For the powerpc part:
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
next prev parent reply other threads:[~2018-10-06 18:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 22:41 [PATCH v22 0/6] Add io{read|write}64 to io-64-atomic headers Logan Gunthorpe
2018-10-02 22:41 ` Logan Gunthorpe
2018-10-02 22:41 ` [PATCH v22 1/6] iomap: Use non-raw io functions for io{read|write}XXbe Logan Gunthorpe
2018-10-02 22:41 ` Logan Gunthorpe
2018-10-02 22:41 ` [PATCH v22 2/6] parisc: iomap: introduce io{read|write}64 Logan Gunthorpe
2018-10-02 22:41 ` Logan Gunthorpe
2018-10-02 22:41 ` [PATCH v22 3/6] iomap: introduce io{read|write}64_{lo_hi|hi_lo} Logan Gunthorpe
2018-10-02 22:41 ` Logan Gunthorpe
2018-10-06 11:56 ` Michael Ellerman [this message]
2018-10-06 11:56 ` Michael Ellerman
2018-10-02 22:41 ` [PATCH v22 4/6] io-64-nonatomic: add io{read|write}64[be]{_lo_hi|_hi_lo} macros Logan Gunthorpe
2018-10-02 22:41 ` Logan Gunthorpe
2018-10-02 22:41 ` [PATCH v22 5/6] ntb: ntb_hw_intel: use io-64-nonatomic instead of in-driver hacks Logan Gunthorpe
2018-10-02 22:41 ` Logan Gunthorpe
2018-10-02 22:41 ` [PATCH v22 6/6] ntb: ntb_hw_switchtec: Cleanup 64bit IO defines to use the common header Logan Gunthorpe
2018-10-02 22:41 ` Logan Gunthorpe
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=877eivjnky.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=gregkh@linuxfoundation.org \
--cc=horia.geanta@nxp.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.com \
--cc=logang@deltatee.com \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
--cc=warrier@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).