summaryrefslogtreecommitdiff
path: root/drivers/soc/fsl
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2019-11-28 15:55:43 +0100
committerLi Yang <leoyang.li@nxp.com>2019-12-09 13:54:36 -0600
commitb6231ea2b3c68101da186f0d274635a620dbf7a4 (patch)
tree991d2bcd539b3b5fa447dc71a7916108aea596da /drivers/soc/fsl
parent900470ce39996336a1d06da2015506106bb8ba42 (diff)
soc: fsl: qe: drop broken lazy call of cpm_muram_init()
cpm_muram_alloc_common() tries to support a kind of lazy initialization - if the muram_pool has not been created yet, it calls cpm_muram_init(). Now, cpm_muram_alloc_common() is always called under spin_lock_irqsave(&cpm_muram_lock, flags); and cpm_muram_init() does gen_pool_create() (which implies a GFP_KERNEL allocation) and ioremap(), not to mention the fun that ensues from cpm_muram_init() doing spin_lock_init(&cpm_muram_lock); In other words, this has never worked, so nobody can have been relying on it. cpm_muram_init() is called from a subsys_initcall (either from cpm_init() in arch/powerpc/sysdev/cpm_common.c or, via qe_reset(), from qe_init() in drivers/soc/fsl/qe/qe.c). Reviewed-by: Timur Tabi <timur@kernel.org> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc/fsl')
-rw-r--r--drivers/soc/fsl/qe/qe_common.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 48c77bb92846..dcb267567d76 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/fsl/qe/qe_common.c
@@ -119,9 +119,6 @@ static s32 cpm_muram_alloc_common(unsigned long size,
struct muram_block *entry;
s32 start;
- if (!muram_pool && cpm_muram_init())
- goto out2;
-
start = gen_pool_alloc_algo(muram_pool, size, algo, data);
if (!start)
goto out2;