From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 162E1C4332F for ; Fri, 10 Nov 2023 03:38:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345839AbjKJDiO (ORCPT ); Thu, 9 Nov 2023 22:38:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234633AbjKJDiL (ORCPT ); Thu, 9 Nov 2023 22:38:11 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C975468A for ; Thu, 9 Nov 2023 19:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699587444; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pROeszy9ePncz4nZyjZpb065/8N1ucMk0OODbP+hams=; b=b5345Xd4CfAHxovucD90DpRX2u+HjGodmOo2tM1PmGl9pbs2YS6YMFg3bqB0yoWOn1BbbP kSRaQ7GbD/VFxoBBbMZmqlPSaliyNc6mf939PPMsN/5At0ps8De3tzo/lvpMo0Zeyv3N1Z QtstkZ2hLbue4IfyLhwRBcqnee8hqNw= Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-160-bRY2qTLhM2meYUnbKYPvnA-1; Thu, 09 Nov 2023 22:37:23 -0500 X-MC-Unique: bRY2qTLhM2meYUnbKYPvnA-1 Received: by mail-oi1-f198.google.com with SMTP id 5614622812f47-3b3ecd1be0bso67900b6e.0 for ; Thu, 09 Nov 2023 19:37:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699587442; x=1700192242; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pROeszy9ePncz4nZyjZpb065/8N1ucMk0OODbP+hams=; b=G7E8TQQ1QXv96Dxa1E+tLNBwUlWiLq6S2NtY9lVRo9I2hMqsuu0jY3SWoxwldaERfu TaTiOmPBC2XEfBQuG8rZHk/AnxgDE+iHTDq8xv5RavozHYZYeQ7+mIXWk/u5viwk/bYw 9PGy15c1yRVdK+DnzeyMJAveYQRN/1/bwJp0W6+EHSGun5Zbm5XUr3JHD2oUs729KZq1 On5pBkVA0OwhBpYUXazPpj/ltF+pbIw246uTlR+KA9ySmpTg2j+PqkIaZlg8i2MtIYOa dq8xGuXU3QRy9Z/upgJe8mazIW1PU71LgMfSEFW71SPivUrzcKAPpF8pVmxQzpxzDtuS mRPg== X-Gm-Message-State: AOJu0YykeQJOWmbQTa+sGt+BP1m2fiV/rNxqMnSflL7D/yg4zuESkujG jgGlmHkT4YLXo29szQ8BfgZd0r6b6ka5XkiyS78tqznMOv6prJ6eRqgANCQbpk2iAHBGeK7lnI8 uDiqlrnpQRaBlYN+91aMMgKBw X-Received: by 2002:a05:6808:199c:b0:3a9:e8e2:579d with SMTP id bj28-20020a056808199c00b003a9e8e2579dmr8276251oib.2.1699587442424; Thu, 09 Nov 2023 19:37:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPdXOyaUAzV6aldemEymWFIQu5uK8SS6EoZEeBtta4Ue7SEB3JH44cFaCIyyqf1iZkLKsTPg== X-Received: by 2002:a05:6808:199c:b0:3a9:e8e2:579d with SMTP id bj28-20020a056808199c00b003a9e8e2579dmr8276228oib.2.1699587442206; Thu, 09 Nov 2023 19:37:22 -0800 (PST) Received: from [10.66.61.39] ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id e8-20020a63d948000000b005a9b20408a7sm5370547pgj.23.2023.11.09.19.37.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Nov 2023 19:37:21 -0800 (PST) Message-ID: Date: Fri, 10 Nov 2023 11:37:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH RFC 14/22] arm64: convert to arch_cpu_is_hotpluggable() Content-Language: en-US To: "Russell King (Oracle)" , 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, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org Cc: Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse , Catalin Marinas , Will Deacon References: From: Shaoqin Huang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/23 18:30, Russell King (Oracle) wrote: > Convert arm64 to use the arch_cpu_is_hotpluggable() helper rather than > arch_register_cpu(). > > Signed-off-by: Russell King (Oracle) Reviewed-by: Shaoqin Huang > --- > arch/arm64/kernel/setup.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c > index 165bd2c0dd5a..42c690bb2d60 100644 > --- a/arch/arm64/kernel/setup.c > +++ b/arch/arm64/kernel/setup.c > @@ -402,13 +402,9 @@ static inline bool cpu_can_disable(unsigned int cpu) > return false; > } > > -int arch_register_cpu(int num) > +bool arch_cpu_is_hotpluggable(int num) > { > - struct cpu *cpu = &per_cpu(cpu_devices, num); > - > - cpu->hotpluggable = cpu_can_disable(num); > - > - return register_cpu(cpu, num); > + return cpu_can_disable(num); > } > > static void dump_kernel_offset(void) -- Shaoqin