mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
xen: MFN/GFN/BFN terminology changes for 4.3-rc0
- Use the correct GFN/BFN terms more consistently. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJV8VRMAAoJEFxbo/MsZsTRiGQH/i/jrAJUJfrFC2PINaA2gDwe O0dlrkCiSgAYChGmxxxXZQSPM5Po5+EbT/dLjZ/uvSooeorM9RYY/mFo7ut/qLep 4pyQUuwGtebWGBZTrj9sygUVXVhgJnyoZxskNUbhj9zvP7hb9++IiI78mzne6cpj lCh/7Z2dgpfRcKlNRu+qpzP79Uc7OqIfDK+IZLrQKlXa7IQDJTQYoRjbKpfCtmMV BEG3kN9ESx5tLzYiAfxvaxVXl9WQFEoktqe9V8IgOQlVRLgJ2DQWS6vmraGrokWM 3HDOCHtRCXlPhu1Vnrp0R9OgqWbz8FJnmVAndXT8r3Nsjjmd0aLwhJx7YAReO/4= =JDia -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
06ab838c20
29 changed files with 198 additions and 158 deletions
|
|
@ -200,7 +200,7 @@ static int xen_hvm_console_init(void)
|
|||
{
|
||||
int r;
|
||||
uint64_t v = 0;
|
||||
unsigned long mfn;
|
||||
unsigned long gfn;
|
||||
struct xencons_info *info;
|
||||
|
||||
if (!xen_hvm_domain())
|
||||
|
|
@ -217,7 +217,7 @@ static int xen_hvm_console_init(void)
|
|||
}
|
||||
/*
|
||||
* If the toolstack (or the hypervisor) hasn't set these values, the
|
||||
* default value is 0. Even though mfn = 0 and evtchn = 0 are
|
||||
* default value is 0. Even though gfn = 0 and evtchn = 0 are
|
||||
* theoretically correct values, in practice they never are and they
|
||||
* mean that a legacy toolstack hasn't initialized the pv console correctly.
|
||||
*/
|
||||
|
|
@ -229,8 +229,8 @@ static int xen_hvm_console_init(void)
|
|||
r = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v);
|
||||
if (r < 0 || v == 0)
|
||||
goto err;
|
||||
mfn = v;
|
||||
info->intf = xen_remap(mfn << PAGE_SHIFT, PAGE_SIZE);
|
||||
gfn = v;
|
||||
info->intf = xen_remap(gfn << PAGE_SHIFT, PAGE_SIZE);
|
||||
if (info->intf == NULL)
|
||||
goto err;
|
||||
info->vtermno = HVC_COOKIE;
|
||||
|
|
@ -265,7 +265,8 @@ static int xen_pv_console_init(void)
|
|||
return 0;
|
||||
}
|
||||
info->evtchn = xen_start_info->console.domU.evtchn;
|
||||
info->intf = mfn_to_virt(xen_start_info->console.domU.mfn);
|
||||
/* GFN == MFN for PV guest */
|
||||
info->intf = gfn_to_virt(xen_start_info->console.domU.mfn);
|
||||
info->vtermno = HVC_COOKIE;
|
||||
|
||||
spin_lock(&xencons_lock);
|
||||
|
|
@ -374,7 +375,6 @@ static int xencons_connect_backend(struct xenbus_device *dev,
|
|||
int ret, evtchn, devid, ref, irq;
|
||||
struct xenbus_transaction xbt;
|
||||
grant_ref_t gref_head;
|
||||
unsigned long mfn;
|
||||
|
||||
ret = xenbus_alloc_evtchn(dev, &evtchn);
|
||||
if (ret)
|
||||
|
|
@ -389,10 +389,6 @@ static int xencons_connect_backend(struct xenbus_device *dev,
|
|||
irq, &domU_hvc_ops, 256);
|
||||
if (IS_ERR(info->hvc))
|
||||
return PTR_ERR(info->hvc);
|
||||
if (xen_pv_domain())
|
||||
mfn = virt_to_mfn(info->intf);
|
||||
else
|
||||
mfn = __pa(info->intf) >> PAGE_SHIFT;
|
||||
ret = gnttab_alloc_grant_references(1, &gref_head);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
|
@ -401,7 +397,7 @@ static int xencons_connect_backend(struct xenbus_device *dev,
|
|||
if (ref < 0)
|
||||
return ref;
|
||||
gnttab_grant_foreign_access_ref(ref, info->xbdev->otherend_id,
|
||||
mfn, 0);
|
||||
virt_to_gfn(info->intf), 0);
|
||||
|
||||
again:
|
||||
ret = xenbus_transaction_start(&xbt);
|
||||
|
|
|
|||
Loading…
Reference in a new issue