linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] soc: fsl/qe: fix Oops on CPM1 (and likely CPM2)
       [not found] <20160808160858.4B9251A2452@localhost.localdomain>
@ 2016-08-11 23:29 ` Scott Wood
  2016-08-12  6:25   ` Christophe Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Wood @ 2016-08-11 23:29 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Zhao Qiang, David S.Miller
  Cc: linux-kernel, linuxppc-dev, stable

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] soc: fsl/qe: fix Oops on CPM1 (and likely CPM2)
  2016-08-11 23:29 ` [PATCH] soc: fsl/qe: fix Oops on CPM1 (and likely CPM2) Scott Wood
@ 2016-08-12  6:25   ` Christophe Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe Leroy @ 2016-08-12  6:25 UTC (permalink / raw)
  To: Scott Wood, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Zhao Qiang, David S.Miller
  Cc: linux-kernel, linuxppc-dev, stable



Le 12/08/2016 à 01:29, Scott Wood a écrit :
> 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?
>

There are drivers like for instance de i2c-cpm driver, that for instance 
call cpm_muram_addr() before calling cpm_muram_alloc()
Therefore, we need muram_vbase and muram_pbase set.

So if we want to keep a single function, it means we also have to call 
it on demand from cpm_muram_addr(), cpm_muram_offset() and cpm_muram_dma().

Is that what you recommend ?

Christophe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-12  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20160808160858.4B9251A2452@localhost.localdomain>
2016-08-11 23:29 ` [PATCH] soc: fsl/qe: fix Oops on CPM1 (and likely CPM2) Scott Wood
2016-08-12  6:25   ` Christophe Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).