From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757805Ab3AIMCN (ORCPT ); Wed, 9 Jan 2013 07:02:13 -0500 Received: from smtp.eu.citrix.com ([46.33.159.39]:46092 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757578Ab3AIMCL (ORCPT ); Wed, 9 Jan 2013 07:02:11 -0500 X-IronPort-AV: E=Sophos;i="4.84,436,1355097600"; d="scan'208";a="543451" Message-ID: <1357732929.7989.250.camel@zakaz.uk.xensource.com> Subject: Re: [Xen-devel] [PATCH v2] xen/grant-table: correctly initialize grant table version 1 From: Ian Campbell To: ANNIE LI CC: Matt Wilson , Konrad Rzeszutek Wilk , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "xen-devel@lists.xen.org" Date: Wed, 9 Jan 2013 12:02:09 +0000 In-Reply-To: <50ECD89A.50100@oracle.com> References: <1357470882-17345-1-git-send-email-msw@amazon.com> <50ECD89A.50100@oracle.com> Organization: Citrix Systems, Inc. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2013-01-09 at 02:40 +0000, ANNIE LI wrote: > > @@ -1080,18 +1081,18 @@ static void gnttab_request_version(void) > > panic("we need grant tables version 2, but only version 1 is available"); > > } else { > > grant_table_version = 1; > > + grefs_per_grant_frame = PAGE_SIZE / sizeof(struct grant_entry_v1); > > gnttab_interface =&gnttab_v1_ops; > > } > > - printk(KERN_INFO "Grant tables using version %d layout.\n", > > - grant_table_version); > > } > > > > Is it better to keep printk here? In your last patch, you removed it > because gnttab_request_version and gnttab_resume are all called in > gnttab_init. and gnttab_resume also contains calling of > gnttab_request_version. But in this patch, gnttab_setup is used, and > does not have this issue now. Yes, I think we want to print this at both start of day and resume? Either by adding a print to gnttab_resume() or by keeping the existing one here in preference to moving it to gnttab_setup(). I'd prefer the latter to avoid the duplication, unless I'm mistaken and request_version is called in more than those two locations. Ian.