[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdE-xRHDEfmmURtoak6+4Vga4szLnDkGjtJHm47DZRCAQ@mail.gmail.com>
Date: Mon, 31 Jul 2017 20:58:25 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Logan Gunthorpe <logang@...tatee.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux-Arch <linux-arch@...r.kernel.org>,
linux-ntb@...glegroups.com,
linux-crypto <linux-crypto@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Horia Geantă <horia.geanta@....com>,
Stephen Bates <sbates@...thlin.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Suresh Warrier <warrier@...ux.vnet.ibm.com>,
Nicholas Piggin <npiggin@...il.com>
Subject: Re: [PATCH v5 3/6] iomap: introduce io{read|write}64_{lo_hi|hi_lo}
On Mon, Jul 31, 2017 at 7:31 PM, Logan Gunthorpe <logang@...tatee.com> wrote:
> On 31/07/17 10:10 AM, Andy Shevchenko wrote:
>> Some drivers (hardware) would like to have non-atomic MMIO accesses
>> when readq() defined
>
> Huh? But that's the whole point of the io64-nonatomic header. If a
> driver wants a specific non-atomic access they should just code two 32
> bit accesses.
You mean to call them directly as lo_hi_XXX() or hi_lo_XXX() ?
Yes it would work.
>> In case of readq() / writeq() it's defined by the order of inclusion:
>>
>> 1)
>> include <...non-atomic...>
>> include <linux/io.h>
>>
>> Always non-atomic will be used.
>
> I'm afraid you're wrong about this. The io-64-nonatomic-xx header
> includes linux/io.h. Thus the order of the includes doesn't matter and
> it will always auto switch. In any case, making an interface do
> different things depending on the order of include files is *completely*
> insane.
Yes, you are right. I was thinking about something unrelated.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists