[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: slightly simplify PHYSDEVOP_pirq_eoi_gmfn_v* handling
commit 0e5e324db9efcbf49635704884ecf545ee7ec84a Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Jan 20 10:45:01 2015 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jan 20 10:45:01 2015 +0100 x86: slightly simplify PHYSDEVOP_pirq_eoi_gmfn_v* handling We don't really need the MFN in more than one place (after dropping mfn_to_page() translations where we know the result already), so no need to have a local variable for it. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/physdev.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index 6b3201b..c8bb797 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -336,7 +336,6 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) case PHYSDEVOP_pirq_eoi_gmfn_v2: case PHYSDEVOP_pirq_eoi_gmfn_v1: { struct physdev_pirq_eoi_gmfn info; - unsigned long mfn; struct page_info *page; ret = -EFAULT; @@ -352,21 +351,20 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) put_page(page); break; } - mfn = page_to_mfn(page); if ( cmpxchg(&v->domain->arch.pirq_eoi_map_mfn, - 0, mfn) != 0 ) + 0, page_to_mfn(page)) != 0 ) { - put_page_and_type(mfn_to_page(mfn)); + put_page_and_type(page); ret = -EBUSY; break; } - v->domain->arch.pirq_eoi_map = map_domain_page_global(mfn); + v->domain->arch.pirq_eoi_map = __map_domain_page_global(page); if ( v->domain->arch.pirq_eoi_map == NULL ) { v->domain->arch.pirq_eoi_map_mfn = 0; - put_page_and_type(mfn_to_page(mfn)); + put_page_and_type(page); ret = -ENOSPC; break; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |