From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 2894E16D4CA; Wed, 24 Apr 2024 17:08:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713978517; cv=none; b=rDX7YldO6vXHE91SdcmPsw+7EY0wWQEVb37iNGButJMeQc0LynQtDO6XIUmOY0AQpzziCGEHKZ/rxn/sIsRgRKM2J9W+qyT1jHKkJTagputWWbWaJaW3CnWjOlwaherlJZjr0+taALPBdSS1wjkkKwzIkccKSzj+u8oHdg0Sa/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713978517; c=relaxed/simple; bh=O1pq/ISUV3l7ZIKZLlkalLC1kLeYxyB8yvf9TagRkAM=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HFHwFB+hf2AmvHFuKcTMLMuA92JuaRYbGLTfwa+TrJcSBb4isgLSu7dCp//OtdR9m0EQ51MwKwALx6ykuAAXAOhtJycWcdkd8g+dhxEvSrG7dpEr9P8KQPD0HPzzpzdfWcJ9v7GL01AJu8kHtEixB1M/hWUc4ZEFLDlbs15CmLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VPlkX1nPtz6J9Zf; Thu, 25 Apr 2024 01:06:12 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 2B7401400DB; Thu, 25 Apr 2024 01:08:32 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 24 Apr 2024 18:08:31 +0100 Date: Wed, 24 Apr 2024 18:08:30 +0100 From: Jonathan Cameron To: Salil Mehta CC: Marc Zyngier , Thomas Gleixner , Peter Zijlstra , "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" , "kvmarm@lists.linux.dev" , "x86@kernel.org" , Russell King , "Rafael J . Wysocki" , "Miguel Luis" , James Morse , Jean-Philippe Brucker , Catalin Marinas , Will Deacon , Linuxarm , Ingo Molnar , Borislav Petkov , Dave Hansen , "justin.he@arm.com" , "jianyong.wu@arm.com" Subject: Re: [PATCH v7 11/16] irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs Message-ID: <20240424180830.00002a36@Huawei.com> In-Reply-To: References: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> <20240418135412.14730-12-Jonathan.Cameron@huawei.com> <20240422114020.0000294f@Huawei.com> <87plugthim.wl-maz@kernel.org> <20240424135438.00001ffc@huawei.com> <86il06rd19.wl-maz@kernel.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 24 Apr 2024 17:35:54 +0100 Salil Mehta wrote: > > From: Marc Zyngier > > Sent: Wednesday, April 24, 2024 4:33 PM > > To: Jonathan Cameron > > Cc: Thomas Gleixner ; Peter Zijlstra > > ; 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; kvmarm@lists.linux.dev; x86@kernel.org; > > Russell King ; Rafael J . Wysocki > > ; Miguel Luis ; James Morse > > ; Salil Mehta ; Jean- > > Philippe Brucker ; Catalin Marinas > > ; Will Deacon ; Linuxarm > > ; Ingo Molnar ; Borislav > > Petkov ; Dave Hansen ; > > justin.he@arm.com; jianyong.wu@arm.com > > Subject: Re: [PATCH v7 11/16] irqchip/gic-v3: Add support for ACPI's > > disabled but 'online capable' CPUs > > > > On Wed, 24 Apr 2024 13:54:38 +0100, > > Jonathan Cameron wrote: > > > > > > On Tue, 23 Apr 2024 13:01:21 +0100 > > > Marc Zyngier wrote: > > > > > > > On Mon, 22 Apr 2024 11:40:20 +0100, > > > > Jonathan Cameron wrote: > > > > > > > > > > On Thu, 18 Apr 2024 14:54:07 +0100 Jonathan Cameron > > > > > wrote: > > > > [...] > > > > > > > > > > > > > + /* > > > > > > + * Capable but disabled CPUs can be brought online later. What about > > > > > > + * the redistributor? ACPI doesn't want to say! > > > > > > + * Virtual hotplug systems can use the MADT's "always-on" GICR entries. > > > > > > + * Otherwise, prevent such CPUs from being brought online. > > > > > > + */ > > > > > > + if (!(gicc->flags & ACPI_MADT_ENABLED)) { > > > > > > + pr_warn_once("CPU %u's redistributor is inaccessible: this CPU can't be brought online\n", cpu); > > > > > > + set_cpu_present(cpu, false); > > > > > > + set_cpu_possible(cpu, false); > > (a digression) shouldn't we be clearing the enabled mask as well? > > set_cpu_enabled(cpu, false); FWIW I think not necessary. enabled is only set in register_cpu() and aim here is to never call that for CPUs in this state. Anyhow, I got distracted by the firmware bug I found whilst trying to test this but now have a test setup that hits this path (once deliberately broken), so will see what we can do about that doesn't have affect those masks. Jonathan > > > Best regards > Salil 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 DE6BEC4345F for ; Wed, 24 Apr 2024 17:09:00 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BJMOxkTib4T4dCZkbN1f/c37j9oR4z5lwMNZYxPVAJ0=; b=MSqTL1oTtM4YDe Lup7uvqTLx24h1tesdIO9H2cjoKxdUdf0hT0O6jBB64cD5rtSPN6blA4v7AnFwlvzpHe9uvwoFAac RsFuIzklgsFTiqGiiblycbCH2mR3sKoMETkUxxD0FidRyDei26TLxylwecvtfhEYxyZVIzDeDzYOl Uofq5PG+KJ7uGygCjvjYTJWZ97/PwfybT+mN+41A3v6Net/o5lbL/gI/NwrE9Xuq1LP75lIBCCE1N 2S9HvX0Nf/tmpo04K9vsUnLP1zYz+RPlycq6f7FrALQrJLOOHPed7NaWIn7DMgBNBrlB8c5aCGm7s rVWQZl1YpYpI0PR+9CjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzg6v-000000054UO-0T5W; Wed, 24 Apr 2024 17:08:45 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzg6r-000000054RQ-0rVc for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2024 17:08:43 +0000 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VPlkX1nPtz6J9Zf; Thu, 25 Apr 2024 01:06:12 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 2B7401400DB; Thu, 25 Apr 2024 01:08:32 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 24 Apr 2024 18:08:31 +0100 Date: Wed, 24 Apr 2024 18:08:30 +0100 From: Jonathan Cameron To: Salil Mehta CC: Marc Zyngier , Thomas Gleixner , Peter Zijlstra , "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" , "kvmarm@lists.linux.dev" , "x86@kernel.org" , Russell King , "Rafael J . Wysocki" , "Miguel Luis" , James Morse , Jean-Philippe Brucker , Catalin Marinas , Will Deacon , Linuxarm , Ingo Molnar , Borislav Petkov , Dave Hansen , "justin.he@arm.com" , "jianyong.wu@arm.com" Subject: Re: [PATCH v7 11/16] irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs Message-ID: <20240424180830.00002a36@Huawei.com> In-Reply-To: References: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> <20240418135412.14730-12-Jonathan.Cameron@huawei.com> <20240422114020.0000294f@Huawei.com> <87plugthim.wl-maz@kernel.org> <20240424135438.00001ffc@huawei.com> <86il06rd19.wl-maz@kernel.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240424_100841_613957_89F47E15 X-CRM114-Status: GOOD ( 20.16 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 24 Apr 2024 17:35:54 +0100 Salil Mehta wrote: > > From: Marc Zyngier > > Sent: Wednesday, April 24, 2024 4:33 PM > > To: Jonathan Cameron > > Cc: Thomas Gleixner ; Peter Zijlstra > > ; 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; kvmarm@lists.linux.dev; x86@kernel.org; > > Russell King ; Rafael J . Wysocki > > ; Miguel Luis ; James Morse > > ; Salil Mehta ; Jean- > > Philippe Brucker ; Catalin Marinas > > ; Will Deacon ; Linuxarm > > ; Ingo Molnar ; Borislav > > Petkov ; Dave Hansen ; > > justin.he@arm.com; jianyong.wu@arm.com > > Subject: Re: [PATCH v7 11/16] irqchip/gic-v3: Add support for ACPI's > > disabled but 'online capable' CPUs > > > > On Wed, 24 Apr 2024 13:54:38 +0100, > > Jonathan Cameron wrote: > > > > > > On Tue, 23 Apr 2024 13:01:21 +0100 > > > Marc Zyngier wrote: > > > > > > > On Mon, 22 Apr 2024 11:40:20 +0100, > > > > Jonathan Cameron wrote: > > > > > > > > > > On Thu, 18 Apr 2024 14:54:07 +0100 Jonathan Cameron > > > > > wrote: > > > > [...] > > > > > > > > > > > > > + /* > > > > > > + * Capable but disabled CPUs can be brought online later. What about > > > > > > + * the redistributor? ACPI doesn't want to say! > > > > > > + * Virtual hotplug systems can use the MADT's "always-on" GICR entries. > > > > > > + * Otherwise, prevent such CPUs from being brought online. > > > > > > + */ > > > > > > + if (!(gicc->flags & ACPI_MADT_ENABLED)) { > > > > > > + pr_warn_once("CPU %u's redistributor is inaccessible: this CPU can't be brought online\n", cpu); > > > > > > + set_cpu_present(cpu, false); > > > > > > + set_cpu_possible(cpu, false); > > (a digression) shouldn't we be clearing the enabled mask as well? > > set_cpu_enabled(cpu, false); FWIW I think not necessary. enabled is only set in register_cpu() and aim here is to never call that for CPUs in this state. Anyhow, I got distracted by the firmware bug I found whilst trying to test this but now have a test setup that hits this path (once deliberately broken), so will see what we can do about that doesn't have affect those masks. Jonathan > > > Best regards > Salil _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel