From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbcHKXa1 (ORCPT ); Thu, 11 Aug 2016 19:30:27 -0400 Received: from host.buserror.net ([209.198.135.123]:39857 "EHLO host.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbcHKXaZ (ORCPT ); Thu, 11 Aug 2016 19:30:25 -0400 Message-ID: <1470958199.25630.266.camel@buserror.net> From: Scott Wood To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Zhao Qiang , "David S.Miller" Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, stable@vger.kernel.org Date: Thu, 11 Aug 2016 18:29:59 -0500 In-Reply-To: <20160808160858.4B9251A2452@localhost.localdomain> References: <20160808160858.4B9251A2452@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 75.72.173.242 X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Subject: Re: [PATCH] soc: fsl/qe: fix Oops on CPM1 (and likely CPM2) X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on host.buserror.net) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-08-08 at 18:08 +0200, Christophe Leroy wrote: > Commit 0e6e01ff694ee ("CPM/QE: use genalloc to manage CPM/QE muram") > has changed the way muram is managed. > genalloc uses kmalloc(), hence requires the SLAB to be up and running. > > On powerpc 8xx, cpm_reset() is called early during startup. > cpm_reset() then calls cpm_muram_init() before SLAB is available, > hence the following Oops. > > cpm_reset() cannot be called during initcalls because the CPM is > needed for console > > This patch splits cpm_muram_init() in two parts. The first part, > related to mappings, is kept as cpm_muram_init() > The second part is named cpm_muram_pool_init() and is called > the first time cpm_muram_alloc() is used Why do you need to split it, versus calling the full cpm_muram_init() on demand? -Scott