Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753329AbbG1PE5 (ORCPT ); Tue, 28 Jul 2015 11:04:57 -0400 Received: from smtp.citrix.com ([66.165.176.89]:23188 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311AbbG1PEy (ORCPT ); Tue, 28 Jul 2015 11:04:54 -0400 X-IronPort-AV: E=Sophos;i="5.15,563,1432598400"; d="scan'208";a="285194570" From: Julien Grall To: CC: , , , Julien Grall , Boris Ostrovsky , David Vrabel , Dmitry Torokhov , Greg Kroah-Hartman , "H. Peter Anvin" , Ingo Molnar , "James E.J. Bottomley" , Jean-Christophe Plagniol-Villard , Jiri Slaby , Juergen Gross , Konrad Rzeszutek Wilk , , , , , , , , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Russell King , "Thomas Gleixner" , Tomi Valkeinen , "Wei Liu" , Subject: [PATCH 0/8] Use correctly the Xen memory terminologies in Linux Date: Tue, 28 Jul 2015 16:02:41 +0100 Message-ID: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4972 Lines: 115 Hi all, This patch series aims to use the memory terminologies described in include/linux/mm.h [1] for Linux xen code. Linux is using mistakenly MFN when GFN is meant, I suspect this is because the first support of Xen was for PV. This has brought some misimplementation of memory helpers on ARM and make the developper confused about the expected behavior. For instance, with pfn_to_mfn, we expect to get a MFN based on the name. Although, if we look at the implementation on x86, it's returning a GFN. Most of the callers are also using it this way. The first 2 patches of this series is ARM related in order to remove PV specific helpers which should not be used and fixing the implementation of pfn_to_mfn. The rest of the series is here rename most of the usage in the common code of MFN to GFN. I also took the opportunity to replace most of the call to pfn_to_gfn in the common code by page_to_gfn avoid construction such as pfn_to_gfn(page_to_pfn(...). Note the one xen-blkfront will be dropped by 64K series [2], I can include it if necessary. This series is based on Linux 4.2-rc4. A branch with all the patches can be found here: git://xenbits.xen.org/people/julieng/linux-arm.git branch page-renaming-v1 Sincerely yours, [1] Xen tree: e758ed14f390342513405dd766e874934573e6cb [2] https://lkml.org/lkml/2015/7/9/628 Cc: Boris Ostrovsky Cc: David Vrabel Cc: Dmitry Torokhov Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ian Campbell Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jean-Christophe Plagniol-Villard Cc: Jiri Slaby Cc: Juergen Gross Cc: Konrad Rzeszutek Wilk Cc: linux-api@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-fbdev@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-scsi@vger.kernel.org Cc: netdev@vger.kernel.org Cc: "Roger Pau Monné" Cc: Russell King Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tomi Valkeinen Cc: Wei Liu Cc: x86@kernel.org Julien Grall (8): arm/xen: Remove helpers which are PV specific xen: Make clear that swiotlb and biomerge are dealing with DMA address arm/xen: implement correctly pfn_to_mfn xen: Use the correctly the Xen memory terminologies xen/tmem: Use page_to_gfn rather than pfn_to_gfn video/xen-fbfront: Further s/MFN/GFN clean-up hvc/xen: Further s/MFN/GFN clean-up xen/privcmd: Further s/MFN/GFN/ clean-up arch/arm/include/asm/xen/page.h | 44 +++++++++++++++--------------- arch/arm/xen/enlighten.c | 18 ++++++------- arch/arm/xen/mm.c | 4 +-- arch/x86/include/asm/xen/page.h | 34 +++++++++++++---------- arch/x86/xen/enlighten.c | 4 +-- arch/x86/xen/mmu.c | 48 ++++++++++++++++----------------- arch/x86/xen/p2m.c | 32 +++++++++++----------- arch/x86/xen/setup.c | 12 ++++----- arch/x86/xen/smp.c | 4 +-- arch/x86/xen/suspend.c | 8 +++--- drivers/block/xen-blkfront.c | 6 ++--- drivers/input/misc/xen-kbdfront.c | 4 +-- drivers/net/xen-netback/netback.c | 4 +-- drivers/net/xen-netfront.c | 8 +++--- drivers/scsi/xen-scsifront.c | 8 +++--- drivers/tty/hvc/hvc_xen.c | 18 +++++-------- drivers/video/fbdev/xen-fbfront.c | 20 +++++++------- drivers/xen/balloon.c | 2 +- drivers/xen/biomerge.c | 6 ++--- drivers/xen/events/events_base.c | 2 +- drivers/xen/events/events_fifo.c | 4 +-- drivers/xen/gntalloc.c | 3 ++- drivers/xen/manage.c | 2 +- drivers/xen/privcmd.c | 44 +++++++++++++++--------------- drivers/xen/swiotlb-xen.c | 16 +++++------ drivers/xen/tmem.c | 21 +++++---------- drivers/xen/xenbus/xenbus_client.c | 2 +- drivers/xen/xenbus/xenbus_dev_backend.c | 2 +- drivers/xen/xenbus/xenbus_probe.c | 8 +++--- drivers/xen/xlate_mmu.c | 18 ++++++------- include/uapi/xen/privcmd.h | 4 +++ include/xen/page.h | 4 +-- include/xen/xen-ops.h | 10 +++---- 33 files changed, 210 insertions(+), 214 deletions(-) -- 2.1.4 -- 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/