I am trying to map physical memory allocated at boot time to virtual kernel space and virtual user space address using ioremap() and remap_pfn_range(), so i developped a kernel module that implement those to functions, i tested the module on ubuntu (3.13.0-86-generic) and it's work fine, but when i cross copile it and insert it to my imx6 board i get the following error :
WARNING: CPU: 0 PID: 521 at arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0x17c/0x1bc()
Modules linked in: memmapMod(O+)
CPU: 0 PID: 521 Comm: insmod Tainted: G W O 3.14.12-rt9-ga81067a #1
Backtrace:
[<80012100>] (dump_backtrace) from [<800123e0>] (show_stack+0x18/0x1c)
r6:808aa37c r5:ffffffff r4:00000000 r3:00000000
[<800123c8>] (show_stack) from [<806386e4>] (dump_stack+0x80/0xd4)
[<80638664>] (dump_stack) from [<80027960>] (warn_slowpath_common+0x70/0x94)
r7:0000012d r6:8001bd40 r5:00000009 r4:00000000
[<800278f0>] (warn_slowpath_common) from [<80027a28>] (warn_slowpath_null+0x24/0x2c)
r8:01400000 r7:0001e000 r6:808988d4 r5:1e000000 r4:00000000
[<80027a04>] (warn_slowpath_null) from [<8001bd40>] (__arm_ioremap_pfn_caller+0x17c/0x1bc)
[<8001bbc4>] (__arm_ioremap_pfn_caller) from [<8001bdd8>] (__arm_ioremap_caller+0x58/0x60)
r9:7f00429c r8:00000001 r7:9bc48148 r6:9bc48140 r5:7f004094 r4:7f0043cc
[<8001bd80>] (__arm_ioremap_caller) from [<8001baac>] (__arm_ioremap+0x1c/0x24)
[<8001ba90>] (__arm_ioremap) from [<7f0040d8>] (simple_init+0x44/0xa4 [memmapMod])
[<7f004094>] (simple_init [memmapMod]) from [<8000894c>] (do_one_initcall+0xf8/0x168)
r4:9cf68000
[<80008854>] (do_one_initcall) from [<80089da8>] (load_module+0x1a48/0x1f28)
r10:7f004290 r9:7f00429c r8:00000001 r7:9bc48148 r6:9bc48140 r5:00000001
r4:9cf69f48
[<80088360>] (load_module) from [<8008a3f0>] (SyS_finit_module+0x70/0x80)
r10:00000000 r9:9cf68000 r8:8000ec84 r7:0000017b r6:0002499c r5:00000003
r4:00000000
[<8008a380>] (SyS_finit_module) from [<8000eb00>] (ret_fast_syscall+0x0/0x30)
r6:00000000 r5:00000000 r4:00000000
---[ end trace 0000000000000003 ]---
memmapMod is the name of my module, i am using linux 3.14.12 on Cortex-A9 Freescale i.MX6 Solo
have any one idea how to sole this problem ?
Hi mondher
3.14.12 is not supported on nxp linux releases, suggest to test
with official L3.14.28
linux-2.6-imx.git - Freescale i.MX Linux Tree
linux-2.6-imx.git - Freescale i.MX Linux Tree
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I have tried also with linux 3.10.17(fsl) and i get the same error, i have changed the function ioremap with phys_to_virt and it's work fine.