[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] merge?
# HG changeset patch # User cl349@xxxxxxxxxxxxxxxxxxxx # Node ID 3428d58a85e1a4a618e3f6e7139e4dcf1f9cad19 # Parent fab3e2747dc2322f0f2fd9ec4b25a835867f4f5d # Parent 56a2232377f1b3684da6e95a07f9854e40bc4ba7 merge? diff -r fab3e2747dc2 -r 3428d58a85e1 linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c --- a/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c Thu Aug 25 14:41:06 2005 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c Thu Aug 25 14:41:52 2005 @@ -34,9 +34,11 @@ EXPORT_SYMBOL(gnttab_grant_foreign_access); +EXPORT_SYMBOL(gnttab_end_foreign_access_ref); EXPORT_SYMBOL(gnttab_end_foreign_access); EXPORT_SYMBOL(gnttab_query_foreign_access); EXPORT_SYMBOL(gnttab_grant_foreign_transfer); +EXPORT_SYMBOL(gnttab_end_foreign_transfer_ref); EXPORT_SYMBOL(gnttab_end_foreign_transfer); EXPORT_SYMBOL(gnttab_alloc_grant_references); EXPORT_SYMBOL(gnttab_free_grant_references); @@ -160,7 +162,7 @@ } void -gnttab_end_foreign_access(grant_ref_t ref, int readonly) +gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly) { u16 flags, nflags; @@ -170,7 +172,12 @@ printk(KERN_ALERT "WARNING: g.e. still in use!\n"); } while ( (nflags = synch_cmpxchg(&shared[ref].flags, flags, 0)) != flags ); - +} + +void +gnttab_end_foreign_access(grant_ref_t ref, int readonly) +{ + gnttab_end_foreign_access_ref(ref, readonly); put_free_entry(ref); } @@ -201,20 +208,13 @@ } unsigned long -gnttab_end_foreign_transfer(grant_ref_t ref) +gnttab_end_foreign_transfer_ref(grant_ref_t ref) { unsigned long frame = 0; u16 flags; flags = shared[ref].flags; -#ifdef CONFIG_XEN_NETDEV_GRANT_RX - /* - * But can't flags == (GTF_accept_transfer | GTF_transfer_completed) - * if gnttab_donate executes without interruption??? - */ -#else - ASSERT(flags == (GTF_accept_transfer | GTF_transfer_committed)); -#endif + /* * If a transfer is committed then wait for the frame address to appear. * Otherwise invalidate the grant entry against future use. @@ -224,8 +224,14 @@ while ( unlikely((frame = shared[ref].frame) == 0) ) cpu_relax(); + return frame; +} + +unsigned long +gnttab_end_foreign_transfer(grant_ref_t ref) +{ + unsigned long frame = gnttab_end_foreign_transfer_ref(ref); put_free_entry(ref); - return frame; } diff -r fab3e2747dc2 -r 3428d58a85e1 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Aug 25 14:41:06 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Aug 25 14:41:52 2005 @@ -364,7 +364,7 @@ "still in use by backend domain.\n"); goto out; } - gnttab_end_foreign_access(grant_tx_ref[id], GNTMAP_readonly); + gnttab_end_foreign_access_ref(grant_tx_ref[id], GNTMAP_readonly); gnttab_release_grant_reference(&gref_tx_head, grant_tx_ref[id]); grant_tx_ref[id] = GRANT_INVALID_REF; #endif @@ -650,7 +650,7 @@ #ifdef CONFIG_XEN_NETDEV_GRANT_RX ref = grant_rx_ref[rx->id]; grant_rx_ref[rx->id] = GRANT_INVALID_REF; - mfn = gnttab_end_foreign_transfer(ref); + mfn = gnttab_end_foreign_transfer_ref(ref); gnttab_release_grant_reference(&gref_rx_head, ref); #endif diff -r fab3e2747dc2 -r 3428d58a85e1 linux-2.6-xen-sparse/include/asm-xen/gnttab.h --- a/linux-2.6-xen-sparse/include/asm-xen/gnttab.h Thu Aug 25 14:41:06 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/gnttab.h Thu Aug 25 14:41:52 2005 @@ -30,10 +30,12 @@ int gnttab_grant_foreign_access(domid_t domid, unsigned long frame, int readonly); +void gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly); void gnttab_end_foreign_access(grant_ref_t ref, int readonly); int gnttab_grant_foreign_transfer(domid_t domid, unsigned long pfn); +unsigned long gnttab_end_foreign_transfer_ref(grant_ref_t ref); unsigned long gnttab_end_foreign_transfer(grant_ref_t ref); int gnttab_query_foreign_access(grant_ref_t ref); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |