unresolved symbols in snd_page_alloc in 2.6.5
In building 2.6.5 on an Ultra 2, I stumbled across a problem in the snd_page_alloc module, and more specifically sound/core/memalloc.c.
When the kernel compiled, snd_page_alloc was returning two unresolved symbols, pci_alloc_consistent and pci_free_consistent.
I looked around the code a bit, trying to make some sense of it, and the result is the attached patch. It does compile and load without any arguments, but whether it is the right way to fix this I'm not sure. cs4231 doesn't seem to output any sound, but then again it didn't with 2.6.4 either, so that may be another issue (since it happens both with PCI and SBUS based Ultras).
This also applies to sparc32, and seems to work about the same there as well. amd7930 is in need of more work though.
Signature · 2 lines
Jason Wever Gentoo/Sparc Team Co-Lead
core/memalloc.c renamed from core/memalloc.c.orig +10 -0
@@ -94,8 +94,13 @@ {if (dev)return dma_alloc_coherent (dev, size, dma_handle, flags); +#ifdef CONFIG_SBUS + else /* crude sbus hack */ + return sbus_alloc_consistent(NULL, size, dma_handle); +#else else /* FIXME: dma_alloc_coherent does't always accept dev=NULL */ return pci_alloc_consistent(NULL, size, dma_handle); +#endif } static void snd_dma_free_coherent1(struct device *dev, size_t size, void *dma_addr,
@@ -103,8 +108,13 @@ {if (dev)return dma_free_coherent (dev, size, dma_addr, dma_handle); +#ifdef CONFIG_SBUS + else /* crude sbus hack */ + return sbus_free_consistent(NULL, size, dma_addr, dma_handle); +#else else return pci_free_consistent(NULL, size, dma_addr, dma_handle); +#endif }#undef dma_alloc_coherent