From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F0331848 for ; Fri, 10 Nov 2023 03:37:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="b5345Xd4" 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 2E4C12D6B 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-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-352-gBakX54iMz6zSJBp00u63w-1; Thu, 09 Nov 2023 22:37:23 -0500 X-MC-Unique: gBakX54iMz6zSJBp00u63w-1 Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-3b2ec6de4e4so63834b6e.1 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=vc4EbPLa6oYFYkjxbeopUo7RBFuIatj3mPenmpguGEpC9cX4Oy2FuHpaBuQwhnx5li aL+iSWOOT2B+a+eXlD1sbZXx5JLaKh0vG7EEJqEs2KjPTZ7fgjedfnEQH+aKFPZckN6Q LUt+K7u9yY2VObiJ06kyf7RP6eU9rtCwEQacykKgwz33jfnO3sU0ePCsqBW1h0y2xYB2 vquQxgVKSXCTTxWefrU/Jd2fJqNacPqraT1cnU0Cb7s6qwI/+jt2oIWxyYoqMpaeyj9A cd8xdMdCiBctWj8C/23urNLol4P1XcII0SrTucTbThas2PBde0KVFTFa1wZF6p9xYhmD QllA== X-Gm-Message-State: AOJu0YwUfa5hbtHy46EoR26e2SyuulIzjqov8x584q2lIphNU1NJ9amH BwnK8Ha/p26hbY0tnWlnGP7n6UT2PYQKycRuydUrzXVUHI+poatq0TMw9f0xzlEf1y3YUZQd+VQ OMjS+5WB22GW744GViigyvA== X-Received: by 2002:a05:6808:199c:b0:3a9:e8e2:579d with SMTP id bj28-20020a056808199c00b003a9e8e2579dmr8276246oib.2.1699587442423; 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 Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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