lkml.org 
[lkml]   [2018]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how to fix acpi_pci_root_remap_iospace?
On Thu, Aug 16, 2018 at 11:10:33PM +0200, Arnd Bergmann wrote:
> Another way would be to add
>
> #include <asm-generic/io.h>
> +#undef PCI_IOBASE
>
> in your asm/io.h. This is about as ugly as the your version, but
> it would be local to ia64 ;-)

Third way ...


Is "0" actually the right value for PCI_IOBASE for some platform?

#ifndef PCI_IOBASE
#define PCI_IOBASE ((void __iomem *)0)
#endif

Or is this just here to make sure that:

static inline u8 inb(unsigned long addr)
{
u8 val;

__io_pbr();
val = __raw_readb(PCI_IOBASE + addr);
__io_par();
return val;
}

etc. Do not throw errors?

Should we really just enclose all of inb, inw, inl, ...
inside of:

#ifdef PCI_IOBASE

... all those static functions that use PCI_IOBASE ...

#endif


-Tony

\
 
 \ /
  Last update: 2018-08-17 01:28    [W:0.055 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site