Hi all,
This patch series contains fixes and cleanups for I/O accessors on m68k
platforms (with MMU).
The first patch contains small fixes without any dependencies.
Patches 2 and 3 make small adjustments to drivers that are dependencies
for further cleanup.
Patch 4 and 5 complete the cleanup.
Changes compared to v1:
- Move ARCH_HAS_IOREMAP_WT to fix "ioremap_wt redefined" warnings with
m5475evb defconfig,
- Add Acked-by.
Given the dependencies, I think it's easiest if the respective
maintainers would provide their Acked-by, so all patches can go in
through the m68k tree.
Thanks!
Geert Uytterhoeven (5):
m68k/io: Add missing ioremap define guards, fix typo
net: mac8390: Use standard memcpy_{from,to}io()
Input: hilkbd - Add casts to HP9000/300 I/O accessors
m68k/io: Move mem*io define guards to <asm/kmap.h>
m68k/io: Switch mmu variant to <asm-generic/io.h>
arch/m68k/include/asm/io.h | 7 +++++
arch/m68k/include/asm/io_mm.h | 42 +++--------------------------
arch/m68k/include/asm/io_no.h | 12 ---------
arch/m68k/include/asm/kmap.h | 9 ++++++-
drivers/input/keyboard/hilkbd.c | 4 +--
drivers/net/ethernet/8390/mac8390.c | 20 +++++++-------
6 files changed, 30 insertions(+), 64 deletions(-)
--
2.17.1
Gr{oetje,eeting}s,
Geert
Internally, hilkbd uses "unsigned long" I/O addresses everywhere.
This works fine as:
- On PA-RISC, hilkbd uses the gsc_{read,write}b() I/O accessors, which
take "unsigned long" addresses,
- On m68k, hilkbd uses {read,write}b(), which are currently mapped to
{in,out}_8(), and convert the passed addresses to pointers
internally.
However, the asm-generic version of {read,write}b() does not perform
such conversions, and requires passing pointers instead. Hence add
casts to prepare for switching m68k to the asm-generic version.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
This is a dependency for "m68k/io: Switch mmu variant to
<asm-generic/io.h>".
v2:
- No changes.
---
drivers/input/keyboard/hilkbd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
On Mon, Jul 09, 2018 at 11:30:38AM +0200, Geert Uytterhoeven wrote:
Internally, hilkbd uses "unsigned long" I/O addresses everywhere.
This works fine as:
- On PA-RISC, hilkbd uses the gsc_{read,write}b() I/O accessors, which
take "unsigned long" addresses,
- On m68k, hilkbd uses {read,write}b(), which are currently mapped to
{in,out}_8(), and convert the passed addresses to pointers
internally.
However, the asm-generic version of {read,write}b() does not perform
such conversions, and requires passing pointers instead. Hence add
casts to prepare for switching m68k to the asm-generic version.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
This is a dependency for "m68k/io: Switch mmu variant to
<asm-generic/io.h>".
v2:
- No changes.
---
drivers/input/keyboard/hilkbd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
The mem*io define guards are applicable to all users of <asm/kmap.h>.
Hence move them, and drop the #ifdef.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
To avoid redefined warnings, this depends on "net: mac8390: Use standard
memcpy_{from,to}io()".
v2:
- No changes.
---
arch/m68k/include/asm/io_no.h | 11 -----------
arch/m68k/include/asm/kmap.h | 3 +++
2 files changed, 3 insertions(+), 11 deletions(-)
- Add missing define guard for ioremap_wt(),
- Move ARCH_HAS_IOREMAP_WT from <asm/io_mm.h> to <asm/kmap.h>, as it
is applicable to Coldfire with MMU, too,
- Fix typo s/ioremap_fillcache/ioremap_fullcache/,
- Add define guard for iounmap() for consistency with other
architectures.
Fixes: 9746882f547d2f00 ("m68k: group io mapping definitions and functions")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2:
- Move ARCH_HAS_IOREMAP_WT to fix "ioremap_wt redefined" warnings with
m5475evb defconfig.
---
arch/m68k/include/asm/io_mm.h | 2 --
arch/m68k/include/asm/kmap.h | 6 +++++-
2 files changed, 5 insertions(+), 3 deletions(-)
The mac8390 driver defines its own variants of memcpy_fromio() and
memcpy_toio(), using similar implementations, but different function
signatures.
Remove the custom definitions of memcpy_fromio() and memcpy_toio(), and
adjust all callers to the standard signatures.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David S. Miller <davem@davemloft.net>
---
This is a dependency for "m68k: Move mem*io define guards to
<asm/kmap.h>".
Untested on real hardware, assembler output compared.
v2:
- Add Acked-by.
---
drivers/net/ethernet/8390/mac8390.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
@@ -725,13 +722,16 @@ static void sane_block_input(struct net_device *dev, int count,if(xfer_start+count>ei_status.rmem_end){/* We must wrap the input move. */intsemi_count=ei_status.rmem_end-xfer_start;-memcpy_fromio(skb->data,dev->mem_start+xfer_base,+memcpy_fromio(skb->data,+(void__iomem*)dev->mem_start+xfer_base,semi_count);count-=semi_count;-memcpy_fromio(skb->data+semi_count,ei_status.rmem_start,-count);+memcpy_fromio(skb->data+semi_count,+(void__iomem*)ei_status.rmem_start,count);}else{-memcpy_fromio(skb->data,dev->mem_start+xfer_base,count);+memcpy_fromio(skb->data,+(void__iomem*)dev->mem_start+xfer_base,+count);}}
The dummy functions defined in <asm/io_mm.h> can be provided by
<asm-generic/io.h>.
As nommu already uses <asm-generic/io.h>, move its inclusion to
<asm/io.h>, and add/adjust include guards where appropriate.
This gets rid of lots of "statement with no effect" and "unused
variable" warnings when compile-testing.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2:
- No changes.
---
arch/m68k/include/asm/io.h | 7 ++++++
arch/m68k/include/asm/io_mm.h | 40 +++--------------------------------
arch/m68k/include/asm/io_no.h | 1 -
3 files changed, 10 insertions(+), 38 deletions(-)
Hi Geert,
On 09/07/18 19:30, Geert Uytterhoeven wrote:
Hi all,
This patch series contains fixes and cleanups for I/O accessors on m68k
platforms (with MMU).
The first patch contains small fixes without any dependencies.
Patches 2 and 3 make small adjustments to drivers that are dependencies
for further cleanup.
Patch 4 and 5 complete the cleanup.
Changes compared to v1:
- Move ARCH_HAS_IOREMAP_WT to fix "ioremap_wt redefined" warnings with
m5475evb defconfig,
- Add Acked-by.
Given the dependencies, I think it's easiest if the respective
maintainers would provide their Acked-by, so all patches can go in
through the m68k tree.
Retested on ColdFire 5475, looks good.
For the whole series:
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Regards
Greg
On Tue, Jul 10, 2018 at 3:48 AM Greg Ungerer [off-list ref] wrote:
On 09/07/18 19:30, Geert Uytterhoeven wrote:
quoted
This patch series contains fixes and cleanups for I/O accessors on m68k
platforms (with MMU).
The first patch contains small fixes without any dependencies.
Patches 2 and 3 make small adjustments to drivers that are dependencies
for further cleanup.
Patch 4 and 5 complete the cleanup.
Changes compared to v1:
- Move ARCH_HAS_IOREMAP_WT to fix "ioremap_wt redefined" warnings with
m5475evb defconfig,
- Add Acked-by.
Given the dependencies, I think it's easiest if the respective
maintainers would provide their Acked-by, so all patches can go in
through the m68k tree.
Retested on ColdFire 5475, looks good.
For the whole series:
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Thanks, applied and queued for v4.19.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds