From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753491AbdK0Uy0 (ORCPT ); Mon, 27 Nov 2017 15:54:26 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:40920 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752645AbdK0UyY (ORCPT ); Mon, 27 Nov 2017 15:54:24 -0500 X-Google-Smtp-Source: AGs4zMaTZawMbKWfVDk4NaLP+0N9uSYwT+jGJQapKUeYnj+rmY6zXcK53XYE21id0nUCdT5IsNPMXQ== Date: Mon, 27 Nov 2017 12:54:21 -0800 From: Tejun Heo To: Nicolas Pitre Cc: Guenter Roeck , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mikael Starvik , Jesper Nilsson , linux-cris-kernel@axis.com Subject: Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang) Message-ID: <20171127205421.GR983427@devbig577.frc2.facebook.com> References: <20171118182542.GA23928@roeck-us.net> <20171127194105.GM983427@devbig577.frc2.facebook.com> <20171127203335.GQ983427@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Nicolas. On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > Subject: percpu: hack to let the CRIS architecture to boot until they clean up > > Commit 438a506180 ("percpu: don't forget to free the temporary struct > pcpu_alloc_info") uncovered a problem on the CRIS architecture where > the bootmem allocator is initialized with virtual addresses. Given it > has: > > #define __va(x) ((void *)((unsigned long)(x) | 0x80000000)) > > then things just work out because the end result is the same whether you > give this a physical or a virtual address. > > Untill you call memblock_free_early(__pa(address)) that is, because > values from __pa() don't match with the virtual addresses stuffed in the > bootmem allocator anymore. > > Avoid freeing the temporary pcpu_alloc_info memory on that architecture > until they fix things up to let the kernel boot like it did before. > > Signed-off-by: Nicolas Pitre This totally works for me. Replaced the revert with this one. Thanks! -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id 206256B0033 for ; Mon, 27 Nov 2017 15:54:25 -0500 (EST) Received: by mail-qt0-f197.google.com with SMTP id j12so10070065qtc.20 for ; Mon, 27 Nov 2017 12:54:25 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a125sor19144908qkd.95.2017.11.27.12.54.24 for (Google Transport Security); Mon, 27 Nov 2017 12:54:24 -0800 (PST) Date: Mon, 27 Nov 2017 12:54:21 -0800 From: Tejun Heo Subject: Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang) Message-ID: <20171127205421.GR983427@devbig577.frc2.facebook.com> References: <20171118182542.GA23928@roeck-us.net> <20171127194105.GM983427@devbig577.frc2.facebook.com> <20171127203335.GQ983427@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Nicolas Pitre Cc: Guenter Roeck , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mikael Starvik , Jesper Nilsson , linux-cris-kernel@axis.com Hello, Nicolas. On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > Subject: percpu: hack to let the CRIS architecture to boot until they clean up > > Commit 438a506180 ("percpu: don't forget to free the temporary struct > pcpu_alloc_info") uncovered a problem on the CRIS architecture where > the bootmem allocator is initialized with virtual addresses. Given it > has: > > #define __va(x) ((void *)((unsigned long)(x) | 0x80000000)) > > then things just work out because the end result is the same whether you > give this a physical or a virtual address. > > Untill you call memblock_free_early(__pa(address)) that is, because > values from __pa() don't match with the virtual addresses stuffed in the > bootmem allocator anymore. > > Avoid freeing the temporary pcpu_alloc_info memory on that architecture > until they fix things up to let the kernel boot like it did before. > > Signed-off-by: Nicolas Pitre This totally works for me. Replaced the revert with this one. Thanks! -- tejun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org