linux/arch/parisc/lib
Linus Walleij 77bfc8bdb5
parisc: Remove 64bit access on 32bit machines
The parisc was using some readq/writeq accessors without special
considerations as to what will happen on 32bit CPUs if you do
this. Maybe we have been lucky that it "just worked" on 32bit
due to the compiler behaviour, or the code paths were never
executed.

Fix the two offending code sites like this:

arch/parisc/lib/iomap.c:

- Put ifdefs around the 64bit accessors and make sure
  that ioread64, ioread64be, iowrite64 and iowrite64be
  are not available on 32bit builds.

- Also fold in a bug fix where 64bit access was by
  mistake using 32bit writel() accessors rather
  than 64bit writeq().

drivers/parisc/sba_iommu.c:

- Access any 64bit registers using _lo_hi-semantics by way
  of the readq and writeq operations provided by
  <linux/io-64-nonatomic-lo-hi.h>

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-09-10 09:55:55 +02:00
..
bitops.c parisc: mark xchg functions notrace 2021-11-01 07:36:00 +01:00
checksum.c unify generic instances of csum_partial_copy_nocheck() 2020-08-20 15:45:14 -04:00
delay.c
io.c
iomap.c parisc: Remove 64bit access on 32bit machines 2022-09-10 09:55:55 +02:00
lusercopy.S parisc: Implement __get/put_kernel_nofault() 2021-09-09 22:53:09 +02:00
Makefile Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" 2021-08-29 10:13:32 -07:00
memcpy.c parisc: Use constants to encode the space registers like SR_KERNEL 2022-03-11 19:49:31 +01:00
memset.c Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" 2021-08-29 10:13:32 -07:00
ucmpdi2.c