arm64/Kconfig: introduce GENERIC_ISA_DMA
PATCH 1/1 arm64/Kconfig: introduce GENERIC_ISA_DMA
From: huanglei <[email protected]>
Enable GENERIC_ISA_DMA feature on arm64 platform, thus, request_dma and free_dma interface can be export. and driver modules can use the this interfaces on arm64 platform.
Currently, many pcie parallel port drivers still use these interfaces when ported to arm64 platform.
--- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/Kconfig +3 -0
@@ -367,6 +367,9 @@ config GENERIC_CSUM config GENERIC_CALIBRATE_DELAY def_bool y +config GENERIC_ISA_DMA + def_bool y + config SMP def_bool y
Signature · 1 line
2.17.1
Will Deacon
maintainerQuoted 9 lines · On Fri, Oct 25, 2024 at 09:16:41AM +0800, huanglei814 wrote:
From: huanglei <[email protected]>
Enable
GENERIC_ISA_DMAfeature on arm64 platform, thus,request_dmaandfree_dmainterface can be export. and driver modules can use the this interfaces on arm64 platform.Currently, many pcie parallel port drivers still use these interfaces when ported to arm64 platform.
Why has it taken so long for anybody to notice?
Quoted 10 lines
Signed-off-by huanglei <[email protected]>--- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/Kconfig +0
-0
arch/arm64/Kconfig config GENERIC_CSUM · line 372
Quoted 6 lines
arch/arm64/Kconfig +3
-0@@ -367,6 +367,9 @@ config GENERIC_CSUM config GENERIC_CALIBRATE_DELAY def_bool y +config GENERIC_ISA_DMA + def_bool y +
Does this actually do anything without MAX_DMA_CHANNELS defined?
Will
Even if MAX_SMA_CANNELS is not defined, as long as GENETIC-SIA_DMA is enabled, request_rma/free_rma function will also be exported, and other modules using these two interfaces will not encounter link errors.
I don't know why others haven't noticed, but I discovered it when debugging pcie parallel port drivers. And the arm/Kconfig has been around for a long time.
Best regards!
Quoted 33 lines · Will Deacon
Quoted 9 lines · On Fri, Oct 25, 2024 at 09:16:41AM +0800, huanglei814 wrote:
From: huanglei <[email protected]>
Enable
GENERIC_ISA_DMAfeature on arm64 platform, thus,request_dmaandfree_dmainterface can be export. and driver modules can use the this interfaces on arm64 platform.Currently, many pcie parallel port drivers still use these interfaces when ported to arm64 platform.
Why has it taken so long for anybody to notice?
Quoted 10 lines
Signed-off-by huanglei <[email protected]>--- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/Kconfig +0
-0arch/arm64/Kconfig config GENERIC_CSUM · line 372
Quoted 6 lines
arch/arm64/Kconfig +3
-0@@ -367,6 +367,9 @@ config GENERIC_CSUM config GENERIC_CALIBRATE_DELAY def_bool y +config GENERIC_ISA_DMA + def_bool y +Does this actually do anything without
MAX_DMA_CHANNELSdefined?Will
There was a slight word spelling error in the previous reply, Now correct it.
Even if MAX_DMA_CHANNELS is not defined, as long as GENERIC_ISA_DMA is enabled, request_dma/free_dma function will also be exported, and other modules using these two interfaces will not encounter link errors.
I don't know why others haven't noticed, but I discovered it when debugging pcie parallel port drivers. And the arm/Kconfig has been around for a long time.
Best regards!
Quoted 34 lines
Quoted 33 lines · Will Deacon
Quoted 9 lines · On Fri, Oct 25, 2024 at 09:16:41AM +0800, huanglei814 wrote:
From: huanglei <[email protected]>
Enable
GENERIC_ISA_DMAfeature on arm64 platform, thus,request_dmaandfree_dmainterface can be export. and driver modules can use the this interfaces on arm64 platform.Currently, many pcie parallel port drivers still use these interfaces when ported to arm64 platform.
Why has it taken so long for anybody to notice?
Quoted 10 lines
Signed-off-by huanglei <[email protected]>--- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/Kconfig +0
-0arch/arm64/Kconfig config GENERIC_CSUM · line 372
Quoted 6 lines
arch/arm64/Kconfig +3
-0@@ -367,6 +367,9 @@ config GENERIC_CSUM config GENERIC_CALIBRATE_DELAY def_bool y +config GENERIC_ISA_DMA + def_bool y +Does this actually do anything without
MAX_DMA_CHANNELSdefined?Will
Will Deacon
maintainerQuoted 8 lines · huanglei
Even if
MAX_SMA_CANNELSis not defined, as long as GENETIC-SIA_DMA is enabled, request_rma/free_rma function will also be exported, and other modules using these two interfaces will not encounter link errors.I don't know why others haven't noticed, but I discovered it when debugging pcie parallel port drivers. And the arm/Kconfig has been around for a long time.
Please try to avoid top-posting in replies, as it makes the conversation very hard to follow.
Quoted 33 lines
Quoted 26 lines · Will Deacon
Quoted 9 lines · On Fri, Oct 25, 2024 at 09:16:41AM +0800, huanglei814 wrote:
From: huanglei <[email protected]>
Enable
GENERIC_ISA_DMAfeature on arm64 platform, thus,request_dmaandfree_dmainterface can be export. and driver modules can use the this interfaces on arm64 platform.Currently, many pcie parallel port drivers still use these interfaces when ported to arm64 platform.
Why has it taken so long for anybody to notice?
Quoted 13 lines
Signed-off-by huanglei <[email protected]>--- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/Kconfig +0
-0@@ -367,6 +367,9 @@ config GENERIC_CSUM config GENERIC_CALIBRATE_DELAY def_bool yQuoted 5 lines
arch/arm64/Kconfig config GENERIC_CSUM · line 372
Quoted 3 lines
arch/arm64/Kconfig +3
-0+config GENERIC_ISA_DMA + def_bool y +Does this actually do anything without
MAX_DMA_CHANNELSdefined?
Quoted 4 lines
Even if
MAX_SMA_CANNELSis not defined, as long as GENETIC-SIA_DMA is enabled, request_rma/free_rma function will also be exported, and other modules using these two interfaces will not encounter link errors.
Do the drivers do anything useful after they've linked? Can you please provide some in-tree examples of drivers that can be used on arm64 only once GENERIC_ISA_DMA is selected? If they just need some stubs for request_dma() and free_dma(), then it feels to me like that should be the default implementation, rather than having to select something to get them.
Will
Quoted 7 lines · Will Deacon
Quoted 5 lines · huanglei
Even if
MAX_SMA_CANNELSis not defined, as long as GENETIC-SIA_DMA is enabled, request_rma/free_rma function will also be exported, and other modules using these two interfaces will not encounter link errors.
Quoted 6 lines
Do the drivers do anything useful after they've linked? Can you please provide some in-tree examples of drivers that can be used on arm64 only once
GENERIC_ISA_DMAis selected? If they just need some stubs forrequest_dma()andfree_dma(), then it feels to me like that should be the default implementation, rather than having to select something to get them.
GENERIC_ISA_DMA does nothing by iself, there also needs to be an iplementation of CONFIG_ISA_DMA_API in order to use DMA mode on floppy/parport/soundblaster.
I think this should not be enabled by the architecture itself, but by the LPC host driver that provides the ISA style DMA. Most LPC implementations don't have this, and most arm64 machines have no LPC or PC104 at all.
Note that PCI-ISA bridges can sometimes provide ISA devices, but ISA DMA won't work behind a PCIe bridge.
The patch also needs a better changelog text to explain specifically which arm64 platform has PC style DMA support, and what devices are connected to it.
Arnd