Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6874606ybc; Thu, 28 Nov 2019 07:00:14 -0800 (PST) X-Google-Smtp-Source: APXvYqx2AW1vR9sVZLolpmTFfoqIFnQ4QJJTRCh0ylJ5gjJceICjhmKFim+nuZ1f5j8ResjsdtU1 X-Received: by 2002:aa7:cb53:: with SMTP id w19mr39045218edt.50.1574953214210; Thu, 28 Nov 2019 07:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953214; cv=none; d=google.com; s=arc-20160816; b=DjW0DfnKXOGI9TjLdDV0O7/VIVysRnNKmrXLuRIOYEkSeqw8lRY4zainwaWM9Dzo4E /rKABatt2eWYBSZbuf8iGp09NlALUCt1fxvglhm0a8hhZQs/xZmsVMJErk/v2HGvJu2q +ARPx4mHwJp6cSQmD2BSrhdok8HcIm5UlKo7AKLAj2SrHqbXWu1v8PsBzvJ8E/VKtV8T Ai4AX9sRp7So8zjTf6TKLzXqF37Qxdp6Zpe3EheYeOrx0O1BrELMZlQYjY8qEzvEIU3R RBOuJT0d/6oq1kD22wjkkiuQQxIJu8sQcbr5Em6YwyLu7F2Y0ehvUxQwRxuDM2LdEX6k l+cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Bun68+vGX0cpO8gva8KbJU3Sj9L3G/suxA//a5o0RU=; b=iqkV8OGMS6wTgjX4TDYVhTimUgMZUhF9dD/ctW6k/BXfJXJsM3G2Au8wr5BS2o4LGf Dg82Cv1vvZ1ZPaA0ZBhdD2vYeW2xxmAPe3pkjLWq2XDwfgEptxb7MC3c4u1kvkl04q0C DmTORIgECXZfDMTbZIdk280LdB460kIjUmOSpoK9dF7bASpLhay7x6zQvCBrA8FxS3Kd PPw0sHDoXHn5CskQzvtSQg2ev+hWcvRp6MEHbmPBF9JjJZ5qCEaVpXXHQd45mzpxiDQ1 eSe2fg8b2rJx+A0TOfNESdXaexK2bK1GhVN/oZse48TNSyd86Pfn4Hl82Oa3qHYVOj4o R7yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=BiUszVfH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si14428728edk.5.2019.11.28.06.59.50; Thu, 28 Nov 2019 07:00:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=BiUszVfH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727561AbfK1O6D (ORCPT + 99 others); Thu, 28 Nov 2019 09:58:03 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42529 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727516AbfK1O55 (ORCPT ); Thu, 28 Nov 2019 09:57:57 -0500 Received: by mail-lj1-f194.google.com with SMTP id e28so4648983ljo.9 for ; Thu, 28 Nov 2019 06:57:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Bun68+vGX0cpO8gva8KbJU3Sj9L3G/suxA//a5o0RU=; b=BiUszVfH4xD7TeJbkxiZNgcYZYOIlp+5P2RR1S2/Rw4kQ+d9IE9N4RrFlOWACnk7Ws VF2RmylZqWUGDJz4rHvV+iwDq4ISPLeUCaV7NiLCQBFZALMu33LIJqYp/YDL+Jp5UhJA wSTZVT532Z+h6FFEsGS5Q1g2A5XNjVwix2Dc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3Bun68+vGX0cpO8gva8KbJU3Sj9L3G/suxA//a5o0RU=; b=jmNY+Tk6lZKQv6bjYozAW7oh2oBNH/mgnpGz6PCzuG2hS7AoYvWcBWrVvgmUv+9eY5 USnzolFTQNlil4HF04CXjhDDCZs8DGsf2V3kdtWRLYOXqzPs9diKzYQ9Jem0hd0y+ywU OHdQe7IUejgXQX1e6o/vb6i4I/bxLTTqWCraIHOr/0npOxIcynjnvDWqASWfzUtCZgKD igwUviEdEIdZJIxGha5TIiZKNhU9zRaLMrxGJAWSDqs2Gc1eNqEX+zBcekBtnLPTF6Za 0hwUI3YeucUJF2jNUlBWgBAG3O0Q1RzlddUmt0gCyeP6a4BhdJ0gaSpac3/oZMhzBkHA TtvA== X-Gm-Message-State: APjAAAXSANxg1hb9sG4hm2Cji/kWYjA4mrrHqPE0JDVg51ddGeBFnZuD n3j8ivciPalwNpQxGDOZ2ALJyA== X-Received: by 2002:a2e:8855:: with SMTP id z21mr36010930ljj.212.1574953075288; Thu, 28 Nov 2019 06:57:55 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id u2sm2456803lfl.18.2019.11.28.06.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 06:57:54 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Timur Tabi , Rasmus Villemoes Subject: [PATCH v6 38/49] soc: fsl: qe: drop broken lazy call of cpm_muram_init() Date: Thu, 28 Nov 2019 15:55:43 +0100 Message-Id: <20191128145554.1297-39-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191128145554.1297-1-linux@rasmusvillemoes.dk> References: <20191128145554.1297-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_common.c | 3 --- 1 file changed, 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; -- 2.23.0