[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af5f3d8390654abda295860c756cb687@AcuMS.aculab.com>
Date: Thu, 15 Apr 2021 16:10:33 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Niklas Schnelle' <schnelle@...ux.ibm.com>,
Arnd Bergmann <arnd@...db.de>
CC: Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
"clang-built-linux@...glegroups.com"
<clang-built-linux@...glegroups.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>
Subject: RE: [PATCH v2 1/2] sparc: explicitly set PCI_IOBASE to 0
From: Niklas Schnelle
> Sent: 15 April 2021 13:37
>
> Instead of relying on the fallback in asm-generic/io.h which sets
> PCI_IOBASE 0 if it is not defined set it explicitly.
>
> Link: https://lore.kernel.org/lkml/CAK8P3a3PK9zyeP4ymELtc2ZYnymECoACiigw9Za+pvSJpCk5=g@mail.gmail.com/
> Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> ---
> arch/sparc/include/asm/io.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
> index 2eefa526b38f..100992ba1317 100644
> --- a/arch/sparc/include/asm/io.h
> +++ b/arch/sparc/include/asm/io.h
> @@ -1,6 +1,10 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> #ifndef ___ASM_SPARC_IO_H
> #define ___ASM_SPARC_IO_H
> +
> +/* On LEON I/O Space is accessed through low iomem */
> +#define PCI_IOBASE ((void __iomem *)0)
> +
> #if defined(__sparc__) && defined(__arch64__)
> #include <asm/io_64.h>
> #else
> --
> 2.25.1
Not sure the comment is informative enough.
Maybe something like:
/*
* On LEON PCI addresses below 64k are converted to IO accesses.
* io_remap_xxx() (whatever is it called) returns a kernel virtual
* address in the PCI window so inb() doesn't need to add an offset.
*/
That'll save the next person doing a lot of digging.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists