Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998AbbGXJwo (ORCPT ); Fri, 24 Jul 2015 05:52:44 -0400 Received: from smtp.citrix.com ([66.165.176.89]:22567 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847AbbGXJwn (ORCPT ); Fri, 24 Jul 2015 05:52:43 -0400 X-IronPort-AV: E=Sophos;i="5.15,537,1432598400"; d="scan'208";a="284023118" Message-ID: <55B20AD0.8050007@citrix.com> Date: Fri, 24 Jul 2015 10:52:16 +0100 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Julien Grall , CC: , , , , "Greg Kroah-Hartman" , Jiri Slaby , Boris Ostrovsky , Subject: Re: [PATCH v2 11/20] tty/hvc: xen: Use xen page definition References: <1436474552-31789-1-git-send-email-julien.grall@citrix.com> <1436474552-31789-12-git-send-email-julien.grall@citrix.com> In-Reply-To: <1436474552-31789-12-git-send-email-julien.grall@citrix.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 762 Lines: 24 On 09/07/15 21:42, Julien Grall wrote: > The console ring is always based on the page granularity of Xen. [...] > --- a/drivers/tty/hvc/hvc_xen.c > +++ b/drivers/tty/hvc/hvc_xen.c > @@ -392,7 +392,7 @@ static int xencons_connect_backend(struct xenbus_device *dev, > if (xen_pv_domain()) > mfn = virt_to_mfn(info->intf); > else > - mfn = __pa(info->intf) >> PAGE_SHIFT; > + mfn = __pa(info->intf) >> XEN_PAGE_SHIFT; Change this to gfn = xen_page_to_gfn(virt_to_page(info->intf)); and drop the if()? David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/