was sound problem, now kernel building problem

was sound problem, now kernel building problem

Post by Brian Lov » Tue, 13 Nov 2001 09:54:11



I posted a few days ago looking for help getting sound to work on my new
RedHat 7.1 installation.  I had already tried ALSA with no success.
However one possible reason that route failed is I did not recompile the
kernel.  I am now following the kernel-HOWTO to try and recompile my
kernel.

I believe I only made 2 changes to my kernel configuration in
xconfig/menuconfig:
- I included support for DOS file systems (including Win95 and NTFS)
- in the sound section, it was including Creative Ensoniq AudioPCI 97
(ES1371).  However, my machine has an Intel ICH (on-board) i8xx AC'97
sound support.  My intent initially was to turn off all sound support
except "soundcore".  But when I saw this error, I decided to try
switching the sound support to the correct hardware, and not using ALSA
at all.

After saving this new config, I ran 'make dep' and 'make clean' and
finally 'make bzImage'.  That chugged for a while, but then it quit with
an error in smp.c -- actually tons of warnings and errors (see output
below)!  The initial problem seems to be in the initialization of the
array cpu_tlbstate, which uses a syntax I am unfamiliar with:
struct tlb_state cpu_tlbstate[NR_CPUS] = {[0 ... NR_CPUS-1] = {
&init_mm, 0 }};

What's going on here?

Brian Love

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -fno-common -Wno-unused -pipe
-mpreferred-stack-boundary=2 -march=i686    -c -o smp.o smp.c
smp.c:402:24: macro "flush_tlb_all" passed 1 arguments, but takes just 0

smp.c:106: elements of array `cpu_tlbstate' have incomplete type
smp.c:106: warning: excess elements in struct initializer
smp.c:106: warning: (near initialization for `cpu_tlbstate[0]')
smp.c:106: warning: excess elements in struct initializer
smp.c:106: warning: (near initialization for `cpu_tlbstate[0]')
smp.c: In function `__send_IPI_shortcut':
smp.c:138: warning: implicit declaration of function
`apic_wait_icr_idle'
smp.c:148: warning: implicit declaration of function `apic_write_around'

smp.c: In function `leave_mm':
smp.c:225: invalid use of undefined type `struct tlb_state'
smp.c:225: `TLBSTATE_OK' undeclared (first use in this function)
smp.c:225: (Each undeclared identifier is reported only once
smp.c:225: for each function it appears in.)
smp.c:227: invalid use of undefined type `struct tlb_state'
smp.c: In function `smp_invalidate_interrupt':
smp.c:291: invalid use of undefined type `struct tlb_state'
smp.c:292: invalid use of undefined type `struct tlb_state'
smp.c:292: `TLBSTATE_OK' undeclared (first use in this function)
smp.c:300: warning: implicit declaration of function `ack_APIC_irq'
smp.c: At top level:
smp.c:359: redefinition of `flush_tlb_mm'
/usr/src/linux/include/asm/pgalloc.h:35: `flush_tlb_mm' previously
defined here
smp.c:373: redefinition of `flush_tlb_page'
/usr/src/linux/include/asm/pgalloc.h:42: `flush_tlb_page' previously
defined here
smp.c: In function `do_flush_tlb_all_local':
smp.c:393: invalid use of undefined type `struct tlb_state'
smp.c:393: `TLBSTATE_LAZY' undeclared (first use in this function)
smp.c: At top level:
smp.c:403: syntax error before `{'
smp.c:406: warning: type defaults to `int' in declaration of
`do_flush_tlb_all_local'
smp.c:406: warning: function declaration isn't a prototype
smp.c:406: conflicting types for `do_flush_tlb_all_local'
smp.c:389: previous declaration of `do_flush_tlb_all_local'
smp.c:406: warning: data definition has no type or storage class
smp.c:407: parse error before `}'
smp.c:442: parse error before `{'
smp.c:460: parse error before `if'
smp.c:463: warning: type defaults to `int' in declaration of `data'
smp.c:463: warning: initialization makes integer from pointer without a
cast
smp.c:463: warning: data definition has no type or storage class
smp.c:465: parse error before `->'
smp.c:474: parse error before `&'
smp.c:478: warning: type defaults to `int' in declaration of `call_data'

smp.c:478: conflicting types for `call_data'
smp.c:434: previous declaration of `call_data'
smp.c:478: initializer element is not constant
smp.c:478: warning: data definition has no type or storage class
smp.c:480: parse error before `0xfb'
smp.c:480: warning: type defaults to `int' in declaration of
`send_IPI_allbutself'
smp.c:480: warning: function declaration isn't a prototype
smp.c:480: conflicting types for `send_IPI_allbutself'
smp.c:152: previous declaration of `send_IPI_allbutself'
smp.c:480: warning: data definition has no type or storage class
smp.c:495: parse error before `void'
smp.c: In function `stop_this_cpu':
smp.c:505: invalid lvalue in unary `&'
smp.c:507: warning: implicit declaration of function
`disable_local_APIC'
smp.c:508: subscripted value is neither array nor pointer
smp.c: In function `smp_send_stop':
smp.c:520: invalid lvalue in assignment
smp.c: In function `smp_call_function_interrupt':
smp.c:539: invalid type argument of `->'
smp.c:540: invalid type argument of `->'
smp.c:541: invalid type argument of `->'
smp.c:549: invalid type argument of `->'
smp.c:556: invalid type argument of `->'
make[1]: *** [smp.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.2/arch/i386/kernel'
make: *** [_dir_arch/i386/kernel] Error 2

 
 
 

was sound problem, now kernel building problem

Post by Dave Alle » Tue, 13 Nov 2001 10:37:16



> After saving this new config, I ran 'make dep' and 'make clean' and
> finally 'make bzImage'.  That chugged for a while, but then it quit with
> an error in smp.c -- actually tons of warnings and errors (see output
> below)!  The initial problem seems to be in the initialization of the
> array cpu_tlbstate, which uses a syntax I am unfamiliar with:
> struct tlb_state cpu_tlbstate[NR_CPUS] = {[0 ... NR_CPUS-1] = {
> &init_mm, 0 }};

Did you make mrproper before the make config.

I do not remember having the issue with 7.1 but there was a similar
problem with 7.0 resolved with the make mrproper.

If you need to keep the .config don't forget to copy it away as it
will be removed.

Dave