Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
4,626
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. 163 #define __pv_stub(from,to,instr,type)
  2. 164 __asm__("@ __pv_stubn"
  3. 165 "1: " instr " %0, %1, %2n"
  4. 166 " .pushsection .pv_table,"a"n"
  5. 167 " .long 1bn"
  6. 168 " .popsectionn"
  7. 169 : "=r" (to)
  8. 170 : "r" (from), "I" (type))
  9.  
  10. static inline unsigned long __virt_to_phys(unsigned long x)
  11. { unsigned long t;
  12. __pv_stub(x, t, "add", __PV_BITS_31_24);
  13. return t;
  14. }
  15.  
  16. CONFIG_ARM_PATCH_PHYS_VIRT:
  17.  
  18. Patch phys-to-virt and virt-to-phys translation functions at
  19. boot and module load time according to the position of the
  20. kernel in system memory.
  21.  
  22. This can only be used with non-XIP MMU kernels where the base
  23. of physical memory is at a 16MB boundary, or theoretically 64K
  24. for the MSM machine class.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement