Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp803054rdg; Wed, 11 Oct 2023 06:08:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELA7Kgi4jxqWUweW0a6LY7SY7MjOsnCdQ4H3ivSS8NZYNDEWroBPBkRn03ZX8XJT0Y8pfn X-Received: by 2002:a17:90b:4c03:b0:26c:f6d2:2694 with SMTP id na3-20020a17090b4c0300b0026cf6d22694mr18439270pjb.12.1697029687131; Wed, 11 Oct 2023 06:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697029687; cv=none; d=google.com; s=arc-20160816; b=i4KV3qJb4SGolR1FRYIPgShJ99eKJc3CQdyMtn1wpFjxp/4AOMK0UT8CG4utr3lW3t Vwy2rODHb4cs1qZ7VQPUk9zsp7TsN+h8A5TwS+BpxtlZo94Z4h4MB2ypjxqeO6ei3zPo +RZeR1iKgFXq5OCpj7qDJ8mjttPOd4sdebv4eqaep6DmFHzMGaDKz6TRmH5Amv/RydE5 tJZOYyJMasm5Or1SrgnFu+f2kwkwcMkNT9S8mcE7yXSG8xXr9/ys+E5BW5ni8TNY+8YN FW/z+M65Dd+S2Utggypx26pZ+hoCLPKz72xuKnHnrLgdq/siHP72yemcBuKPqZgIn/U/ RnGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bFwI6BeUdungfIuZ5rS3/4D4/ZRkQlLig0Sobqc1T4k=; fh=xDd0Qwl4MrjIQcp9OHZVw4DuXaTa/GWyorukZppqvkQ=; b=mSOii+liMuC8Cn6RlYqORaGWCbmZs8wJt5tadimDuhIn7E5eWlz/JcPIwYFqPBlCLU LyyEs0TLrPW4JNKnrCP5kvO6ayHfK4VvAFnuKQ+smMm0gTWc7c+mRUfEEPlhtG/lzwwr YdL2UWM/4vKKujJq7V7+6+YPy2alFLHJE92bZceTPHuda0VYYxUk3bIXA6bIN7+y5OfB MlXIrf6N9dm2ITD0NyNXelebd5I589HwKWD72h+l19CM6bkSiARAP32XRDg5vK55HwZe 3PU9bGrXrGBUCVNB/kt/40W9sdBLp6wW7IyweHY20EK+wUF/RkuM6ZMr6fcr6o+qt91O HRiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=J6fs9sLy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b1-20020a17090aa58100b00263e423753dsi13664337pjq.42.2023.10.11.06.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:08:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=J6fs9sLy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6AB4C808EF7D; Wed, 11 Oct 2023 06:08:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234944AbjJKNH5 (ORCPT + 99 others); Wed, 11 Oct 2023 09:07:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbjJKNHw (ORCPT ); Wed, 11 Oct 2023 09:07:52 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDE3EA9 for ; Wed, 11 Oct 2023 06:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697029670; x=1728565670; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=KLhN9KgQsZyg0n8Ly1Pb7b8a/0TBjyZmAM7hyIaqDU0=; b=J6fs9sLyRoI03cWWBHvxDYGmvSjZ9fbOUsYOMa5VTkXBWhy0W4ep3sG4 t/B5SpDOoTluUhn1q/aIZ+okZ5VQfhE3PJ9wBOd9MSNOm1WbM24B+Tafm miaA/CqhjysrZnGoPXqPDjXH9qF9RKTDPnJuc4YAXcaY8GVaNpYp1bvVS 42ddhRzAZRVCV7GER5NU7vnQGCyKawVQbltCgNJeaxHjKVpAyPrQlRTTO gqTNbY3CZA/u7ziiAhkuwGGqnXdWtXmGI2Nsf5uEHO29CvJpuZE92DhY5 Mi6q6P7CveRowvwjTi2G4vmD2dBkyoMm2NOm/UCr7bsl78vAshjQ2oE8+ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10860"; a="415703647" X-IronPort-AV: E=Sophos;i="6.03,216,1694761200"; d="scan'208";a="415703647" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 06:07:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10860"; a="788987517" X-IronPort-AV: E=Sophos;i="6.03,216,1694761200"; d="scan'208";a="788987517" Received: from laptop-dan-intel.ccr.corp.intel.com (HELO box.shutemov.name) ([10.252.56.166]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 06:07:46 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 0FD8B109FB5; Wed, 11 Oct 2023 16:07:43 +0300 (+03) Date: Wed, 11 Oct 2023 16:07:43 +0300 From: "Kirill A. Shutemov" To: Kuppuswamy Sathyanarayanan Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/13] kernel/cpu: Add support for declaring CPU hotplug not supported Message-ID: <20231011130743.mdfi27pdwktefbsv@box.shutemov.name> References: <20231005131402.14611-1-kirill.shutemov@linux.intel.com> <20231005131402.14611-3-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=2.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:08:03 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 06:35:59AM -0700, Kuppuswamy Sathyanarayanan wrote: > > > On 10/5/2023 6:13 AM, Kirill A. Shutemov wrote: > > The function cpu_hotplug_not_supported() can be called to indicate that > > CPU hotplug should be disabled. It does not prevent the initial bring up > > of the CPU, but it stops subsequent offlining. > > > > This function is intended to replace CC_ATTR_HOTPLUG_DISABLED. > > > > Looks good to me. > > Reviewed-by: Kuppuswamy Sathyanarayanan Thanks. > > @@ -543,6 +546,18 @@ static void lockdep_release_cpus_lock(void) > > rwsem_release(&cpu_hotplug_lock.dep_map, _THIS_IP_); > > } > > > > +/* > > + * Declare CPU hotplug not supported. > > + * > > + * It doesn't prevent initial bring up of the CPU, but stops offlining. > > + */ > > +void cpu_hotplug_not_supported(void) > > +{ > > + cpu_maps_update_begin(); > > + cpu_hotplug_supported = false; > > + cpu_maps_update_done(); > > +} > > Since this function is not used in this patch, do you need to add __maybe_unused to > avoid warnings? Hm? I don't think compiler complains about non-static unused functions. It has no visibility if it is used. -- Kiryl Shutsemau / Kirill A. Shutemov