2002-10-12 21:53:41

by Felix Seeger

[permalink] [raw]
Subject: 2.5.42 compile error in timers/timer_tsc.c

Hi

I get this:

gcc -Wp,-MD,arch/i386/kernel/timers/.timer.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DKBUILD_BASENAME=timer -c -o arch/i386/kernel/timers/timer.o
arch/i386/kernel/timers/timer.c
gcc -Wp,-MD,arch/i386/kernel/timers/.timer_tsc.o.d -D__KERNEL__ -Iinclude
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DKBUILD_BASENAME=timer_tsc -c -o arch/i386/kernel/timers/timer_tsc.o
arch/i386/kernel/timers/timer_tsc.c
arch/i386/kernel/timers/timer_tsc.c: In function `time_cpufreq_notifier':
arch/i386/kernel/timers/timer_tsc.c:181: `CPUFREQ_PRECHANGE' undeclared (first
use in this function)
arch/i386/kernel/timers/timer_tsc.c:181: (Each undeclared identifier is
reported only once
arch/i386/kernel/timers/timer_tsc.c:181: for each function it appears in.)
arch/i386/kernel/timers/timer_tsc.c:182: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:182: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:183: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:183: `CPUFREQ_ALL_CPUS' undeclared (first
use in this function)
arch/i386/kernel/timers/timer_tsc.c:183: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:184: warning: implicit declaration of
function `cpufreq_scale'
arch/i386/kernel/timers/timer_tsc.c:184: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:184: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:185: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:185: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:188: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:188: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:189: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:189: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:192: `CPUFREQ_POSTCHANGE' undeclared
(first use in this function)
arch/i386/kernel/timers/timer_tsc.c:193: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:193: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:194: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:194: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:195: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:195: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:196: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:196: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:199: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:199: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:200: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:200: dereferencing pointer to incomplete
type
arch/i386/kernel/timers/timer_tsc.c:184: warning: unreachable code at
beginning of switch statement
arch/i386/kernel/timers/timer_tsc.c: At top level:
arch/i386/kernel/timers/timer_tsc.c:207: variable
`time_cpufreq_notifier_block' has initializer but incomplete type
arch/i386/kernel/timers/timer_tsc.c:208: unknown field `notifier_call'
specified in initializer
arch/i386/kernel/timers/timer_tsc.c:209: warning: excess elements in struct
initializer
arch/i386/kernel/timers/timer_tsc.c:209: warning: (near initialization for
`time_cpufreq_notifier_block')
arch/i386/kernel/timers/timer_tsc.c: In function `init_tsc':
arch/i386/kernel/timers/timer_tsc.c:265: warning: implicit declaration of
function `cpufreq_register_notifier'
arch/i386/kernel/timers/timer_tsc.c:265: `CPUFREQ_TRANSITION_NOTIFIER'
undeclared (first use in this function)
make[2]: *** [arch/i386/kernel/timers/timer_tsc.o] Error 1
make[1]: *** [arch/i386/kernel/timers] Error 2
make: *** [arch/i386/kernel] Error 2
hal@vaio:~/download/kernel/linux-2.5.42$

thanks
Felix



2002-10-13 13:09:41

by Alessandro Suardi

[permalink] [raw]
Subject: Re: 2.5.42 compile error in timers/timer_tsc.c

> Hi
> I get this:
> gcc -Wp,-MD,arch/i386/kernel/timers/.timer.o.d -D__KERNEL__ -Iinclude -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
> -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
> -march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=timer -c -o arch/i386/kernel/timers/timer.o
> arch/i386/kernel/timers/timer.c
> gcc -Wp,-MD,arch/i386/kernel/timers/.timer_tsc.o.d -D__KERNEL__ -Iinclude
> -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
> -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
> -march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=timer_tsc -c -o arch/i386/kernel/timers/timer_tsc.o
> arch/i386/kernel/timers/timer_tsc.c
> arch/i386/kernel/timers/timer_tsc.c: In function `time_cpufreq_notifier':
> arch/i386/kernel/timers/timer_tsc.c:181: `CPUFREQ_PRECHANGE' undeclared (first
> use in this function)

[snip]

Attached patch (which simply includes<linux/cpufreq.h>) makes it compile. Don't know
whether it's the Right Fix (TM), so...

--alessandro


Attachments:
cpufreq.diff (255.00 B)