CVS compile issue
Kernel is 2.6.12-RT-V0.7.51-28.
CC [M] /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o
In file included from /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.c:1:
/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c: In function 'snd_ac97_resume':
/smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2252: sorry, unimplemented: called from here /smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2264: sorry, unimplemented: called from here make[4]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o] Error 1
make[3]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97] Error 2
make[2]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci] Error 2
make[1]: *** [_module_/smb/rlrevell/cvs/alsa/alsa-driver] Error 2
make[1]: Leaving directory `/smb/rlrevell/kernel-source/linux-2.6.12-c3'
make: *** [compile] Error 2
Lee
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-driver/pci/au88x0/au88x0.c?r1=1.6&r2=1.7&sortby=date&diff_format=u
* fixed the DMA allocation.
pci_set_dma_mask() is called together with pci_set_consistent_dma_mask(). also clean up the double check of mask.
http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-driver/pci/au88x0/au88x0.c?r1=1.8&r2=1.9&sortby=date&diff_format=u
* added snd_card_set_dev() macro.
* sysfsfied more pci, isapnp and usb drivers.
These patches to alsa-driver (related to kernel 2.6) are missing when the au88x0 merged into alsa-kernel.
http://cvs.sourceforge.net/viewcvs.py/*checkout*/alsa/alsa-kernel/pci/au88x0/au88x0.c?rev=1.18
Quoted 16 lines · Lee Revell
Kernel is 2.6.12-RT-V0.7.51-28.
CC [M] /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o
In file included from /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.c:1:
/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c: In function 'snd_ac97_resume':
/smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2252: sorry, unimplemented: called from here /smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2264: sorry, unimplemented: called from here make[4]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o] Error 1
make[3]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97] Error 2
make[2]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci] Error 2
make[1]: *** [_module_/smb/rlrevell/cvs/alsa/alsa-driver] Error 2
make[1]: Leaving directory `/smb/rlrevell/kernel-source/linux-2.6.12-c3'
make: *** [compile] Error 2
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
There is a "division by zero" warning for drivers which include "driver.h" on Kernel 2.4
gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include -I/lib/modules/2.4.22-1.2199.nptl/build/include -O2 -mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include /lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
-DKBUILD_BASENAME=intel8x0 -c -o intel8x0.o intel8x0.c
In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,
from intel8x0.c:29:
/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero
gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include -I/lib/modules/2.4.22-1.2199.nptl/build/include -O2 -mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include /lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
-DKBUILD_BASENAME=au8830 -c -o au8830.o au8830.c
In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,
from pci-ids.h:1,
from au8830.c:1:/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero
Quoted 16 lines · Lee Revell
Kernel is 2.6.12-RT-V0.7.51-28.
CC [M] /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o
In file included from /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.c:1:
/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c: In function 'snd_ac97_resume':
/smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2252: sorry, unimplemented: called from here /smb/rlrevell/cvs/alsa/alsa-driver/include/adriver.h:644: sorry, unimplemented: inlining failed in call to 'msecs_to_jiffies': function body not available /smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:2264: sorry, unimplemented: called from here make[4]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97/ac97_codec.o] Error 1
make[3]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci/ac97] Error 2
make[2]: *** [/smb/rlrevell/cvs/alsa/alsa-driver/pci] Error 2
make[1]: *** [_module_/smb/rlrevell/cvs/alsa/alsa-driver] Error 2
make[1]: Leaving directory `/smb/rlrevell/kernel-source/linux-2.6.12-c3'
make: *** [compile] Error 2
Quoted 2 lines
Lee
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
At Thu, 11 Aug 2005 19:17:12 +0800,
Quoted 14 lines · Raymond
There is a "division by zero" warning for drivers which include "
driver.h" on Kernel 2.4gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include
(quoted diff) +0
-5-I/lib/modules/2.4.22-1.2199.nptl/build/include -O2 -mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
-DKBUILD_BASENAME=intel8x0 -c -o intel8x0.ointel8x0.c
In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,
Quoted 3 lines
from intel8x0.c:29:/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero
Is it the line:
else if (HZ > 1000 && !(HZ % 1000))
==> return (j + (HZ / 1000) - 1)/(HZ / 1000);
?? Where HZ is defined/declared in your kernel?
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Quoted 5 lines · Takashi Iwai
Quoted 4 lines · Raymond
There is a "division by zero" warning for drivers which include "
driver.h" on Kernel 2.4
Quoted 8 lines
Quoted 2 lines
/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zeroIs it the line:
else if (HZ > 1000 && !(HZ % 1000))==> return (j + (HZ / 1000) - 1)/(HZ / 1000);
?? Where HZ is defined/declared in your kernel?
The HZ definition is OK. The problem is that gcc complains even when the code gets optimized away.
The equivalent code in the 2.6 kernel uses #if, but that wouldn't work with the SuSE kernels where HZ is a variable.
Regards,
Clemens
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
At Thu, 11 Aug 2005 16:08:17 +0200 (METDST),
Quoted 11 lines · Clemens Ladisch
Quoted 8 lines · Takashi Iwai
Quoted 6 lines · Raymond
There is a "division by zero" warning for drivers which include "
driver.h" on Kernel 2.4/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zero
Quoted 8 lines
Quoted 5 lines
Is it the line:
else if (HZ > 1000 && !(HZ % 1000))==> return (j + (HZ / 1000) - 1)/(HZ / 1000);
?? Where HZ is defined/declared in your kernel?
The HZ definition is OK. The problem is that gcc complains even when the code gets optimized away.
Ah, OK. It's a gcc bug then :)
Quoted 2 lines
The equivalent code in the 2.6 kernel uses #if, but that wouldn't work with the SuSE kernels where HZ is a variable.
How about to add #ifdef HZ and provide two version?
#ifdef HZ
static inline jiffies_to_msec() {
#if HZ >= 1000...
#endif
}
#else /* !HZ */
static inline jiffies_to_msec() {
if (HZ >= 1000) ...
}#endif /* HZ */
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Quoted 8 lines · Takashi Iwai
Quoted 2 lines · Clemens Ladisch
The equivalent code in the 2.6 kernel uses #if, but that wouldn't work with the SuSE kernels where HZ is a variable.
How about to add #ifdef HZ and provide two version?
#ifdef HZ
This wouldn't work if there is a "#define HZ some_variable".
I've now fixed it in CVS with some evil preprocessor magic. ("#if HZ > 0").
Regards,
Clemens
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Quoted 22 lines · Takashi Iwai
At Thu, 11 Aug 2005 19:17:12 +0800,
Quoted 13 lines · Raymond
There is a "division by zero" warning for drivers which include "
driver.h" on Kernel 2.4gcc32 -D__KERNEL__ -DMODULE=1 -I/alsa/cvs/alsa-driver/include
(quoted diff) +0
-5-I/lib/modules/2.4.22-1.2199.nptl/build/include -O2 -mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/modversions.h
-DKBUILD_BASENAME=intel8x0 -c -o intel8x0.ointel8x0.c
In file included from /alsa/cvs/alsa-driver/include/sound/driver.h:42,Quoted 3 lines
from intel8x0.c:29:/alsa/cvs/alsa-driver/include/adriver.h: In function `jiffies_to_msecs':
/alsa/cvs/alsa-driver/include/adriver.h:639: warning: division by zeroIs it the line:
Quoted 4 lines
else if (HZ > 1000 && !(HZ % 1000))==> return (j + (HZ / 1000) - 1)/(HZ / 1000);
??
Yes
Quoted 2 lines
Where HZ is defined/declared in your kernel?
Fedora Core 1
/usr/src/linux/include/asm/param.h
#ifndef HZ
#define HZ 100
#endif
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf