Skip to content

zenpower3 and 6.16 kernel #55

@Dany-Wilde

Description

@Dany-Wilde

Could someone rewrite the module to ensure that it works properly with kernels 6.16 and above (more recent)?

If I have to do without it, I'll do without it.
But only if I really have to.
It doesn't suit me at all.
Zenpower meets a need.
Well, less and less since the AM5 platform came out, but still...

If someone could rewrite the module, that would be great.
For Zen3 (R9 5900X in my case) on kernel 6.16 and future versions...
That would be cool.

Thanks.
Respectfully,
Dany.

@sid:~/Téléchargements/zenpower3$ sudo make dkms-install

dkms --version >> /dev/null
mkdir -p /usr/src/zenpower-0.2.0
cp /home/alain/Téléchargements/zenpower3/dkms.conf /usr/src/zenpower-0.2.0
cp /home/alain/Téléchargements/zenpower3/Makefile /usr/src/zenpower-0.2.0
cp /home/alain/Téléchargements/zenpower3/zenpower.c /usr/src/zenpower-0.2.0
sed -e "s/@CFLGS@//" \
    -e "s/@VERSION@/0.2.0/" \
    -i /usr/src/zenpower-0.2.0/dkms.conf
dkms add zenpower/0.2.0
Creating symlink /var/lib/dkms/zenpower/0.2.0/source -> /usr/src/zenpower-0.2.0
dkms build zenpower/0.2.0
Sign command: /lib/modules/6.16.0-amd64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module(s)...(bad exit status: 2)
Failed command:
make -j24 KERNELRELEASE=6.16.0-amd64 TARGET=6.16.0-amd64 CFLAGS_MODULE+=

Error! Bad return status for module build on kernel: 6.16.0-amd64 (x86_64)
Consult /var/lib/dkms/zenpower/0.2.0/build/make.log for more information.
make: *** [Makefile:40: dkms-install] Error 10

@sid:~/Téléchargements/zenpower3$ cat /var/lib/dkms/zenpower/0.2.0/build/make.log


DKMS (dkms-3.2.0) make.log for zenpower/0.2.0 for kernel 6.16.0-amd64 (x86_64)
mar. 05 août 2025 12:43:27 CEST

Building module(s)
# command: make -j24 KERNELRELEASE=6.16.0-amd64 TARGET=6.16.0-amd64 CFLAGS_MODULE+=
make[1] : on entre dans le répertoire « /var/lib/dkms/zenpower/0.2.0/build »
make[2] : on entre dans le répertoire « /usr/src/linux-headers-6.16.0-amd64 »
make[3] : on entre dans le répertoire « /var/lib/dkms/zenpower/0.2.0/build »
  CC [M]  zenpower.o
zenpower.c:245:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
  245 | int static debug_addrs_arr[] = {
      | ^~~
zenpower.c: In function ‘kernel_smn_read’:
zenpower.c:486:9: error: implicit declaration of function ‘amd_smn_read’ [-Wimplicit-function-declaration]
  486 |         amd_smn_read(node_id, address, regval);
      |         ^~~~~~~~~~~~
zenpower.c: In function ‘zenpower_probe’:
zenpower.c:582:25: error: implicit declaration of function ‘amd_nb_num’ [-Wimplicit-function-declaration]
  582 |         for (i = 0; i < amd_nb_num(); i++) {
      |                         ^~~~~~~~~~
zenpower.c:583:24: error: implicit declaration of function ‘node_to_amd_nb’ [-Wimplicit-function-declaration]
  583 |                 misc = node_to_amd_nb(i)->misc;
      |                        ^~~~~~~~~~~~~~
zenpower.c:583:41: error: invalid type argument of ‘->’ (have ‘int’)
  583 |                 misc = node_to_amd_nb(i)->misc;
      |                                         ^~
zenpower.c:587:41: error: implicit declaration of function ‘amd_pci_dev_to_node_id’ [-Wimplicit-function-declaration]
  587 |                         data->node_id = amd_pci_dev_to_node_id(pdev);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
zenpower.c: In function ‘zenpower_read’:
zenpower.c:315:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
  315 |                         channel -= 1;   // hwmon_in have different indexing, see note at zenpower_info
      |                         ~~~~~~~~^~~~
zenpower.c:318:17: note: here
  318 |                 case hwmon_curr:
      |                 ^~~~
make[5]: *** [/usr/src/linux-headers-6.16.0-amd64/scripts/Makefile.build:287: zenpower.o] Error 1
make[4]: *** [/usr/src/linux-headers-6.16.0-amd64/Makefile:2003: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.0-amd64/Makefile:248: __sub-make] Error 2
make[3] : on quitte le répertoire « /var/lib/dkms/zenpower/0.2.0/build »
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2] : on quitte le répertoire « /usr/src/linux-headers-6.16.0-amd64 »
make[1]: *** [Makefile:27: modules] Error 2
make[1] : on quitte le répertoire « /var/lib/dkms/zenpower/0.2.0/build »

# exit code: 2
# elapsed time: 00:00:01
----------------------------------------------------------------

@sid:~/Téléchargements/zenpower3$ ./zp_read_debug.sh
Zenpower not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions