Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1072505rdb; Fri, 20 Oct 2023 07:45:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3Ezjh4Yzbwl+lhUqyTMM5stQYpm5TXfwJgIoOaf2+iqRkE0/AckX9FGtTIdOW4OXCyy6m X-Received: by 2002:a17:90a:5308:b0:27d:1521:11a1 with SMTP id x8-20020a17090a530800b0027d152111a1mr2198645pjh.31.1697813151133; Fri, 20 Oct 2023 07:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697813151; cv=none; d=google.com; s=arc-20160816; b=Y2hRkJSRKZSgfQQtJXG7NRseji7asBImHjQZT3HupK3s918cu+o9mCzYtAuEJh9YUa t3+9/QI94wR58DHNLU4UkR/ZHUUnbNXCrmpYPOIQq7bspNgQ7j1C0JA/bK/DXSTH8/Xf wmNKqclSU4W4QT96aJ5QaHv3xCxBblnydNwD6ESsjlOPfNRAoAwFRGBFx+Xb526oeES9 4ZZ9XcUbQ3L4qo7vlx0hKq5t9DFXEhMtsaYwKdZb7uJQGN0UNpSVxyypCGuB2UtW2/wV Ak6GjfkPf+MHN14Im8F09PPOoZoMFloimDIS0wZ0Wvp0yuuFMQKYalSRs+kSUFTeqsbR DyQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:sender:message-id:content-transfer-encoding :content-disposition:mime-version:subject:cc:to:from:dkim-signature; bh=cDxywtFxZEUNp05zPiJtAEtgwzGlfWET0wpc3onEv/c=; fh=ClSjnYXQ/e0krynDil6gRDPxHOCMAuogadoXv1VoMZc=; b=O8A+ZeBi3ww1T0TMUA9oIFWyGWadpPtcB3djv+hwhXQlzxDOLswL+qTB6H65ZLvnxg DZbfz9ExWAYyfXuBrWdEiX1oiWtqqlSOZRVUOkINILZY8FTB8lYjoDmNISS9+fUJOrxo USyY9jvXOhN6j2ExUX9YB+DMD5fW0ICadGQbZF5a8G4pHj9fWCdqv8i6rsdrs1SXP3aA gdghLfHflNVDGHP0CK7wafrSLKkMQzrB5LU1PJw2V8AAhwB86p7GSD5sG9uXhVxMBPJP onII07fEAIu20BmWHAE2sWhpLTnKeN1NJ1dkAPai+sfY7AO/HyRzPTgjJeiRWol61UQ7 ertw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=GPLeDlz8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n16-20020a17090ac69000b00278eb61c0ebsi4578856pjt.118.2023.10.20.07.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:45:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=GPLeDlz8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EB319828CC39; Fri, 20 Oct 2023 07:45:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377579AbjJTOpk (ORCPT + 99 others); Fri, 20 Oct 2023 10:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377429AbjJTOpj (ORCPT ); Fri, 20 Oct 2023 10:45:39 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26441106; Fri, 20 Oct 2023 07:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cDxywtFxZEUNp05zPiJtAEtgwzGlfWET0wpc3onEv/c=; b=GPLeDlz8NZPdqaalFptDuwkfgg He7H0OvnM01HQb/90N87NEqkU6/7q6cu4gz6Xs7vXcSbfp7Bp70zUtr/Ke9If3SzmZPlqAQ7rmWhL EHe8spTakoPB9vD4Pr41hd9IigIcOMiTRmrYY7FKvL717JjxKBfMVKRFAtG+6J6YQ3ltQ9mAod82n X3aVWQz4pNHflalnnwPbSN/wDU17gRc5FIejYsy2ev6TdzJYXtnWKpcShgQK+GlOyV7ixTK/oxQbl KzPVN4VkGq4BgegruPDZ7XKXnaj8wQURiijPn8xIZU5+2H/+TglV61dD4JDkxs1/a+kgCxCJ8A2FF THo5uZdQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:49724 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qtqki-0000WW-22; Fri, 20 Oct 2023 15:45:28 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qtqkk-00AJHA-1u; Fri, 20 Oct 2023 15:45:30 +0100 From: "Russell King (Oracle)" To: Helge Deller , "James E.J. Bottomley" Cc: linux-kernel@vger.kernel.org, James Morse , Jonathan Cameron , Salil Mehta , linux-parisc@vger.kernel.org Subject: [PATCH] parisc: simplify smp_prepare_boot_cpu() MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Fri, 20 Oct 2023 15:45:30 +0100 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 20 Oct 2023 07:45:48 -0700 (PDT) smp_prepare_boot_cpu() reads the cpuid of the first CPU, printing a message to state which processor booted, and setting it online and present. This cpuid is retrieved from per_cpu(cpu_data, 0).cpuid, which is initialised in arch/parisc/kernel/processor.c:processor_probe() thusly: p = &per_cpu(cpu_data, cpuid); ... p->cpuid = cpuid; /* save CPU id */ Consequently, the cpuid retrieved seems to be guaranteed to also be zero, meaning that the message printed in this boils down to: pr_info("SMP: bootstrap CPU ID is 0\n"); Moreover, since kernel/cpu.c::boot_cpu_init() already sets CPU 0 to be present and online, there is no need to do this again in smp_prepare_boot_cpu(). Remove this code, and simplify the printk(). Signed-off-by: Russell King (Oracle) --- arch/parisc/kernel/smp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 2019c1f04bd0..989efc8c67a5 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -404,13 +404,8 @@ static int smp_boot_one_cpu(int cpuid, struct task_struct *idle) void __init smp_prepare_boot_cpu(void) { - int bootstrap_processor = per_cpu(cpu_data, 0).cpuid; - /* Setup BSP mappings */ - printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor); - - set_cpu_online(bootstrap_processor, true); - set_cpu_present(bootstrap_processor, true); + pr_info("SMP: bootstrap CPU ID is 0\n"); } -- 2.30.2