Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3963870rdb; Mon, 11 Dec 2023 05:22:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0BcynZJma2anIzhNfwfSqgXkeXHVC1+oBJxoMcSjI6gD2QYqCUMITLvc8cPcoZ+nDQc3q X-Received: by 2002:a05:6a20:748f:b0:18f:97c:9270 with SMTP id p15-20020a056a20748f00b0018f097c9270mr2091940pzd.85.1702300924436; Mon, 11 Dec 2023 05:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702300924; cv=none; d=google.com; s=arc-20160816; b=r8iCUPCawxdjzzrYX2nF5UVwLljFJ2lBrgyIsTEA1oKYzGU54Vv0hePNNY2mZyJjgg x0n2ILjp4iaYiMnmdfiNUbufwaSZr7qWJiUcNMpZEUXlCea8tHt/1OV6HgstypmZDHbD OAndbfkbQ3mU37BzpdjCvT2JBRKfOs2kjn+mELcAR4cuHzEgZ8JM+InifXAlHQnaTmxm xuf31aA3qQqoni1qfuUZwRPdlt8bchT2bb2HIwIvJBD8wrUcLEVIxNlj38eKCbCBhuCW sUUfmtQiXOy3EzZvy/fuiAn/mRTJ4lKv1KgMCVE57sU+UWRPVAgptwM2rD0j/6xI5NW0 rmLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kZUNkb6PGtwfnOwOlIYxQeLxlJNk2e0S1nsvXxPTWrc=; fh=NmCkMhDhIXxqhN9kpv0CwYFi0sjNxOMRbGcguF8oliU=; b=S5PRjc0fdaGatwzlabk48kxKZkHQy3u0iEnasgRj76A4BNLTrhl7H0ZxF6y9+KgH4/ uW91fCjXFotK2aK46DWm3BSTtwO11L0kQTl7f46qepxQvCCxRC2FIbyQUS5OTtfO0DsQ xf7nq1VJUkEdf5dmwp9mUkR2xYmufmxNrUbWVRFjVK1aKO12e7gZvrxE3+WSk/eYE9Xv XM6ZaznATVos3eYt+CON+qTfr7bNP9XU1JRGEX5l5qaJ/Esh6WK3iUYExjo4Jxj/CbvO boOcHTRJBbwoS+nKwxuHREubQk2NbNtEZaxi2PhydWFE0srRnFYmKC+MOa8bKkWTvTCZ aKIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eIX+Piq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h5-20020a62b405000000b00690f9e835d8si5976988pfn.132.2023.12.11.05.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 05:22:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eIX+Piq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E90E38065EF4; Mon, 11 Dec 2023 05:22:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343650AbjLKNVb (ORCPT + 99 others); Mon, 11 Dec 2023 08:21:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343615AbjLKNV2 (ORCPT ); Mon, 11 Dec 2023 08:21:28 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2914C3 for ; Mon, 11 Dec 2023 05:21:34 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4D26C433C7; Mon, 11 Dec 2023 13:21:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702300894; bh=pdOjaPV9Jsg2+hufBUTJoin1FtJ4JLo5gH1YiEsQ8lI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eIX+Piq0oQQdGn8TD0Edg+vyONGxOr1LGqK2bq6Dsi6ovtOvnWpT/rIpQOFhBlA3b RD+M0Y9olHV8bbTdPocbTzZZmSuQtM3wSgOKRufOCXeKAdrG2YkwpRzI1hwx19gfpd R8J7br7NfDKSsDo3Ubfz/IzHwRPxRpH0UZXsDmakCZQtxs8yx3CHcht0dAUUySZ72W 7ezqAlqh/1/ULVq4w52iqG1vo6pwpmtsxVWD0ybb3R5KpAvHOys51oI1D1oLC2d49W kbq2skXfspeTVUkdhvgV61N5n4rZQ8glL+SZEddbiQ/dbTg34ryLGY2yDr7oygKcuA WwZRQbf9JcgXw== Date: Mon, 11 Dec 2023 13:21:27 +0000 From: Will Deacon To: "Russell King (Oracle)" 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, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse , Catalin Marinas Subject: Re: [PATCH 13/21] arm64: convert to arch_cpu_is_hotpluggable() Message-ID: <20231211132127.GD25681@willie-the-truck> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Mon, 11 Dec 2023 05:22:02 -0800 (PST) On Tue, Nov 21, 2023 at 01:44:56PM +0000, Russell King (Oracle) wrote: > Convert arm64 to use the arch_cpu_is_hotpluggable() helper rather than > arch_register_cpu(). > > Reviewed-by: Shaoqin Huang > Reviewed-by: Gavin Shan > Signed-off-by: Russell King (Oracle) > --- > 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) Acked-by: Will Deacon Will