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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60D41C4332F for ; Thu, 9 Nov 2023 09:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tdmglMwKvo39SMYhIqwqr8XmFSySdqIsiBhQyYXMSlQ=; b=ZGGs68O0UnesQ+ ar8UpXb7/0sR1OEnkq4fhwoNguj8PQxHyL/59EyNyZH008j1S2CCczphz6bX5TvU6Bk8qzTd/ALm0 W3jyUooonbqFmzLYtrYwYaTNf5rF0ETG8dna7LfgbF5c8d57qVC+jdMbsGCKrWHXMYZ726veWT+q9 OayXdRjhwTKUNhFF8JsOh0UvcGNDyKfDcFDblCzivicDODUeQA1nwfwg62PYmin/PKsfYIy/y0io5 hKFgy2VX6x30m9gF5rz56U76IfbfgkG9AWj/Zs9bFEvWPdRj2YQyPBGTsIy9+bbxlPFSxtoOXc3CU Pp6PXRIged6F4EiiBiXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r11c6-005ois-2Q; Thu, 09 Nov 2023 09:46:14 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r11c5-005oiY-13 for linux-arm-kernel@bombadil.infradead.org; Thu, 09 Nov 2023 09:46:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=OEjQ7xxzDSW6bCsBCGR2pe6qDNDSEL6lx838tIM/GU8=; b=o2Shg6zZcggGtoBzH+LGI4c5fP DPORsXiaucSqBehpI6v/fC6+sYSVZVT510Yx+u+NkNQ32rNbFDRZ0/wq5HpQ5nb+MhGkFiHGrZio/ pD0DX+baNjxt34OGXV1J8x809NkW+qGt3h8z/l8cDgRKoZP/KbfHiF0GUb8FMafYTBrV4tb81bph/ hz/JTZIN+uITeN4+055TAQ5hNo27fssICCLpVwixp8JPi6e4vCbcE6p8SLkv9LRWWRNR4bK9ARjLH VhIN/ilJWzRqwTNzJeiqpglW526TLqjclLuetmsM8e9VoDJIyzpxZKuRGsDDpbV9CtMYZUXHGe6nj lfbJnTwg==; Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r11c0-00EJU3-3A for linux-arm-kernel@lists.infradead.org; Thu, 09 Nov 2023 09:46:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699523026; 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=OEjQ7xxzDSW6bCsBCGR2pe6qDNDSEL6lx838tIM/GU8=; b=TYcAke6p+T1AImaGZaT67W3yqo7U1PdOYi5jEY+BDaR9yTDCKgJcnyL0x6/9VKuYWOOo+W NJJWqg6W6NRgU9hPbjhJ3yTDhJLBsp2iH8YoXYvC0lvVVeTdC8I1DrfmNktByCkCmNyoZn f+Oqe+CEl+BDwvZZj+9fCKqC5TOWk74= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699523034; 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=OEjQ7xxzDSW6bCsBCGR2pe6qDNDSEL6lx838tIM/GU8=; b=RIEJz3xwy6vAIAXiPc2PivPJ41CvhwrqFaJo/583lcs9aXWcmiOtccvAf1c59dv2S9x2eu pCNlu+novFFTZNxuOt5L5TZ+WAfEe/RHMb26bbnHmvBrzcWV7PCW/PYGr4Dricm7owCRZZ vd7O9ePqhzkESbjzgwv0f8sru5hwB3g= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-mZCDfl98NiGtTdHq6ZmDZg-1; Thu, 09 Nov 2023 04:43:45 -0500 X-MC-Unique: mZCDfl98NiGtTdHq6ZmDZg-1 Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2800fffc08eso186692a91.0 for ; Thu, 09 Nov 2023 01:43:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699523024; x=1700127824; 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=OEjQ7xxzDSW6bCsBCGR2pe6qDNDSEL6lx838tIM/GU8=; b=id2e5Tq2mdvzke3s9SursI6AM7FAt/U16nGJhdNbR7DiZl+8pL1lR0kW6+OJnpsDGk Fnok5j1TuvizBefC+0sRw7nG+Gr0dd3dAT+aSuYprS3L5NoxlvwWcI8FzQy5CsksxzEL EvbyYq22YdyKKlqs3Dfb27+/pVtWUVwjwS+NW6j6UPbfjj0JZJhE+FcoANVpJjw5TQGL PlYbJJo/MddKZK9LS2dsU+8itIFtWIa4brgkQrbDzoLR1moUutC95eFSyyAZjwVeynuE LVhCCML0ooVkUhRxsvpCE6WB7gOcgdqyhS96Thmdd0zsq6ZiX2SE34HPBTkmpxVRrJr0 fiJw== X-Gm-Message-State: AOJu0YwTnSvMoITfqhlgk/2ONAuIJO+cIkkmNpEZEICALCOjDj1/yLMJ OWU4RpMRp6mmg6el9CsL8xCLzHhBQLoXjoLj2+/Two+DEK6EflqFK44br2oDpKu1yHDQUBbRjPi K2/FtgjRITh2arpzbEJFZXI7jdtgBUG4mfn8= X-Received: by 2002:a17:902:d4cd:b0:1cc:2bc4:5157 with SMTP id o13-20020a170902d4cd00b001cc2bc45157mr4921113plg.1.1699523024556; Thu, 09 Nov 2023 01:43:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6RZnogij7LzQU0k7NFPHwR/unfu31fUk7J39NRmSg93ajKyOUqEekd23fy6SG5sWCfMu5eg== X-Received: by 2002:a17:902:d4cd:b0:1cc:2bc4:5157 with SMTP id o13-20020a170902d4cd00b001cc2bc45157mr4921073plg.1.1699523024112; Thu, 09 Nov 2023 01:43:44 -0800 (PST) Received: from [10.66.61.39] ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id h21-20020a170902eed500b001bf846dd2d0sm3105978plb.13.2023.11.09.01.43.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Nov 2023 01:43:43 -0800 (PST) Message-ID: <46faa2bd-9f27-2eea-f46d-f02715e2b540@redhat.com> Date: Thu, 9 Nov 2023 17:43:36 +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 05/22] ACPI: Move ACPI_HOTPLUG_CPU to be disabled on arm64 and riscv 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 , Huacai Chen , WANG Xuerui , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , "Rafael J. Wysocki" , Len Brown , Paul Walmsley , Palmer Dabbelt , Albert Ou References: From: Shaoqin Huang In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_094609_629352_5E5DB129 X-CRM114-Status: GOOD ( 27.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/7/23 18:29, Russell King (Oracle) wrote: > From: James Morse > > Neither arm64 nor riscv support physical hotadd of CPUs that were not > present at boot. For arm64 much of the platform description is in static > tables which do not have update methods. arm64 does support HOTPLUG_CPU, > which is backed by a firmware interface to turn CPUs on and off. > > acpi_processor_hotadd_init() and acpi_processor_remove() are for adding > and removing CPUs that were not present at boot. arm64 systems that do this > are not supported as there is currently insufficient information in the > platform description. (e.g. did the GICR get removed too?) > > arm64 currently relies on the MADT enabled flag check in map_gicc_mpidr() > to prevent CPUs that were not described as present at boot from being > added to the system. Similarly, riscv relies on the same check in > map_rintc_hartid(). Both architectures also rely on the weak 'always fails' > definitions of acpi_map_cpu() and arch_register_cpu(). > > Subsequent changes will redefine ACPI_HOTPLUG_CPU as making possible > CPUs present. Neither arm64 nor riscv support this. > > Disable ACPI_HOTPLUG_CPU for arm64 and riscv by removing 'default y' and > selecting it on the other three ACPI architectures. This allows the weak > definitions of some symbols to be removed. > > Signed-off-by: James Morse > Signed-off-by: Russell King (Oracle) Reviewed-by: Shaoqin Huang > --- > Changes since RFC: > * Expanded conditions to avoid ACPI_HOTPLUG_CPU being enabled when > HOTPLUG_CPU isn't. > Changes since RFC v3: > * Dropped ia64 changes > --- > arch/loongarch/Kconfig | 1 + > arch/x86/Kconfig | 1 + > drivers/acpi/Kconfig | 1 - > drivers/acpi/acpi_processor.c | 18 ------------------ > 4 files changed, 2 insertions(+), 19 deletions(-) > > diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig > index d889a0b97bc1..64620e90c12c 100644 > --- a/arch/loongarch/Kconfig > +++ b/arch/loongarch/Kconfig > @@ -5,6 +5,7 @@ config LOONGARCH > select ACPI > select ACPI_GENERIC_GSI if ACPI > select ACPI_MCFG if ACPI > + select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU > select ACPI_PPTT if ACPI > select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI > select ARCH_BINFMT_ELF_STATE > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 3762f41bb092..dbdcfc708369 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -59,6 +59,7 @@ config X86 > # > select ACPI_LEGACY_TABLES_LOOKUP if ACPI > select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI > + select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU > select ARCH_32BIT_OFF_T if X86_32 > select ARCH_CLOCKSOURCE_INIT > select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index f819e760ff19..a3acfc750fce 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -310,7 +310,6 @@ config ACPI_HOTPLUG_CPU > bool > depends on ACPI_PROCESSOR && HOTPLUG_CPU > select ACPI_CONTAINER > - default y > > config ACPI_PROCESSOR_AGGREGATOR > tristate "Processor Aggregator" > diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c > index 0f5218e361df..4fe2ef54088c 100644 > --- a/drivers/acpi/acpi_processor.c > +++ b/drivers/acpi/acpi_processor.c > @@ -184,24 +184,6 @@ static void __init acpi_pcc_cpufreq_init(void) {} > > /* Initialization */ > #ifdef CONFIG_ACPI_HOTPLUG_CPU > -int __weak acpi_map_cpu(acpi_handle handle, > - phys_cpuid_t physid, u32 acpi_id, int *pcpu) > -{ > - return -ENODEV; > -} > - > -int __weak acpi_unmap_cpu(int cpu) > -{ > - return -ENODEV; > -} > - > -int __weak arch_register_cpu(int cpu) > -{ > - return -ENODEV; > -} > - > -void __weak arch_unregister_cpu(int cpu) {} > - > static int acpi_processor_hotadd_init(struct acpi_processor *pr) > { > unsigned long long sta; -- Shaoqin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel