Skip to content

Phasing out direct usage of asm/mmu.h on ARM

Lucas Stach barebox 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest27 patches 0 repliesNew
  2. v124 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- compile tested on MIPS and NIOS
- sync prototypes of the dma_coherent fucntion across all arches
- introduce DMA_ADDRESS_BROKEN in drivers that need fixing for arches without 1:1 virt:phys mapping

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27usb: gadget: include common.h in headerinclude/usb/gadget.h+1 -00 replies
2/27NIOS2: use dma_addr_t in dma_alloc_coherentarch/nios2/include/asm/dma-mapping.h arch/nios2/include/asm/types.h drivers/net/altera_tse.c+10 -70 replies
3/27MIPS: change dma_alloc/free_coherent to common prototypesarch/mips/include/asm/dma-mapping.h arch/mips/include/asm/dma.h+5 -30 replies
4/27ARM: move virt<->phys translation to io.harch/arm/include/asm/io.h arch/arm/include/asm/mmu.h+15 -120 replies
4/27ARM: change dma_alloc/free_coherent to match other architecturesarch/arm/cpu/mmu.c arch/arm/include/asm/mmu.h drivers/ata/ahci.c +21 more+98 -590 replies
5/27dma: add streaming DMA opsinclude/dma-dir.h include/dma.h+17 -00 replies
5/27ARM: move virt<->phys translation to io.harch/arm/include/asm/io.h arch/arm/include/asm/mmu.h+15 -120 replies
6/27dma: add streaming DMA opsinclude/dma-dir.h include/dma.h+17 -00 replies
6/27ARM: change dma_alloc/free_coherent to match other architecturesarch/arm/cpu/mmu.c arch/arm/include/asm/mmu.h drivers/ata/ahci.c +21 more+98 -590 replies
7/27ARM: move DMA alloc functions to dma.harch/arm/include/asm/dma.h arch/arm/include/asm/mmu.h drivers/ata/ahci.c +29 more+52 -380 replies
8/27ARM: implement streaming DMA opsarch/arm/cpu/mmu.c arch/arm/include/asm/dma.h+34 -00 replies
9/27AHCI: convert to streaming DMA opsdrivers/ata/ahci.c+10 -30 replies
10/27MCI: dw-mmc: convert to streaming DMA opsdrivers/mci/Kconfig drivers/mci/dw_mmc.c+13 -130 replies
11/27MCI: imx: convert to streaming DMA opsdrivers/mci/imx-esdhc.c+17 -110 replies
12/27MCI: tegra-sdmmc: convert to streaming DMA opsdrivers/mci/tegra-sdmmc.c+14 -120 replies
13/27net: arc-emac: convert to streaming DMA opsdrivers/net/arc_emac.c+10 -60 replies
14/27net: cpsw: convert to streaming DMA opsdrivers/net/cpsw.c+7 -40 replies
15/27net: at91_ether: convert to streaming DMA opsdrivers/net/at91_ether.c+8 -20 replies
16/27net: davinci_emac: convert to streaming DMA opsdrivers/net/davinci_emac.c+5 -40 replies
17/27net: designware: convert to streaming DMA opsdrivers/net/designware.c+11 -80 replies
18/27net: fec: convert to streaming DMA opsdrivers/net/fec_imx.c+9 -40 replies
19/27net: macb: convert to streaming DMA opsdrivers/net/macb.c+6 -20 replies
20/27net: orion-gbe: convert to streaming DMA opsdrivers/net/orion-gbe.c+8 -50 replies
21/27net: rtl8169: convert to streaming DMA opsdrivers/net/Kconfig drivers/net/rtl8169.c+14 -170 replies
22/27net: xgmac: convert to streaming DMA opsdrivers/net/xgmac.c+8 -30 replies
23/27usb: gadget: fsl_udc: convert to streaming DMA opsdrivers/usb/gadget/fsl_udc.c+4 -40 replies
24/27usb: host: ehci: convert to streaming DMA opsdrivers/usb/host/ehci-hcd.c+5 -30 replies
25/27usb: host: ohci: convert to streaming DMA opsdrivers/usb/host/ohci-hcd.c+6 -40 replies
26/27ARM: bcm2835: mbox: convert to streaming DMA opsarch/arm/mach-bcm2835/mbox.c+5 -30 replies
27/27ARM: MMU: unexport cache maintenance functionsarch/arm/cpu/mmu.c arch/arm/include/asm/mmu.h+14 -350 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/27] Phasing out direct usage of asm/mmu.h on ARM

This series introduces to Barebox the streaming DMA ops and implements them for the ARM architecture. This will make it a lot easier to get common cache maintenance operations for all architectures and in turn allows for wider reuse of driver across architectures.

I've tested this on a Tegra124 which is known to fall over in all sorts of funny ways if cache maintenance is broken. No odd behavior spotted.

The series is bisect-clean and I've compile tested it on some defconfigs, but please go wild and TEST. I'll take any complaints.

