Hi, My custom board has gyroscope sensor and driver initialization done properly. That means tx and rx are working properly during initialization. But sometimes read fails when i do some operations. it shows invalid virtual memory. please have a look on below logs.
what could be the problem and why it is failed for sometimes.
[ 86.950502] [ffffffcb74545d80] *pgd=0000000000000000, *pud=0000000000000000
[ 86.950762] ------------[ cut here ]------------
[ 86.950812] Kernel BUG at ffffff8b718a2a04 [verbose debug info unavailable]
[ 86.950867] Internal error: Oops: 96000145 [#1] PREEMPT SMP
[ 86.950920] Modules linked in:
[ 86.951018] CPU: 1 PID: 3454 Comm: cat Not tainted 4.9.160 #1
[ 86.951073] Hardware name: Qualcomm Technologies, Inc. QCS605 PM660 + PM660L 360camera (DT)
[ 86.951123] task: ffffffd1e6ffa380 task.stack: ffffffd1e53d0000
[ 86.951188] PC is at __inval_cache_range+0x24/0x60
[ 86.951241] LR is at __swiotlb_map_page+0x90/0xa8
[ 86.951290] pc : [] lr : [] pstate: 00400145
[ 86.951337] sp : ffffffd1e53d1830
[ 86.951384] x29: ffffffd1e53d1830 x28: ffffffd1e53d1a98
[ 86.951495] x27: ffffffd1eeecda98 x26: 0000000000006902
[ 86.951606] x25: ffffffd1eeece0d0 x24: 0000000000000db3
[ 86.951716] x23: 0000000000000002 x22: 0000000000000001
[ 86.951826] x21: fffffffa74545db3 x20: ffffffd1f3a86690
[ 86.951936] x19: 0000000000000000 x18: ffffffffffffffff
[ 86.952047] x17: 0000000000000000 x16: 00000000001cea5a
[ 86.952156] x15: ffffff8b737e3c08 x14: ffffff8bf3a256e7
[ 86.952266] x13: ffffff8b73a256f5 x12: 0000000000000cca
[ 86.952376] x11: 0000000000000006 x10: 0000000000000ccb
[ 86.952485] x9 : ffffffd1e53d15a0 x8 : 0000000000000000
[ 86.952596] x7 : ffffff8b737e3c08 x6 : ffffff8b7306a000
[ 86.952705] x5 : ffffffbf00000000 x4 : 0000000000000002
[ 86.952814] x3 : 000000000000003f x2 : 0000000000000040
[ 86.952924] x1 : ffffffcb74545d80 x0 : ffffffcb74545db3
[ 86.953035]
[ 86.953035] PC: 0xffffff8b718a29c4:
[ 86.953084] 29c4 d65f03c0 d503201f d503201f 8b000021 d503201f d503201f d503201f d53b0023
[ 86.953443] 29e4 d503201f d3504c63 d2800082 9ac32042 d1000443 ea03003f 8a230021 54000040
[ 86.953797] 2a04 d50b7e21 ea03001f 8a230000 54000060 d50b7e20 14000002 d5087620 8b020000
[ 86.954150] 2a24 eb01001f 54ffffa3 d5033f9f d65f03c0 d503201f d503201f d503201f d53b0023
[ 86.954506]
[ 86.954506] LR: 0xffffff8b7189e6d8:
[ 86.954554] e6d8 aa0003f5 377001f3 aa1303e1 910a4280 97ffff4c 72001c1f 54000141 9000be63
[ 86.954908] e6f8 f9412680 2a1703e2 aa1603e1 f947b863 8b0032a0 cb030000 b25a6400 940010eb
[ 86.955262] e718 aa1503e0 a94153f3 a9425bf5 a94363f7 a8c47bfd d65f03c0 a9b87bfd 910003fd
[ 86.955615] e738 a90153f3 a9025bf5 a90363f7 a9046bf9 a90573fb aa0003f9 aa1e03e0 aa0103f3
[ 86.955970]
[ 86.955970] SP: 0xffffffd1e53d17f0:
[ 86.956019] 17f0 7189e718 ffffff8b e53d1830 ffffffd1 718a2a04 ffffff8b 00400145 00000000
[ 86.956373] 1810 e53d1830 ffffffd1 7189e6ec ffffff8b ffffffff 0000007f f3a86690 ffffffd1
[ 86.956733] 1830 e53d1870 ffffffd1 72665d8c ffffff8b 737fb928 ffffff8b eeece098 ffffffd1
[ 86.957086] 1850 f3a86690 ffffffd1 74545db3 ffffff8b 00000001 00000000 00000002 00000000
[ 86.957443] Process cat (pid: 3454, stack limit = 0xffffffd1e53d0000)
[ 86.957491] Call trace:
[ 86.957544] Exception stack(0xffffffd1e53d1640 to 0xffffffd1e53d1770)
[ 86.957598] 1640: 0000000000000000 0000007fffffffff ffffffd1e53d1830 ffffff8b718a2a04
[ 86.957651] 1660: 0000000000400145 0000000000000035 0000000000000140 0000000000000000
[ 86.957703] 1680: 0000000000000035 0000000000000000 0000000000000006 0000000000000000
[ 86.957755] 16a0: ffffffd1e53d16c0 ffffff8b72dab4b8 0000000000000000 0000000100000001
[ 86.957807] 16c0: ffffffd1e53d1760 ffffff8b719305b8 ffffffd1e53d17c0 ffffff8b730256c8
[ 86.957859] 16e0: ffffffd1f5f53898 ffffff8b74545db3 0000000000000001 69566fe30b09d500
[ 86.957911] 1700: ffffffcb74545db3 ffffffcb74545d80 0000000000000040 000000000000003f
[ 86.957963] 1720: 0000000000000002 ffffffbf00000000 ffffff8b7306a000 ffffff8b737e3c08
[ 86.958014] 1740: 0000000000000000 ffffffd1e53d15a0 0000000000000ccb 0000000000000006
[ 86.958064] 1760: 0000000000000cca ffffff8b73a256f5
[ 86.958118] [] __inval_cache_range+0x24/0x60
[ 86.958177] [] geni_se_iommu_map_buf+0x12c/0x200
[ 86.958235] [] geni_i2c_xfer+0x25c/0xd78
[ 86.958286] [] __i2c_transfer+0x13c/0x5d0
[ 86.958337] [] i2c_transfer+0x6c/0xe8
[ 86.958392] [] inv_i2c_read_base+0x80/0xd8
[ 86.958442] [] inv_i2c_read+0x40/0x50
[ 86.958493] [] inv_hw_self_test+0x238/0xa20
[ 86.958545] [] inv_attr_show+0x45c/0x628
[ 86.958601] [] dev_attr_show+0x3c/0x78
[ 86.958656] [] sysfs_kf_seq_show+0x8c/0x158
[ 86.958710] [] kernfs_seq_show+0x44/0x50
[ 86.958766] [] seq_read+0x1c4/0x498
[ 86.958816] [] kernfs_fop_read+0x144/0x1e0
[ 86.958871] [] __vfs_read+0x60/0x148
[ 86.958923] [] vfs_read+0x94/0x150
[ 86.958975] [] SyS_read+0x6c/0xd8
[ 86.959028] [] el0_svc_naked+0x34/0x38
[ 86.959084] Code: d1000443 ea03003f 8a230021 54000040 (d50b7e21)
[ 86.959653] —[ end trace bcd1d0608213b535 ]—
[ 86.962516] cat (3454) used greatest stack depth: 2976 bytes left