From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872AbcCAC4p (ORCPT ); Mon, 29 Feb 2016 21:56:45 -0500 Received: from mga11.intel.com ([192.55.52.93]:29833 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbcCAC4o (ORCPT ); Mon, 29 Feb 2016 21:56:44 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,521,1449561600"; d="scan'208";a="914042888" Subject: [PATCH 0/2] devm_memremap_pages vs section-misaligned pmem From: Dan Williams To: linux-nvdimm@ml01.01.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Date: Mon, 29 Feb 2016 18:56:20 -0800 Message-ID: <20160301025620.12812.87268.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Recent testing uncovered two bugs around the handling of section-misaligned pmem regions: 1/ If the pmem section overlaps "System RAM" we need to fail the devm_memremap_pages() request. Previously we would mis-detect a memory map like the following: 100000000-37bffffff : System RAM 37c000000-837ffffff : Persistent Memory 2/ If the pmem section is misaligned, but otherwise does not overlap memory from another zone, the altmap needs to be fixed up to add the alignment padding to the 'reserved ' pfns of the altmap. --- Dan Williams (2): libnvdimm, pmem: fix 'pfn' support for section-misaligned namespaces mm: fix mixed zone detection in devm_memremap_pages drivers/nvdimm/pmem.c | 29 +++++++++++++++++++++++++++-- kernel/memremap.c | 9 ++++----- 2 files changed, 31 insertions(+), 7 deletions(-)