Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp492981rwb; Thu, 1 Dec 2022 05:01:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf73gAqKEXYkIc2UWthBk2Ps3l/jobppL6fM3EAl+FW/bjOXh9tJlAN13nEzXGyiWYVEsqWL X-Received: by 2002:a63:1062:0:b0:470:a47:996a with SMTP id 34-20020a631062000000b004700a47996amr41170353pgq.377.1669899663250; Thu, 01 Dec 2022 05:01:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669899663; cv=none; d=google.com; s=arc-20160816; b=HB8VoRokjDAb7c5vRTLJcBTyKMuAuVZ7Saa+IGYF/9E2s+g9xgfL93VD1eRcC6a4Kp /CgXDghVgytMSirnvmJ39gVQQJrFCS7qiu8/kwT26MsI4THnxNPAhfSzc9IY4oz+nm5O f8icyR7GXIyHD6XbedEkU4zBjPoqsb9aZkYVWlMiWg61QnFZtzKY3YZZyIhfM+3TPvgQ 2ey5Ex/Ept5Sy+EGorux25qRRq2Mk2Q3DLPz9FaXjXQ7GyNpXyIdTKkj1mtFHwZYx4/z 8jVb2GD7m5NGQ4Yr/trzuaE3S2x2SdElZR/fk607FlIlPBInnp6kxyphF85ppZSndsdB XOUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Jc2rbam4Qj3eO3JOIx5RE+KusaIA1U9FRV73T9rGhU4=; b=RPGqDurs2oHG7tCApjww99lVIN7RI8SMCqD+W+9FXr+7JZg+YDXJaoJJu1oOnWI4FI ffXw5Ytcj8n+hGlhlrMJd/NZVJUqI2L24/mdRzU6c07J/tKeCsqMAi27X8bSEmyjryyU XFVJIN9r+xzKrW8IAMnXhWShXNfCXa2qpSSMUTRbSMZ/Jlbu5lCoiB7SJ7DCeJJAEL54 XkGWaYa4Hv5YKjBlM+2H4JoFgoENE+4PF7aru8pRwFfwJqlIqedCu94MkhFwg1TbOR7s wWIpIiDTgTA2WX8iSnthO0U1cUeVmU+crQL0X46yVbKprjZALUY2zwJTYA1A/V4fQ4gb LivQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ab2iKx/k"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a056a00170700b005750eab25bcsi5115573pfc.86.2022.12.01.05.00.47; Thu, 01 Dec 2022 05:01:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ab2iKx/k"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229503AbiLALk1 (ORCPT + 82 others); Thu, 1 Dec 2022 06:40:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbiLALkU (ORCPT ); Thu, 1 Dec 2022 06:40:20 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 961BE975EB for ; Thu, 1 Dec 2022 03:40:16 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669894814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Jc2rbam4Qj3eO3JOIx5RE+KusaIA1U9FRV73T9rGhU4=; b=ab2iKx/k01qIJ64yPbGPxSnvGi9O//hFngq2b7CuHZqpfm7hsPLBbIot3BpZlN3kXWi1dO PsD4dE96+B6b8Z4Fz7VpxA2dgXJnyv/nT+HVG3wT0KgOWYuNf+ThNIosUukBePJ7a4e0vG rivCrbXfeEW1LFw9pVAoaCrZRtYP23mXAreMN9kr3Bu4dUnLhLAcYlpePcxyqYbzugwt4e rMx7GTEWhyfgV2RXb4LIBqnF1ggJ9id+ZtIkDnHm8rf5NukurhE+TEwNDXRskEKDAODFsy 2A5yElp4KESmobn3vWL0LU0TDrlH+T0bZNS0qbHb7jSUhLEkAQ7U0wlKSiACxQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669894814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Jc2rbam4Qj3eO3JOIx5RE+KusaIA1U9FRV73T9rGhU4=; b=sdce1mQLNbN/E9XjHK/bzd5WnA4lOf7xac5I/9eiTBeJIDgKmUt27de2uHwkB6v+td9vFu 7DtBBYWy7312u1Bw== To: Yuan ZhaoXiong , steven.price@arm.com, Jason@zx2c4.com, juri.lelli@redhat.com, tony.luck@intel.com, frederic@kernel.org, yuanzhx326@gmail.com, sathyanarayanan.kuppuswamy@linux.intel.com Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpu: printk error information when call cpu_up() failed. In-Reply-To: <20221128132803.17599-1-yuanzhx326@gmail.com> References: <20221128132803.17599-1-yuanzhx326@gmail.com> Date: Thu, 01 Dec 2022 12:40:13 +0100 Message-ID: <87h6yfs676.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 28 2022 at 21:28, Yuan ZhaoXiong wrote: > It is better to printk error information out when calling cpu_up() failed. > Users will observe cpu up error conveniently via the kernel log. ... > + if (!cpu_online(cpu)) { > + error = cpu_up(cpu, CPUHP_ONLINE); > + if (error) > + pr_err("Error taking CPU%d up: %d\n", cpu, error); What's useful about it? If the CPU does not come up then it won't be online. The error code is pretty useless too because it does not tell you which part of the online procedure caused it to fail. Just assume it fails with -ENOMEM, then good luck to find the callback which observed the memory allocation fail. Thanks, tglx