lkml.org 
[lkml]   [2020]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: About commit "io: change inX() to have their own IO barrier overrides"
From
Date
+ linux-arch

For background, see
https://lore.kernel.org/lkml/2e80d7bc-32a0-cc40-00a9-8a383a1966c2@huawei.com/

>>
>> So today only ARM64 uses it for this relevant code, above. But maybe
>> others in future will want to use it - any arch without native IO port
>> access is a candidate.
>
> I'm looking at Arnd here for help.
>
>>
>>>
>>> As long as the expectations are set, I see no reason why it shouldn't
>>> but, I'll let Arnd comment on it too.
>>
>> ok, so it looks reasonable consider replicating your change for ***, above.

To be clear, I would make this change in lib/logic_pio.c since
__io_pbr() can be overridden per-arch:

#define BUILD_LOGIC_IO(bw, type)
type logic_in##bw(unsigned long addr)
{
type ret = (type)~0;
if (addr < MMIO_UPPER_LIMIT) {
- ret = read##bw(PCI_IOBASE + addr);
+ __io_pbr();
+ ret = __raw_read##bw(PCI_IOBASE + addr);
+ __io_pbr();
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) {
struct logic_pio_hwaddr *entry = find_io_range(addr);

...

(forgetting leX_to_cpu for the moment)

>
> Arnd is the maintainer here. We should consult first.

ok, fine.

> I believe there is also a linux-arch mailing list. Going there with this
> question makes sense IMO.

Cheers,
John

\
 
 \ /
  Last update: 2020-03-03 14:19    [W:0.126 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site