@GalaxyMaster, I tried your patch which might work but I get a lot of other errors. Could you have a look what could it be?
I use Suse aarch64 and get following errors:
In file included from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:23:
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_common.h: In function 'tg_out':
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_common.h:179:14: warning: assignment to 'long unsigned int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
179 | port += dev->base_addr;
| ^~
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_common.h:183:24: warning: passing argument 2 of 'iowrite64' makes pointer from integer without a cast [-Wint-conversion]
183 | iowrite64(val, port);
| ^~~~
| |
| long unsigned int
In file included from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/io.h:163,
from /usr/src/linux-6.0.2-1/include/linux/io.h:13,
from /usr/src/linux-6.0.2-1/include/linux/irq.h:20,
from /usr/src/linux-6.0.2-1/include/asm-generic/hardirq.h:17,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/hardirq.h:17,
from /usr/src/linux-6.0.2-1/include/linux/hardirq.h:11,
from /usr/src/linux-6.0.2-1/include/linux/interrupt.h:11,
from /usr/src/linux-6.0.2-1/include/linux/pci.h:38,
from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:7:
/usr/src/linux-6.0.2-1/include/asm-generic/io.h:852:64: note: expected 'volatile void *' but argument is of type 'long unsigned int'
852 | static inline void iowrite64(u64 value, volatile void __iomem *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/src/linux-6.0.2-1/include/asm-generic/bug.h:22,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/bug.h:26,
from /usr/src/linux-6.0.2-1/include/linux/bug.h:5,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/cpufeature.h:19,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/hwcap.h:9,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/arch_timer.h:12,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/timex.h:8,
from /usr/src/linux-6.0.2-1/include/linux/timex.h:67,
from /usr/src/linux-6.0.2-1/include/linux/time32.h:13,
from /usr/src/linux-6.0.2-1/include/linux/time.h:60,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/stat.h:12,
from /usr/src/linux-6.0.2-1/include/linux/stat.h:6,
from /usr/src/linux-6.0.2-1/include/linux/module.h:13,
from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:5:
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c: In function 'prl_tg_probe_common':
/usr/src/linux-6.0.2-1/include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'void *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
/usr/src/linux-6.0.2-1/include/linux/printk.h:436:25: note: in definition of macro 'printk_index_wrap'
436 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:524:9: note: in expansion of macro 'printk'
524 | printk(KERN_INFO "detected %s, base addr %08lx, IRQ %d\n",
| ^~~~~~
/usr/src/linux-6.0.2-1/include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:524:16: note: in expansion of macro 'KERN_INFO'
524 | printk(KERN_INFO "detected %s, base addr %08lx, IRQ %d\n",
| ^~~~~~~~~
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c: In function 'prl_tg_init_module':
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:650:13: warning: unused variable 'rc' [-Wunused-variable]
650 | int rc;
| ^~
In file included from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.c:11:
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_common.h: In function 'tg_out':
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_common.h:179:14: warning: assignment to 'long unsigned int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
179 | port += dev->base_addr;
| ^~
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_common.h:183:24: warning: passing argument 2 of 'iowrite64' makes pointer from integer without a cast [-Wint-conversion]
183 | iowrite64(val, port);
| ^~~~
| |
| long unsigned int
In file included from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/io.h:163,
from /usr/src/linux-6.0.2-1/include/linux/io.h:13,
from /usr/src/linux-6.0.2-1/include/linux/irq.h:20,
from /usr/src/linux-6.0.2-1/include/asm-generic/hardirq.h:17,
from /usr/src/linux-6.0.2-1/arch/arm64/include/asm/hardirq.h:17,
from /usr/src/linux-6.0.2-1/include/linux/hardirq.h:11,
from /usr/src/linux-6.0.2-1/include/linux/interrupt.h:11,
from /usr/src/linux-6.0.2-1/include/linux/pci.h:38,
from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.c:7:
/usr/src/linux-6.0.2-1/include/asm-generic/io.h:852:64: note: expected 'volatile void *' but argument is of type 'long unsigned int'
852 | static inline void iowrite64(u64 value, volatile void __iomem *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
ld: warning: -z relro ignored
ld: warning: -z relro ignored
Skipping BTF generation for /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.ko due to unavailability of vmlinux
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (SUSE Linux) 12.2.1 20220830 [revision e927d1cf141f221c5a32574bde0913307e140984]
You are using: cc (SUSE Linux) 12.2.1 20220830 [revision e927d1cf141f221c5a32574bde0913307e140984]
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:958:10: error: 'const struct address_space_operations' has no member named 'readpage'
958 | .readpage = prlfs_readpage,
| ^~~~~~~~
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:958:35: error: initialization of 'int (*)(struct page *, struct writeback_control *)' from incompatible pointer type 'int (*)(struct file *, struct page *)' [-Werror=incompatible-pointer-types]
958 | .readpage = prlfs_readpage,
| ^~~~~~~~~~~~~~
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:958:35: note: (near initialization for 'prlfs_aops.writepage')
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-6.0.2-1/scripts/Makefile.build:250: /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.o] Error 1
make[2]: *** [../../../linux-6.0.2-1/Makefile:1866: /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs] Error 2
make[1]: *** [Makefile:36: all] Error 2
make: *** [Makefile.kmods:49: compile] Error 2
Error: could not build kernel modules
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.0.2-1-default
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.0.2-1-default
Error: failed to upgrade Parallels Guest Tools!