Hi Vegard,

On Mon, Feb 15, 2016 at 11:41 AM, Vegard Nossum
<vegard.nos...@oracle.com> wrote:
> Some platforms don't have DMA, but we should still be able to build
> USB drivers for these platforms. They could still be used through
> vhci_hcd, usbip_host, or maybe something like USB passthrough in UML
> from a capable host.
>
> This is admittedly ugly with the #ifdefs, but those are necessary to
> get around linker errors like these:
>
> drivers/built-in.o: In function `dma_unmap_sg_attrs':
> include/linux/dma-mapping.h:183: undefined reference to `bad_dma_ops'
> drivers/built-in.o: In function `dma_unmap_single_attrs':
> include/linux/dma-mapping.h:148: undefined reference to `bad_dma_ops'
> drivers/built-in.o: In function `dma_map_sg_attrs':
> include/linux/dma-mapping.h:168: undefined reference to `bad_dma_ops'
> drivers/built-in.o: In function `dma_map_page':
> include/linux/dma-mapping.h:196: undefined reference to `bad_dma_ops'
> drivers/built-in.o: In function `dma_mapping_error':
> include/linux/dma-mapping.h:430: undefined reference to `bad_dma_ops'
> drivers/built-in.o:include/linux/dma-mapping.h:131: more undefined references 
> to `bad_dma_ops' follow
>
> Greg KG suggested just defining these for UML [1] but according to
> Richard Weinberger this has come up before and it was decided not to
> do that just for the sake of making drivers build [2].
>
> [1]: http://www.spinics.net/lists/linux-usb/msg136306.html
> [2]: http://www.spinics.net/lists/linux-usb/msg136308.html
>
> If any of the new warnings trigger, the correct solution is almost
> certainly to add a CONFIG_HAS_DMA dependency in the Kconfig menu for
> the responsible driver -- that driver's functions will hopefully
> appear somewhere in the stack trace.
>
> v2: Reduce the number of #ifdefs by moving code out into helpers.
>
> Signed-off-by: Vegard Nossum <vegard.nos...@oracle.com>

I have an even smaller patch that I've been updating over the years to
compile allmodconfig/allyesconfig kernels for m68k/Sun-3.

I'll clean it up and send it...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to