[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [1/2] [XEN] gnttab: Add new op unmap_and_replace
On 9/5/07 12:31, "Herbert Xu" <herbert@xxxxxxxxxxxxxxxxxxx> wrote: > [XEN] gnttab: Add new op unmap_and_replace There's considerable code duplication in common/grant_table.c. Could we please somehow merge __gnttab_unmap() and __gnttab_unmap_and_replace(), because they only differ right now in the struct type they take, and in the function they call to do the actual unmap or unmap-and-replace work. Perhaps their wrappers could stuff a 'union structure' of some sort, with enough discrimination to ensure the correct underlying arch-specific function is called? We could even only supply unmap-and-replace functionality at the arch-specific interface and have new_addr==NULL/zero-pte mean we want the the old-style unmap semantics. Then the wrapper for unmap_op can stuff that field in the 'union structure' with zero to do the right thing. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |