Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3800225rdb; Thu, 14 Sep 2023 03:06:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZa+YeY4iUVcocauAwKz0CCk4BZEjzCorkpXDSi2T5IEMxtcofEsa155ev9bwLyk5Sf6z0 X-Received: by 2002:a05:6a21:a592:b0:14d:a7d8:5856 with SMTP id gd18-20020a056a21a59200b0014da7d85856mr2254067pzc.2.1694685998422; Thu, 14 Sep 2023 03:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694685998; cv=none; d=google.com; s=arc-20160816; b=pQBcrcfOUGdbDkkQwqx2BJr/qe+/rBq9e8ca76zImWBoXdHLE+UM8CYvNu0IvmRtZw ofdrA9b4M9mjZhycgeuUlp5TzF85Urj4/cnJ1fVtr4bHoT7a5/OBMeShjNOdW523OfYe G4bhA8SgQ4k4DWMPW2q/cxznsgwmWjTqMx31im7grgA7uwmn4LYB3CkAyDO+rUq1La0v Ul0t1mbLuidXAnfvaj343ahujZr6MSlB2uMblF7tNz3hT/diHnG/w94dy+QfNl6GII3t q3ok9QlIMP89jbRjJJnE2LlxDtTJois+d3wklofmsrGvkj/ek/GwCZNLgfxVO/LywHV4 u2mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kjCoeFUXcWqdbQ4ytSudIB7XxdSYxvc86vXHZmkFftM=; fh=zy1Co7PYFmuXUg2eZotSjXGb5HebW9Y60njLFSa2hrI=; b=zvU3U+v/xCGE35WLFkzPxverh3HDK3SpiigZjYmTiPjQugHKCdwn9mKhXk8DwXirAK 55tyGokD8APkwOQOlHaDZVlWzEWLL2eyYsVwlfQGa6zT+GGya9OxRZuYvqwr/ZX5vr7k 89gxLIBlKpq0eJaW2yYBR/LI7/WcCasE3lu1KczIg6we/HK3feFcamfb76BGYo7tShUX sTZasIehvkkjyclbvkTv8XFmoaj1uI8C+wFAXJtCTQqDHWhSWxIBBHeChdZDCc0nrmr/ KC6lZTFGQyjA12IOa98GsGlZZrz1siGhSwf2lDV5T5lcyJqb3/MpXmVd7pCwbiHYwEmP Kmdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=rhzpvQlx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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. [23.128.96.33]) by mx.google.com with ESMTPS id cr10-20020a056a000f0a00b0068fb75d68dcsi1267043pfb.206.2023.09.14.03.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 03:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=rhzpvQlx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 6217380E7621; Thu, 14 Sep 2023 02:53:11 -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 S237575AbjINJxK (ORCPT + 99 others); Thu, 14 Sep 2023 05:53:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237603AbjINJxG (ORCPT ); Thu, 14 Sep 2023 05:53:06 -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 670601BFF; Thu, 14 Sep 2023 02:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kjCoeFUXcWqdbQ4ytSudIB7XxdSYxvc86vXHZmkFftM=; b=rhzpvQlxSHf24Gd5N7JBIAIQdh dLEtXRF4OgBDxIlF5hWj+Cx8mp2MGZZVwpoTdcH+pfAHOWXtY/OvJz5ZjdkVFlguAoh9uJJDY/DgI 6E+xe6xX02/J2eLbxvTxpvoYoAtVzmM3RqqHQEbksCz7wCDyta1Y1ZAx+QFISaWA4/fr3p7eqVBPg BqjpJKJFZN4dpbfl9WPXpG0nVqeZiI5ysbUSnNvxOLprDrJ+htXi6/VlBsZJQVTxJYvBVBsTjQkaA mOcj/oH8B4WaaVrenHXrDU0VgvPmsS+IzB/Iip4ia74aT5CqJrhqDtAh8KXGz4QZK4wTVVvY9SYgz ZbFDsgiA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:36094) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qgj1u-0003pI-0M; Thu, 14 Sep 2023 10:52:58 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qgj1t-0004ee-CA; Thu, 14 Sep 2023 10:52:57 +0100 Date: Thu, 14 Sep 2023 10:52:57 +0100 From: "Russell King (Oracle)" To: James Morse Cc: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kvmarm@lists.linux.dev, x86@kernel.org, Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com Subject: Re: [RFC PATCH v2 05/35] drivers: base: Print a warning instead of panic() when register_cpu() fails Message-ID: References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-6-james.morse@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230913163823.7880-6-james.morse@arm.com> Sender: Russell King (Oracle) 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]); Thu, 14 Sep 2023 02:53:11 -0700 (PDT) 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 On Wed, Sep 13, 2023 at 04:37:53PM +0000, James Morse wrote: > loongarch, mips, parisc, riscv and sh all print a warning if > register_cpu() returns an error. Architectures that use > GENERIC_CPU_DEVICES call panic() instead. > > Errors in this path indicate something is wrong with the firmware > description of the platform, but the kernel is able to keep running. > > Downgrade this to a warning to make it easier to debug this issue. > > This will allow architectures that switching over to GENERIC_CPU_DEVICES > to drop their warning, but keep the existing behaviour. > > Signed-off-by: James Morse Assuming other architectures do similar to x86 (which only return the error code from register_cpu()), the only error that would occur here is if device_register() fails, which would be catastophic, and I suspect the system would fail to boot anyway. Downgrading the panic to a warning at least gives us a chance that the system may come up sufficiently to examine what happened, so I think this makes sense: Reviewed-by: Russell King (Oracle) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!