Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753118AbcJJPd4 (ORCPT ); Mon, 10 Oct 2016 11:33:56 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:36623 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbcJJPdy (ORCPT ); Mon, 10 Oct 2016 11:33:54 -0400 Message-ID: <57FBB4DE.2090502@gmail.com> Date: Mon, 10 Oct 2016 08:33:50 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Robert Richter CC: Catalin Marinas , Will Deacon , Mark Rutland , linux-efi@vger.kernel.org, David Daney , Ard Biesheuvel , linux-kernel@vger.kernel.org, Hanjun Guo , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section References: <1475747527-32387-1-git-send-email-rrichter@cavium.com> In-Reply-To: <1475747527-32387-1-git-send-email-rrichter@cavium.com> Content-Type: text/plain; charset=ISO-8859-1; 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: 1306 Lines: 38 On 10/06/2016 02:52 AM, Robert Richter wrote: > There is a memory setup problem on ThunderX systems with certain > memory configurations. The symptom is > > kernel BUG at mm/page_alloc.c:1848! > > This happens for some configs with 64k page size enabled. The bug > triggers for page zones with some pages in the zone not assigned to > this particular zone. In my case some pages that are marked as nomap > were not reassigned to the new zone of node 1, so those are still > assigned to node 0. > > The reason for the mis-configuration is a change in pfn_valid() which > reports pages marked nomap as invalid: > > 68709f45385a arm64: only consider memblocks with NOMAP cleared for linear mapping > > This causes pages marked as nomap being no long reassigned to the new > zone in memmap_init_zone() by calling __init_single_pfn(). > > Fixing this by restoring the old behavior of pfn_valid() to use > memblock_is_memory(). Also changing users of pfn_valid() in arm64 code > to use memblock_is_map_memory() where necessary. This only affects > code in ioremap.c. The code in mmu.c still can use the new version of > pfn_valid(). > > Should be marked stable v4.5.. In that case you should add: Cc: # 4.5.x- here. > > Signed-off-by: Robert Richter [...]