Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752484AbbKJBeR (ORCPT ); Mon, 9 Nov 2015 20:34:17 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34915 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbbKJBeO (ORCPT ); Mon, 9 Nov 2015 20:34:14 -0500 Subject: Re: [PATCHv4] mm: Don't offset memmap for flatmem To: Tony Luck , Laura Abbott References: <1444253335-5811-1-git-send-email-labbott@fedoraproject.org> Cc: Srinivas Kandagatla , Vlastimil Babka , Bjorn Andersson , Santosh Shilimkar , Russell King , Kevin Hilman , Arnd Bergman , Stephen Boyd , Andy Gross , Mel Gorman , Steven Rostedt , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , "linux-mm@kvack.org" , Andrew Morton From: Laura Abbott Message-ID: <56414993.8070709@labbott.name> Date: Mon, 9 Nov 2015 17:34:11 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1342 Lines: 35 On 11/9/15 3:20 PM, Tony Luck wrote: >> @@ -4984,9 +4987,9 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat) >> */ >> if (pgdat == NODE_DATA(0)) { >> mem_map = NODE_DATA(0)->node_mem_map; >> -#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP >> +#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) >> if (page_to_pfn(mem_map) != pgdat->node_start_pfn) >> - mem_map -= (pgdat->node_start_pfn - ARCH_PFN_OFFSET); >> + mem_map -= offset; >> #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */ >> } >> #endif > > This piece breaks ia64. See the comment earlier in the function > that "ia64 gets its own node_mem_map" ... so we skip the initialization > of offset ... and arrive down here and just subtract "0" from mem_map. > > Attached patch fixes ia64 ... does ARM still work if this is applied? > > -Tony > Yes, this still fixes the problem for me. I see the pfn <-> page translation working as expected. Tested-by: Laura Abbott Thanks, Laura -- 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/