2.4 patch and powernow-k8
I've been trying to patch cpufreq into a recent 2.4 kernel and having some problems. When I've config'ed powernow-k8 to be static linked, I get the below errors. Compiling as a module works, but yields unresolvable symbols when trying to load the module.
The speedstep-centrino seems to build fine (though I can't test it on my laptop), and I'm guessing there is a build issue in which symbols are exported. However, I don't actually understand the build process enough to make any headway...
BTW: I've tried on kernels 2.4.25 -> 2.4.28, and tried a couple different snapshots from ftp://ftp.linux.org.uk/pub/linux/cpufreq/ as well as the latest stuff in the cvs repository.
Any help would be appreciated,
-dan
make[1]: Leaving directory `/usr/src/linux-2.4.28/arch/i386/lib'
ld -m elf_i386 -T /usr/src/linux-2.4.28/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o init/do_mounts.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
mm/mm.o fs/fs.o ipc/ipc.o \
drivers/acpi/acpi.o drivers/char/char.o drivers/block/block.o
drivers/misc/misc.o drivers/net/net.o drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/pcmcia/pcmcia.o drivers/pnp/pnp.o drivers/video/video.o drivers/media/media.o drivers/input/inputdrv.o drivers/cpufreq/built-in.o \
net/network.o \
/usr/src/linux-2.4.28/arch/i386/lib/lib.a
/usr/src/linux-2.4.28/lib/lib.a /usr/src/linux-2.4.28/arch/i386/lib/lib.a \
--end-group \
-o vmlinuxarch/i386/kernel/kernel.o(.data+0x1d80): In function `trampoline_end':
: undefined reference to `local symbols in discarded section .text.exit'
make: *** [vmlinux] Error 1
[root@queue38 linux-2.4.28]#
Quoted 18 lines · omv
make[1]: Leaving directory `/usr/src/linux-2.4.28/arch/i386/lib' ld -m
elf_i386-T/usr/src/linux-2.4.28/arch/i386/vmlinux.lds-e stextarch/i386/kernel/head.oarch/i386/kernel/init_task.oinit/main.oinit/version.o init/do_mounts.o \ --start-group \ arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
mm/mm.ofs/fs.oipc/ipc.o\
drivers/acpi/acpi.odrivers/char/char.odrivers/block/block.odrivers/misc/misc.odrivers/net/net.odrivers/char/agp/agp.odrivers/char/drm/drm.odrivers/ide/idedriver.odrivers/scsi/scsidrv.odrivers/cdrom/driver.odrivers/pci/driver.odrivers/pcmcia/pcmcia.odrivers/pnp/pnp.odrivers/video/video.odrivers/media/media.odrivers/input/inputdrv.o drivers/cpufreq/built-in.o \ net/network.o \ /usr/src/linux-2.4.28/arch/i386/lib/lib.a /usr/src/linux-2.4.28/lib/lib.a /usr/src/linux-2.4.28/arch/i386/lib/lib.a \ --end-group \ -o vmlinux
Quoted 4 lines
arch/i386/kernel/kernel.o(.data+0x1d80): In function `trampoline_end':
: undefined reference to `local symbols in discarded section .text.exit'
make: *** [vmlinux] Error 1
[root@queue38 linux-2.4.28]#
Could you try out removing the "__devexit_p" in static struct cpufreq_driver cpufreq_amd64_driver = {
.verify = powernowk8_verify,
.target = powernowk8_target,
.init = powernowk8_cpu_init,
.exit = __devexit_p(powernowk8_cpu_exit), .get = powernowk8_get,
, i.e. modifying the .exit line to
.exit = powernowk8_cpu_exit
and remove the __devexit from
static int __devexit powernowk8_cpu_exit (struct cpufreq_policy *pol)
in powernow-k8.c
Thanks,
Dominik
Quoted 19 lines · Dominik Brodowski
Quoted 6 lines · omv
arch/i386/kernel/kernel.o(.data+0x1d80): In function `trampoline_end':
: undefined reference to `local symbols in discarded section .text.exit'
make: *** [vmlinux] Error 1
[root@queue38 linux-2.4.28]#Could you try out removing the "
__devexit_p" in static structcpufreq_drivercpufreq_amd64_driver= {
.verify =powernowk8_verify,
.target =powernowk8_target,
.init =powernowk8_cpu_init,
.exit =__devexit_p(powernowk8_cpu_exit),
.get =powernowk8_get,
, i.e. modifying the .exit line to
.exit =powernowk8_cpu_exit
Quoted 9 lines
and remove the
__devexitfrom
static int__devexitpowernowk8_cpu_exit(structcpufreq_policy*pol)in
powernow-k8.cThanks,
Dominik
Dominik,
My version (from CVS on sunday, i think) looked a bit different - the first block didn't have the __devexit at all, and the second was static int __exit drc_cpu_exit. I modified the second block to remove the _exit.
That appeared to do the trick - built fine. It now looks like
static int drv_cpu_exit (struct cpufreq_policy *pol)
...
static struct cpufreq_driver cpufreq_amd64_driver = {
.verify = drv_verify,
.target = drv_target,
.init = drv_cpu_init,
.exit = drv_cpu_exit,
.name = "powernow-k8"
Thanks - I really appreciate the help! It was kinda annoying only having 90 minutes of battery life on the plane.
-dan
Quoted 3 lines · omv
My version (from CVS on sunday, i think) looked a bit different - the first block didn't have the
__devexitat all, and the second was static
int__exitdrc_cpu_exit. I modified the second block to remove the_exit.
It's a bit old. I have to backport the acpilib stuff first.
Quoted 4 lines
That appeared to do the trick - built fine. It now looks like
static int
drv_cpu_exit(structcpufreq_policy*pol)
Commited. Thanks.
Signature · 4 lines
Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care.
One other bit I had to hack - my CPUID_XFAM_MOD was coming up 0xfc0 (instead of 0xf40/0xf50) , so added in an extra recognition code.
Thx for the help,
-dan
Quoted 21 lines · Bruno Ducrot
Quoted 3 lines · omv
My version (from CVS on sunday, i think) looked a bit different - the first block didn't have the
__devexitat all, and the second was static int__exitdrc_cpu_exit. I modified the second block to remove the_exit.It's a bit old. I have to backport the acpilib stuff first.
Quoted 5 lines
That appeared to do the trick - built fine. It now looks like
static int
drv_cpu_exit(structcpufreq_policy*pol)Commited. Thanks.
Quoted 3 lines · omv
One other bit I had to hack - my
CPUID_XFAM_MODwas coming up0xfc0(instead of 0xf40/0xf50) , so added in an extra recognition code.
Indeed. But there is a need though to backport the generic ACPI API for the processor performance for the 2.4 kernel before I make more stuff for powernow-k8. That's way, it will be much more easy to backport the powernow-k8 driver from 2.6, and then the 2.4 version will support more processors.
Cheers,
Signature · 4 lines
Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care.