From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH] Re: [Xen-staging] [xen-unstable] Dynamic grant-table sizing. Date: Thu, 15 Feb 2007 08:32:07 -0700 Message-ID: <1171553527.5373.92.camel@bling> References: <200702151056.l1FAuI07000397@latara.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200702151056.l1FAuI07000397@latara.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: xen-staging@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, 2007-02-15 at 10:56 +0000, Xen staging patchbot-unstable wrote: > diff -r 047b3e9f9032 -r 70f05d642a2e xen/arch/ia64/xen/mm.c > --- a/xen/arch/ia64/xen/mm.c Thu Feb 15 10:34:21 2007 +0000 > +++ b/xen/arch/ia64/xen/mm.c Thu Feb 15 10:54:12 2007 +0000 > @@ -2077,8 +2077,10 @@ arch_memory_op(int op, XEN_GUEST_HANDLE( > mfn = virt_to_mfn(d->shared_info); > break; > case XENMAPSPACE_grant_table: > - if (xatp.idx < NR_GRANT_FRAMES) > + spin_lock(d->grant_table->lock); > + if ( xatp.idx < nr_grant_frames(d->grant_table) ) > mfn = virt_to_mfn(d->grant_table->shared) + xatp.idx; > + spin_unlock(d->grant_table->lock); Typo fix, spin_lock needs a pointer. Signed-off-by: Alex Williamson --- diff -r 5916fc1f9b16 xen/arch/ia64/xen/mm.c --- a/xen/arch/ia64/xen/mm.c Thu Feb 15 14:58:43 2007 +0000 +++ b/xen/arch/ia64/xen/mm.c Thu Feb 15 08:22:16 2007 -0700 @@ -2077,10 +2077,10 @@ arch_memory_op(int op, XEN_GUEST_HANDLE( mfn = virt_to_mfn(d->shared_info); break; case XENMAPSPACE_grant_table: - spin_lock(d->grant_table->lock); - if ( xatp.idx < nr_grant_frames(d->grant_table) ) + spin_lock(&d->grant_table->lock); + if (xatp.idx < nr_grant_frames(d->grant_table)) mfn = virt_to_mfn(d->grant_table->shared) + xatp.idx; - spin_unlock(d->grant_table->lock); + spin_unlock(&d->grant_table->lock); break; default: break;