From patchwork Wed Dec 2 19:59:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11947001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E6FAC6369E for ; Wed, 2 Dec 2020 20:01:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB89922261 for ; Wed, 2 Dec 2020 20:01:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB89922261 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xoW1IHhocokndDN/20hXHxTwptQee5C8zbZPNkJjgL8=; b=U/K4xB/AyJRivDh527re6Uzz+ lMEeRAMXI6zla9kTKrKbyuS8jDg6+7U7wBtKY2VjaYzQ68TgdVaVF/Go8+Df7F+6NjEMDZ/5WJG5T AosJpiCrPZdRBtNmch4JyG8qpVeivsJBH8s4M/lQCQ1J1hYd2ilx/wRz5dtrquCMg0xQV9Sp0epQn trIzE9M7WOK0LdcKf+1dCAJoksbVk9E7mUWUaPx+aAd7rOXU1r7IBUl+qPzHB/uJJTfOks3QGVnP+ Zm0+AzvbQ6caPXsuHPIfdYHuXIDKKD9aA6Xke6HVRyKShLDV+87Ca+0GRSZzxPYraD9Uuzl0DcGoo +7sNyqx3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYIr-0005Uh-Dn; Wed, 02 Dec 2020 20:00:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYIo-0005Ty-D9 for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2020 20:00:39 +0000 From: Krzysztof Kozlowski Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] soc: samsung: exynos-chipid: initialize later - with arch_initcall Date: Wed, 2 Dec 2020 21:59:55 +0200 Message-Id: <20201202195955.128633-2-krzk@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201202195955.128633-1-krzk@kernel.org> References: <20201202195955.128633-1-krzk@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201202_150038_554198_3198F84A X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sylwester Nawrocki , Bartlomiej Zolnierkiewicz , Marek Szyprowski Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Exynos ChipID driver on Exynos SoCs has only informational purpose - to expose the SoC device in sysfs. No other drivers depend on it so there is really no benefit of initializing it early. Instead, initialize everything with arch_initcall which: 1. Allows to use dev_info() as the SoC bus is present (since core_initcall), 2. Could speed things up because of execution in a SMP environment (after bringing up secondary CPUs, unlike early_initcall), 3. Reduces the amount of work to be done early, when the kernel has to bring up critical devices. Signed-off-by: Krzysztof Kozlowski --- drivers/soc/samsung/exynos-chipid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index b4cd0cc00f45..1a76eade2ed6 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -99,9 +99,9 @@ static int __init exynos_chipid_early_init(void) goto err; } - /* it is too early to use dev_info() here (soc_dev is NULL) */ - pr_info("soc soc0: Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", - soc_dev_attr->soc_id, product_id, revision); + dev_info(soc_device_to_device(soc_dev), + "Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", + soc_dev_attr->soc_id, product_id, revision); return 0; @@ -111,4 +111,4 @@ static int __init exynos_chipid_early_init(void) return ret; } -early_initcall(exynos_chipid_early_init); +arch_initcall(exynos_chipid_early_init);