Changes since RFT:
- rebased to current master
- now compile tested on all ARM defconfigs
- fixed a few compile errors by reordering stuff in patches
- A few more words in commit logs

Changes since v1:
- compile tested on MIPS and NIOS
- sync prototypes of the dma_coherent fucntion across all arches
- introduce DMA_ADDRESS_BROKEN in drivers that need fixing for arches without 1:1 virt:phys mapping

Regards,
Lucas

Lucas Stach (27):
usb: gadget: include common.h in header
NIOS2: use dma_addr_t in dma_alloc_coherent
MIPS: change dma_alloc/free_coherent to common prototypes
ARM: change dma_alloc/free_coherent to match other architectures
ARM: move virt<->phys translation to io.h
dma: add streaming DMA ops
ARM: move DMA alloc functions to dma.h
ARM: implement streaming DMA ops
AHCI: convert to streaming DMA ops
MCI: dw-mmc: convert to streaming DMA ops
MCI: imx: convert to streaming DMA ops
MCI: tegra-sdmmc: convert to streaming DMA ops
net: arc-emac: convert to streaming DMA ops
net: cpsw: convert to streaming DMA ops
net: at91_ether: convert to streaming DMA ops
net: davinci_emac: convert to streaming DMA ops
net: designware: convert to streaming DMA ops
net: fec: convert to streaming DMA ops
net: macb: convert to streaming DMA ops
net: orion-gbe: convert to streaming DMA ops
net: rtl8169: convert to streaming DMA ops
net: xgmac: convert to streaming DMA ops
usb: gadget: fsl_udc: convert to streaming DMA ops
usb: host: ehci: convert to streaming DMA ops
usb: host: ohci: convert to streaming DMA ops
ARM: bcm2835: mbox: convert to streaming DMA ops
ARM: MMU: unexport cache maintenance functions

 arch/arm/cpu/mmu.c                    | 55 +++++++++++++++++++++++------------
 arch/arm/include/asm/dma.h            | 35 +++++++++++++++++++++-
 arch/arm/include/asm/io.h             | 15 ++++++++++
 arch/arm/include/asm/mmu.h            | 45 ----------------------------
 arch/arm/mach-bcm2835/mbox.c          |  8 +++--
 arch/mips/include/asm/dma-mapping.h   |  6 ++--
 arch/mips/include/asm/dma.h           |  2 +-
 arch/nios2/include/asm/dma-mapping.h  | 13 +++++----
 arch/nios2/include/asm/types.h        |  2 ++
 drivers/ata/ahci.c                    | 29 ++++++++++++------
 drivers/dma/apbh_dma.c                |  5 ++--
 drivers/mci/Kconfig                   |  2 +-
 drivers/mci/dw_mmc.c                  | 28 +++++++++---------
 drivers/mci/imx-esdhc.c               | 28 +++++++++++-------
 drivers/mci/tegra-sdmmc.c             | 26 +++++++++--------
 drivers/mtd/nand/nand_mxs.c           |  7 +++--
 drivers/net/Kconfig                   |  1 +
 drivers/net/altera_tse.c              |  3 +-
 drivers/net/arc_emac.c                | 23 ++++++++++-----
 drivers/net/at91_ether.c              | 17 ++++++++---
 drivers/net/cpsw.c                    | 11 ++++---
 drivers/net/davinci_emac.c            |  9 +++---
 drivers/net/designware.c              | 26 ++++++++++-------
 drivers/net/fec_imx.c                 | 18 ++++++++----
 drivers/net/macb.c                    | 19 ++++++++----
 drivers/net/mvneta.c                  |  7 +++--
 drivers/net/orion-gbe.c               | 20 ++++++++-----
 drivers/net/rtl8139.c                 |  1 +
 drivers/net/rtl8169.c                 | 35 ++++++++++------------
 drivers/net/xgmac.c                   | 20 +++++++++----
 drivers/spi/mxs_spi.c                 |  1 -
 drivers/usb/gadget/fsl_udc.c          | 18 +++++++-----
 drivers/usb/host/ehci-hcd.c           | 15 ++++++----
 drivers/usb/host/ohci-hcd.c           | 20 ++++++++-----
 drivers/usb/host/xhci-hcd.c           |  8 ++---
 drivers/usb/host/xhci-hub.c           |  1 -
 drivers/video/atmel_hlcdfb.c          |  1 -
 drivers/video/atmel_lcdfb.c           |  1 -
 drivers/video/atmel_lcdfb_core.c      |  7 +++--
 drivers/video/imx-ipu-fb.c            |  4 ++-
 drivers/video/imx-ipu-v3/ipu-common.c |  1 -
 drivers/video/imx-ipu-v3/ipufb.c      |  5 ++--
 drivers/video/omap.c                  |  7 +++--
 drivers/video/pxa.c                   |  9 +++---
 include/dma-dir.h                     |  6 ++++
 include/dma.h                         | 13 +++++++++
 include/usb/gadget.h                  |  1 +
 47 files changed, 389 insertions(+), 245 deletions(-)
 create mode 100644 include/dma-dir.h
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox