Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2483698ybx; Fri, 8 Nov 2019 05:05:02 -0800 (PST) X-Google-Smtp-Source: APXvYqymsP5kK9gLU46mdAUXvZcow5ZV6QytLBYhiru3V2+ftbwfyH6vktklN1BDAHe6aSErGDR0 X-Received: by 2002:a05:600c:24c9:: with SMTP id 9mr7941314wmu.137.1573218302763; Fri, 08 Nov 2019 05:05:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573218302; cv=none; d=google.com; s=arc-20160816; b=NFYBssDrZqsx1UiHipwKwhXPBzJX/bhaGacYDuVwm3HR5oZGdVZWnUM9EtvpFWxMSY uftOEkSYMdu34GA/+/UL0dHcOST3DuSviMmDdhSP1hvl2WA1XOoAzjQ3sVrZRTD/KhQx rfAYZzBFZHsiLIQCRl2Gws1k0vmh1iQuv+9+dbSV7tZA8NQVJZgn4bzjqU/HUr7YsOzw eewZ2G11sqgbbaia3dPY8ZT15e8jyaUawNxeSrGJejPEqRWai/LFCFv8EHRSHp/wJXXp M0JOuDAmadpGd5HEBlFLHzFDCFMG5RJmGUr4BtT5SczQ8Iik8CroNjlkAUo1Cf5qN3wc YojQ== 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=nGAR/RezFR3p4yZ/WuemAtPhyGpYuWvNUP10WcDqxdQ=; b=cdDpEDjnujJLRr4KDQPvPZgD+GNGXoQJWyeRs22+TRcIja5kehMvcRsspHsarFpnqM YEokiBn6cWtqzOh7gLFq0dzMI4rfow4gNAmLSoxW1cbOHvYQ05mqypKodGdaxsmWkRhj a7WtlUzzEI5FdhcI9mnUA7PaTNSU7VldlV2AUt2hwJFPAv+NU/cgWTOCgExZAGg3wHK6 8O7sGPybVyAxj1ESWr94Ci0h/4NttEbnZEEq7HZxB2Yk5iET8h3I+8VFXbMFQeq4Axp7 XGcm536WvStuEEN4+3bIgYvUtAFAf1e+9EbTT8f9F27EvtZPzmjzGR9cXwmzrpVB7pyY E+Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=E2itMeYz; 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 v13si5079160edb.164.2019.11.08.05.04.39; Fri, 08 Nov 2019 05:05:02 -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=E2itMeYz; 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 S1730745AbfKHNCX (ORCPT + 99 others); Fri, 8 Nov 2019 08:02:23 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:37909 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730279AbfKHNCQ (ORCPT ); Fri, 8 Nov 2019 08:02:16 -0500 Received: by mail-lj1-f195.google.com with SMTP id v8so6133402ljh.5 for ; Fri, 08 Nov 2019 05:02:15 -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=nGAR/RezFR3p4yZ/WuemAtPhyGpYuWvNUP10WcDqxdQ=; b=E2itMeYzpcpcvPiEYcR7QgT0vf86pgTt+txJLe4ypE1iKN4ygJjlMfIdTBHaIbca7l 8TpMr7BlmS1pHXW8Lc8yrYYMbrYpZ6OWxpbB6h/El0hJa3CJ4u+D0CSxshybjUOT8noF QvazWxYu0noVka+ujfegXunMpmQNGUILv+4L4= 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=nGAR/RezFR3p4yZ/WuemAtPhyGpYuWvNUP10WcDqxdQ=; b=WW5hWoY/g2nw3gOCy8FCRQPRcV5NZ3qt5TRqRsmAM1LFrMfcBfMhN26RFZ2/Spp1Mt WFTJ3pqg/UWMvJJwLzu5XuAwu0rnNYnGDGzDGrJ4wwxsAXyQyUoQSSYpX6lKRXMEigcO h4LB6YL3RstCZaovIYMExHBeYMZGemNWBlCpTFJo1ot+C/jjHjoYDjIvlgqWb3m370v8 4pNL+zR70J7br1Kb6mzE8m2bupCKpkeltbROKwjkngubXoWxNIRQgYDFCRVxkf1gm++g UJkY5AIMR6tivld2/xQ/2psYH2LYyMGs8EbEjj0NpWwmal5O1VySUMWGXxYP/kTMb8YC 7QMQ== X-Gm-Message-State: APjAAAUSY0fa9WJgJalIujTs8/yom1ti8zPjZ5hC41hEGzMdFKveoUap qTGZyH/Se5s5uOYyHXHnu+LrjA== X-Received: by 2002:a2e:9b4b:: with SMTP id o11mr6798538ljj.252.1573218134744; Fri, 08 Nov 2019 05:02:14 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id d28sm2454725lfn.33.2019.11.08.05.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 05:02:14 -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 , Rasmus Villemoes Subject: [PATCH v4 37/47] soc: fsl: qe: drop broken lazy call of cpm_muram_init() Date: Fri, 8 Nov 2019 14:01:13 +0100 Message-Id: <20191108130123.6839-38-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108130123.6839-1-linux@rasmusvillemoes.dk> References: <20191108130123.6839-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). 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 4437f4e14d2c..feb33ec1c3d6 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