On Thu, 2021-12-30 at 16:44 +1300, Michael Schmitz wrote:
> Hi Arnd,
>
> Am 30.12.2021 um 14:48 schrieb Arnd Bergmann:
> > On Tue, Dec 28, 2021 at 11:15 PM Michael Schmitz
> > wrote:
> > > Am 29.12.2021 um 16:41 schrieb Arnd Bergmann:
> > > > On Tue, Dec 28, 2021 at 8:20 PM Michael Schmitz
> >
: Arnd Bergmann
Signed-off-by: Niklas Schnelle
---
arch/alpha/Kconfig | 1 +
arch/arc/Kconfig| 1 +
arch/arm/Kconfig| 1 +
arch/arm64/Kconfig | 1 +
arch/ia64/Kconfig | 1 +
arch/m68k/Kconfig | 1 +
arch/microblaze/Kconfig | 1 +
arch/mips/Kconfig | 1
From: Niklas Schnelle
Without MMU support PCI_IOBASE is left undefined because PCI_IO_END is
VMEMMAP_START. Nevertheless the in*()/out*() helper macros are left
defined with uses of PCI_IOBASE.
At the moment this only compiles because asm-generic/io.h defines
PCI_IOBASE as 0 if it is undefined
ng by letting inb() and
friends fail with WARN_ONCE() and a 0xff... return in case PCI_IOBASE is
not defined.
Link:
https://lore.kernel.org/lkml/2021042759.2059976-1-schne...@linux.ibm.com/
Signed-off-by: Niklas Schnelle
---
v5 -> v6:
- Added memset to insb()/insw()/insl() in WARN_ONCE()
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
---
arch/sparc/include/asm/io.h | 8
t for
nds32 and ARC).
Changes since v1:
- Added patch to explicitly set PCI_IOBASE to 0 on sparc as suggested by
Arnd Bergmann
- Instead of working around the warning with a uintptr_t PCI_IOBASE make
inb() and friends explicitly WARN_ONCE() and return 0xff... (Arnd
Bergmann)
Niklas Schnel
ng by letting inb() and
friends fail with WARN_ONCE() and a 0xff... return in case PCI_IOBASE is
not defined.
Link:
https://lore.kernel.org/lkml/2021042759.2059976-1-schne...@linux.ibm.com/
Signed-off-by: Niklas Schnelle
---
include/asm-generic/io.h | 65 +-
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
---
arch/sparc/include/asm/io.h | 8
From: Niklas Schnelle
Without MMU support PCI_IOBASE is left undefined because PCI_IO_END is
VMEMMAP_START. Nevertheless the in*()/out*() helper macros are left
defined with uses of PCI_IOBASE.
At the moment this only compiles because asm-generic/io.h defines
PCI_IOBASE as 0 if it is undefined
ptr_t PCI_IOBASE make
inb() and friends explicitly WARN_ONCE() and return 0xff... (Arnd
Bergmann)
Niklas Schnelle (3):
sparc: explicitly set PCI_IOBASE to 0
risc-v: Use generic io.h helpers for nommu
asm-generic/io.h: warn in inb() and friends with undefined PCI_IOBASE
arch/riscv/include/asm/io.h
From: Niklas Schnelle
Without MMU support PCI_IOBASE is left undefined because PCI_IO_END is
VMEMMAP_START. Nevertheless the in*()/out*() helper macros are left
defined with uses of PCI_IOBASE.
At the moment this only compiles because asm-generic/io.h defines
PCI_IOBASE as 0 if it is undefined
ng by letting inb() and
friends fail with WARN_ONCE() and a 0xff... return in case PCI_IOBASE is
not defined.
Link:
https://lore.kernel.org/lkml/2021042759.2059976-1-schne...@linux.ibm.com/
Signed-off-by: Niklas Schnelle
---
include/asm-generic/io.h | 65 +-
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
---
arch/sparc/include/asm/io.h | 8
ptr_t PCI_IOBASE make
inb() and friends explicitly WARN_ONCE() and return 0xff... (Arnd
Bergmann)
Niklas Schnelle (3):
sparc: explicitly set PCI_IOBASE to 0
risc-v: Use generic io.h helpers for nommu
asm-generic/io.h: warn in inb() and friends with undefined PCI_IOBASE
arch/riscv/include/asm/io.h
On Mon, 2021-05-03 at 18:07 +0200, Arnd Bergmann wrote:
> On Fri, Apr 30, 2021 at 1:16 PM Niklas Schnelle
> wrote:
> > From: Niklas Schnelle
> >
> > This is version 4 of my attempt to get rid of a clang
> > -Wnull-pointer-arithmetic warning for the use of PCI_
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
---
arch/sparc/include/asm/io.h | 8
From: Niklas Schnelle
Hi,
This is version 4 of my attempt to get rid of a clang
-Wnull-pointer-arithmetic warning for the use of PCI_IOBASE in
asm-generic/io.h. This was originally found on s390 but should apply to
all platforms leaving PCI_IOBASE undefined while making use of the inb()
and
ng by letting inb() and
friends fail with WARN_ONCE() and a 0xff... return in case PCI_IOBASE is
not defined.
Signed-off-by: Niklas Schnelle
---
include/asm-generic/io.h | 65 +---
1 file changed, 61 insertions(+), 4 deletions(-)
diff --git a/include/asm-generic
From: Niklas Schnelle
Without MMU support PCI_IOBASE is left undefined because PCI_IO_END is
VMEMMAP_START. Nevertheless the in*()/out*() helper macros are left
defined with uses of PCI_IOBASE. At the moment this only compiles
because asm-generic/io.h defines PCI_IOBASE as 0 if it is undefined
On Wed, 2021-04-21 at 11:24 +, David Laight wrote:
> From: Niklas Schnelle
> > Sent: 21 April 2021 12:18
> >
> > When PCI_IOBASE is not defined, it is set to 0 such that it is ignored
> > in calls to the readX/writeX primitives. This triggers clang's
> >
()
and friends explicitly WARN_ONCE() and return 0xff... (Arnd Bergmann)
Niklas Schnelle (3):
sparc: explicitly set PCI_IOBASE to 0
ARC: io.h: Include asm/bug.h
asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on
PCI_IOBASE
arch/arc/include/asm/io.h | 1 +
arch/sparc
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
---
v1 -> v2:
- Improved comment (Da
Make things explicit and silence the warning by letting inb() and
friends fail with WARN_ONCE() and a 0xff... return in case PCI_IOBASE is
not defined.
Signed-off-by: Niklas Schnelle
---
v2 -> v3:
- Added ifdefs to ioport_map() and __pci_ioport_map() since apparently at least
test config
From: Niklas Schnelle
In a future change asm-generic/io.h will make inb() and friends
WARN_ONCE() on systems without I/O port support. This requires
WARN_ONCE() from asm/bug.h to be included so include it in the
arch specific io.h as done by other architectures.
Signed-off-by: Niklas Schnelle
24 matches
Mail list logo