aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-10 19:21:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-10 19:21:11 -0400
commit06ab838c2024db468855118087db16d8fa905ddc (patch)
tree316ddb218bf3d5482bf16d38c129b71504780835 /arch/arm/include/asm
parent573c577af079184ca523984e3279644eb37756a3 (diff)
parent5f51042f876b88a3b81a135cc4ca0adb3d246112 (diff)
Merge tag 'for-linus-4.3-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen terminology fixes from David Vrabel: "Use the correct GFN/BFN terms more consistently" * tag 'for-linus-4.3-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/xenbus: Rename the variable xen_store_mfn to xen_store_gfn xen/privcmd: Further s/MFN/GFN/ clean-up hvc/xen: Further s/MFN/GFN clean-up video/xen-fbfront: Further s/MFN/GFN clean-up xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn xen: Use correctly the Xen memory terminologies arm/xen: implement correctly pfn_to_mfn xen: Make clear that swiotlb and biomerge are dealing with DMA address
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/xen/page.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 98b1084f8282..127956353b00 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -34,7 +34,19 @@ typedef struct xpaddr {
34unsigned long __pfn_to_mfn(unsigned long pfn); 34unsigned long __pfn_to_mfn(unsigned long pfn);
35extern struct rb_root phys_to_mach; 35extern struct rb_root phys_to_mach;
36 36
37static inline unsigned long pfn_to_mfn(unsigned long pfn) 37/* Pseudo-physical <-> Guest conversion */
38static inline unsigned long pfn_to_gfn(unsigned long pfn)
39{
40 return pfn;
41}
42
43static inline unsigned long gfn_to_pfn(unsigned long gfn)
44{
45 return gfn;
46}
47
48/* Pseudo-physical <-> BUS conversion */
49static inline unsigned long pfn_to_bfn(unsigned long pfn)
38{ 50{
39 unsigned long mfn; 51 unsigned long mfn;
40 52
@@ -47,16 +59,16 @@ static inline unsigned long pfn_to_mfn(unsigned long pfn)
47 return pfn; 59 return pfn;
48} 60}
49 61
50static inline unsigned long mfn_to_pfn(unsigned long mfn) 62static inline unsigned long bfn_to_pfn(unsigned long bfn)
51{ 63{
52 return mfn; 64 return bfn;
53} 65}
54 66
55#define mfn_to_local_pfn(mfn) mfn_to_pfn(mfn) 67#define bfn_to_local_pfn(bfn) bfn_to_pfn(bfn)
56 68
57/* VIRT <-> MACHINE conversion */ 69/* VIRT <-> GUEST conversion */
58#define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v))) 70#define virt_to_gfn(v) (pfn_to_gfn(virt_to_pfn(v)))
59#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) 71#define gfn_to_virt(m) (__va(gfn_to_pfn(m) << PAGE_SHIFT))
60 72
61/* Only used in PV code. But ARM guests are always HVM. */ 73/* Only used in PV code. But ARM guests are always HVM. */
62static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr) 74static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr)
@@ -96,7 +108,7 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
96 108
97bool xen_arch_need_swiotlb(struct device *dev, 109bool xen_arch_need_swiotlb(struct device *dev,
98 unsigned long pfn, 110 unsigned long pfn,
99 unsigned long mfn); 111 unsigned long bfn);
100unsigned long xen_get_swiotlb_free_pages(unsigned int order); 112unsigned long xen_get_swiotlb_free_pages(unsigned int order);
101 113
102#endif /* _ASM_ARM_XEN_PAGE_H */ 114#endif /* _ASM_ARM_XEN_PAGE_H */