Guest User

Untitled

a guest
Feb 19th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. static int genmem_mmap(struct file *pFile, struct vm_area_struct *pVma)
  2. {
  3. struct aim_mem_device *pInst;
  4. int ret;
  5.  
  6. /* get private data */
  7. pInst = (struct aim_mem_device*)(pFile->private_data);
  8.  
  9. ....[Some checks omitted here ]...
  10.  
  11. /* mapping */
  12. pVma->vm_page_prot = pgprot_noncached(pVma->vm_page_prot);
  13. ret = remap_pfn_range(
  14. pVma, /* user vma to map to */
  15. pVma->vm_start, /* target user address to start at */
  16. pVma->vm_pgoff + ((pInst->res.start)>>PAGE_SHIFT),/* physical address of kernel memory */
  17. pVma->vm_end - pVma->vm_start, /* size of map area */
  18. pVma->vm_page_prot /* page protection flags for this mapping */
  19. );
  20.  
  21. ....[Some checks omitted here ]...
  22.  
  23.  
  24. return ret;
  25. }
  26.  
  27. # [ 509.376525] esmartd[1505]: unhandled alignment fault (11) at 0x7f80b24032, esr 0x92000021
  28. [ 509.384674] pgd = ffffffc0341bf000
  29. [ 509.388038] [7f80b24032] *pgd=0000000034bba003[ 509.392283] , *pud=0000000034bba003
  30. , *pmd=0000000033c24003[ 509.397740] , *pte=01e800003f000f43
  31. [ 509.401224]
  32. [ 509.402717]
  33. [ 509.404174] CPU: 0 PID: 1505 Comm: esmartd Not tainted 4.9.0-aim2-00054-g1ccf631 #183
  34. [ 509.411995] Hardware name: ZynqMP AIM APXX (DT)
  35. [ 509.416850] task: ffffffc034136e80 task.stack: ffffffc033e14000
  36. [ 509.422757] PC is at 0x7f80bafe94
  37. [ 509.426042] LR is at 0x401200
  38. [ 509.429001] pc : [<0000007f80bafe94>] lr : [<0000000000401200>] pstate: 00000000
  39. [ 509.436384] sp : 0000007ffffe0040
  40. [ 509.439676] x29: 0000007ffffe0040 x28: 0000000000000000
  41. [ 509.444963] x27: 0000000000000000 x26: 0000000000000000
  42. [ 509.450262] x25: 0000000000000000 x24: 0000000000000000
  43. [ 509.455553] x23: 0000000000000000 x22: 0000000000000000
  44. [ 509.460848] x21: 0000000000000000 x20: 0000000000000000
  45. [ 509.466147] x19: 00000000004038d8 x18: 0000000000000001
  46. [ 509.471438] x17: 0000007f80bafe40 x16: 0000000000414350
  47. [ 509.476733] x15: 0000007f80cab030 x14: 00007a672e726174
  48. [ 509.482027] x13: 2e6574616470752d x12: 3031393378787061
  49. [ 509.487323] x11: 0000001600000000 x10: 0074005300200033
  50. [ 509.492617] x9 : 00320020006c0065 x8 : 0064006f00000042
  51. [ 509.497911] x7 : 0000000145534d54 x6 : 000000000ccb80c0
  52. [ 509.503207] x5 : 0000000000000003 x4 : 0000000000000000
  53. [ 509.508502] x3 : 0000000000000000 x2 : 0000000000000002
  54. [ 509.513796] x1 : 0000007f80b24042 x0 : 000000000ccb8080
  55. [ 509.519090]
Add Comment
Please, Sign In to add comment