Skip to contentSkip to conversation

CONFIG_VIRT_TO_BUS: what about bus_to_virt?

PATCH New Stefan Richter 2 participants 3 messages Jul 21, 2007

lore
Share & tools
lore
#0 lore raw

Is it sensible and safe to let a driver which uses bus_to_virt (but not virt_to_bus) depend on CONFIG_VIRT_TO_BUS? Thanks,

Signature · 3 lines
Stefan Richter
-=====-=-=== -=== =-=-=
http://arcgraph.de/sr/
#1 lore raw
Quoted 3 lines · On Sat, 21 Jul 2007 11:52:18 +0200 Stefan Richter <[email protected]>…

Is it sensible and safe to let a driver which uses bus_to_virt (but not virt_to_bus) depend on CONFIG_VIRT_TO_BUS?

If a driver depends on either bus_to_virt or virt_to_bus, then it depend on CONFIG_VIRT_TO_BUS. The intention is to exclude the driver from being built on achitectures that don't implement those primitives (and architectures always implement them both or neither).

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#2 lore raw

PATCH 1/1 ieee1394: sbp2: more correct Kconfig dependencies

Make the option SBP2_PHYS_DMA available on all architectures where it compiles. This includes x86-64 where I runtime-tested it successfully.

---

CONFIG_VIRT_TO_BUS is nice. Thanks Stephen.

drivers/ieee1394/Kconfig +1 -1
@@ -97,7 +97,7 @@ config IEEE1394_SBP2
 
 config IEEE1394_SBP2_PHYS_DMA
 	bool "Enable replacement for physical DMA in SBP2"
-	depends on IEEE1394 && IEEE1394_SBP2 && EXPERIMENTAL && (X86_32 || PPC_32)
+	depends on IEEE1394_SBP2 && VIRT_TO_BUS && EXPERIMENTAL
 	help
 	  This builds sbp2 for use with non-OHCI host adapters which do not
 	  support physical DMA or for when ohci1394 is run with phys_dma=0.
Signature · 3 lines
Stefan Richter
-=====-=-=== -=== =-=-=
http://arcgraph.de/sr/