Hi Gusarambula,
Many thanks for your reply.
In fact, I have modified the Makefile (adding "-mfloat-abi=hard -mfpu=neon") of the driver and built it successfully.
I also modified the kernel defconfig as below
-----------------------------------------------------------------------------------------------
CONFIG_VFP=y
CONFIG_VFPv3=y
CONFIG_NEON=y
CONFIG_KERNEL_MODE_NEON=y
-----------------------------------------------------------------------------------------------
However, I got "Segmentation fault" when I tried to insert this module.
-----------------------------------------------------------------------------------------------
root@imx6qsabresd:/tmp# insmod linux-kernel-bde.ko
linux_kernel_bde: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
BUG: FP instruction issued in kernel mode with FP unit disabled
Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ARM
Modules linked in: linux_kernel_bde(PO+)
CPU: 1 PID: 519 Comm: insmod Tainted: P O 3.14.52-1.1.0_ga+g5f6f0a5 #2
task: a86f8900 ti: a88e4000 task.ti: a88e4000
PC is at _pgalloc+0x328/0x3d8 [linux_kernel_bde]
LR is at _raw_spin_unlock+0x24/0x50
pc : [<7f001a60>] lr : [<80746270>] psr: 80070013
sp : a88e5ca0 ip : 80291890 fp : 80a95ec4
r10: a4000000 r9 : 00000084 r8 : 80b4c540
r7 : 800a80e8 r6 : 02000000 r5 : 00000021 r4 : a8c52080
r3 : a4080000 r2 : 00080000 r1 : 00000002 r0 : 00000000
Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: 389b404a DAC: 00000015
Process insmod (pid: 519, stack limit = 0xa88e4238)
Stack: (0xa88e5ca0 to 0xa88e6000)
5ca0: a8a8f000 8092f6d0 7f0056f8 80746270 00000012 8073b9a8 0003eb50 00034484
5cc0: 00000000 000000fa 802bdeac 802bec2c 00000000 00000000 00000000 00001000
5ce0: 7f007df0 00000000 00000000 00000000 7f007df0 7f007df0 02000000 8001b22c
5d00: 00000000 7f007c98 7f0056f8 7f0024b4 02000000 7f007df0 7f007df0 00000000
5d20: 00000000 7f007df0 802bec2c 7f00328c 60070013 80a8a0b0 a8001e80 a88e4000
5d40: a87fdd00 80400040 a864fb80 80910e70 80910e72 00000002 a88e5df4 00000000
5d60: a8001f00 000000d0 a88e4000 2aca5000 000050c9 00000000 800df02c 800d735c
5d80: 800df460 a864fc80 00000100 0000007f a800d400 00000001 a8a85f5c 8036e334
5da0: 00000000 0000001c a864fc80 800df460 00003571 a864fc80 a864fc80 7f007bc0
5dc0: 00000100 00000000 a8040100 a864fc80 00000000 800df4d0 800df02c 800df460
5de0: a864fc80 a88e5df0 800df5c4 a87fdd00 a864fc80 00000000 7f008a2c 7f008a2c
5e00: a88b9780 00000001 a88b9788 7f007c98 00000000 7f00d088 7f007bc0 00000001
5e20: a88e4030 7f00d000 7f007ca4 8000889c a8a85f40 8040003e abc6fa40 a88e4030
5e40: 80a86cdc abc6fa40 00000000 8040003e 00000000 8040003f 00000001 80a92804
5e60: a88e4030 00000001 7f007ce0 8040003e 0000000f a8a85f40 2aca5000 800d68ec
5e80: 80a8a0ac a88e5f58 00000001 7f007ca4 a88b9780 00000001 a88b9788 7f007c98
5ea0: 7f007ce0 8008a830 7f007ca4 00007fff 80087b38 00000000 a8a85f00 00000000
5ec0: a88e5f58 7f007ca4 a88e4028 c0de2606 00000000 a88e5f60 0000023f a88e5f8c
5ee0: a8a85f40 000000d2 000002d2 8000e6e4 a88e4000 7f00466c 00000013 00000000
5f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5f20: 00000000 00000000 00000000 00000000 01174058 0000e61c 01174058 01174008
5f40: 00000080 8000e6e4 a88e4000 00000000 00000000 8008ae48 c0dd5000 0000e61c
5f60: c0dde550 c0dde42f c0de0e40 00008b38 0000a6a8 00000000 00000000 00000000
5f80: 0000001e 0000001f 00000017 00000014 0000000f 00000000 0000e61c 7eb95f0c
5fa0: 00000043 8000e560 0000e61c 7eb95f0c 01174058 0000e61c 01174008 7eb95e14
5fc0: 0000e61c 7eb95f0c 00000043 00000080 0009579c 7eb95f0c 000957cc 00000000
5fe0: 7eb95c58 7eb95c48 00018550 76e65420 60070010 01174058 3ae7bf6b ea4fbffd
unwind: Index not found 7f001a60
Code: e7933009 e0833002 e15a0003 2affffe9 (eddb0b00)
---[ end trace a36eb6057765a90d ]---
note: insmod[519] exited with preempt_count 1
Segmentation fault
root@imx6qsabresd:/tmp#
-----------------------------------------------------------------------------------------------
So far, I have no idea why kernel shows "FP unit disabled"
BUG: FP instruction issued in kernel mode with FP unit disabled <-----
That's why I want to try another floating pointoptions (soft) to compile my driver.
This is my first time using i.MX series CPU.
Do you have any suggestion about this problem ?
Thank you very much.
Best regards,
Quentin