Bug #2017
closedKernel compilation failure in sys/dev/sound/pci/hda/hdac.c
0%
Description
Trying to update to the latest -2.9 with a custom kernel, the compilation fails
with this error messages:
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -std=c99 -g -nostdinc
-I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include
-I/usr/obj/usr/src/sys/BADAXE64 -I"/usr/src/sys/dev/acpica5"
-I"/usr/src/sys/contrib/dev/acpica-unix/include" -I/usr/src/sys/contrib/ipfilter
-I/usr/src/sys/dev/netif/ath/hal -I/usr/src/sys/dev/netif/ath/hal/ath_hal
-D_KERNEL -include opt_global.h -finline-limit=8000 --param
inline-unit-growth=100 --param large-function-growth=1000 -fno-common
-ffreestanding -mpreferred-stack-boundary=4 -mcmodel=kernel -mno-red-zone
-mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3
-mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a -mno-sse5 -mno-abm -mno-aes
-mno-avx -mno-pclmul -mno-popcnt -msoft-float -fno-asynchronous-unwind-tables
-fno-omit-frame-pointer /usr/src/sys/dev/sound/pci/hda/hdac.c -Werror
cc1: warnings being treated as errors
/usr/src/sys/dev/sound/pci/hda/hdac.c: In function 'hdac_dma_alloc':
/usr/src/sys/dev/sound/pci/hda/hdac.c:1415: error: overflow in implicit constant
conversion
- Error code 1
System architecture is x86_64.
My custom kernel configuration file contains the following two lines at the end:
device pcm
device snd_hda
Apart from the above additions and a commented out APIC_IO line, it is identical
to X86_64_GENERIC_SMP
Files
Updated by matthiasr almost 14 years ago
The attached patch fixes this problem for me on master in VirtualBox 4.0.4
(DragonFly 2.9-DEVELOPMENT DragonFly v2.9.1.826.g04458-DEVELOPMENT #1: Sat Mar
5 10:49:13 CET 2011 root@:/usr/obj/usr/src/sys/X86_64_GENERIC_SMP_HDA
x86_64)
The kernel boots fine and the sound device is attached (dmesg snippet:
pcm0.pci0.pcib0.legacy0.nexus0.root0
pcm0: <Intel 82801F High Definition Audio Controller> [tentative] mem
0xf0804000-0xf0807fff irq 5 at device 5.0 on pci0
pcm0: Reserved 0x4000 bytes for rid 0x10 type 3 at 0xf0804000
pcm0: <Intel 82801F High Definition Audio Controller> [attached!] mem
0xf0804000-0xf0807fff irq 5 at device 5.0 on pci0
) and cat /dev/urandom > /dev/dsp makes noise as expected.
Updated by ftigeot almost 14 years ago
On Sat, Mar 05, 2011 at 05:10:31PM +0000, Matthias Rampke (via DragonFly issue tracker) wrote:
Matthias Rampke <matthias.rampke@googlemail.com> added the comment:
The attached patch fixes this problem for me on master in VirtualBox 4.0.4
(DragonFly 2.9-DEVELOPMENT DragonFly v2.9.1.826.g04458-DEVELOPMENT #1: Sat Mar
5 10:49:13 CET 2011 root@:/usr/obj/usr/src/sys/X86_64_GENERIC_SMP_HDA
x86_64)The kernel boots fine and the sound device is attached (dmesg snippet:
I had a more complete look at bus_dma_tag_create() this morning. It really
expects an argument of type bus_addr_t.
I'm afraid your changes only work by chance; the new attached patch should
fix this issue in a more sustainable way.
Updated by swildner almost 14 years ago
Fix by ftigeot committed (2fd48618254abc265450db2cd792752ad6ad82ec)
Thanks!