[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <877eivjnky.fsf@concordia.ellerman.id.au>
Date: Sat, 06 Oct 2018 21:56:13 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Logan Gunthorpe <logang@...tatee.com>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
linux-ntb@...glegroups.com, linux-crypto@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Horia Geantă <horia.geanta@....com>,
Logan Gunthorpe <logang@...tatee.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Suresh Warrier <warrier@...ux.vnet.ibm.com>,
Nicholas Piggin <npiggin@...il.com>
Subject: Re: [PATCH v22 3/6] iomap: introduce io{read|write}64_{lo_hi|hi_lo}
Logan Gunthorpe <logang@...tatee.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@...tatee.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Suresh Warrier <warrier@...ux.vnet.ibm.com>
> Cc: Nicholas Piggin <npiggin@...il.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@...erman.id.au> (powerpc)
cheers
Powered by blists - more mailing lists