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 1564086151; Thu, 25 Apr 2024 10:23:58 +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=1714040641; cv=none; b=GQR9Z59J+YpawbSokqhe8J1LVU++/eX+ZI/8EEl0RmcQkmBkv2ZykWBUbfBfydovhQhe9ojbUZSehI42H5Z0Pr2JzHsfF0s3Z6KorbFdixI2a892wA2kZ5+ZhbZ8SUF/IP1sNWkdbok/Z0keDX0MLpK1C+i/SxMoxb95VADNZyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714040641; c=relaxed/simple; bh=wmKTX0hf311FdAlA97nBVl4pjiE0U/L+0ndYEl0pI3U=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b5gx37xPpNCEINh73GJl2kP6WMifTTBk3nhMsovKw4QrSsR28qG0KKXvnGDAwKd4g6OJAi7bHiuTvzMuINE0EAMZswHsf1zBI7DI3pWTDA/HgL0Dq3+YLdXOf/ltRxxZHe0l1Kp6VdBLe5nkgLPTZMiaA3r2boGOHul0RFnzNNU= 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.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VQBlk33SFz6D9Ct; Thu, 25 Apr 2024 18:23:46 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 65841140736; Thu, 25 Apr 2024 18:23:56 +0800 (CST) Received: from localhost (10.122.247.231) 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; Thu, 25 Apr 2024 11:23:55 +0100 Date: Thu, 25 Apr 2024 11:23:54 +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: <20240425112354.00000f26@huawei.com> In-Reply-To: <20240424180830.00002a36@Huawei.com> 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> <20240424180830.00002a36@Huawei.com> Organization: Huawei Technologies R&D (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; 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: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 24 Apr 2024 18:08:30 +0100 Jonathan Cameron wrote: > 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. This may be relevant with the context of Marc's email. Don't crop so much! However I think we probably don't care. This is bios bug, if we miss report it such that userspace thinks it can online something that work work, it probably doesn't matter. Jonathan > > Jonathan > > > > > > > > Best regards > > Salil > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 A7339C4345F for ; Thu, 25 Apr 2024 10:24:18 +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=QjO+14xKUXCH/0nU0fMwRFMv9Ll/Kb11t4MS0C8XHmQ=; b=0av2H8/fLiXW14 dmFP9zmMxWRnn6s/XrZfzw9ajNzksRIYE/bISYqeEbOAck3zpgSp/7/CwbbIrfI7lirN7vmiBNoQh vA+Svx7TukSCQI7rG1zJMnf4dY2qDTBEml3MwEezr14z3G3HwBCPzMzeKCMW/Se5TVSOsq7yVAh2i EqGtjZnKWxKL9LsxoLh/DzYwLGByPEv0InWi+AW1OoXB4ZKtb9V2VoUH2AA8biEaE5jph6ZIaLvvL VzrvwUBBj52N3oHxmex1qSE5x+IBp59ZNh8faRk+HlMIcGTkjJzFyaTspo7I6xa7wLW3B2/5x9f3b 21rHzKxiYyE8mownrPMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzwGv-00000007p7q-0lr2; Thu, 25 Apr 2024 10:24:09 +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 1rzwGp-00000007p63-368m for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2024 10:24:07 +0000 Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VQBlk33SFz6D9Ct; Thu, 25 Apr 2024 18:23:46 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 65841140736; Thu, 25 Apr 2024 18:23:56 +0800 (CST) Received: from localhost (10.122.247.231) 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; Thu, 25 Apr 2024 11:23:55 +0100 Date: Thu, 25 Apr 2024 11:23:54 +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: <20240425112354.00000f26@huawei.com> In-Reply-To: <20240424180830.00002a36@Huawei.com> 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> <20240424180830.00002a36@Huawei.com> Organization: Huawei Technologies R&D (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) 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-20240425_032404_099633_D14625DA X-CRM114-Status: GOOD ( 24.88 ) 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 18:08:30 +0100 Jonathan Cameron wrote: > 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. This may be relevant with the context of Marc's email. Don't crop so much! However I think we probably don't care. This is bios bug, if we miss report it such that userspace thinks it can online something that work work, it probably doesn't matter. Jonathan > > Jonathan > > > > > > > > Best regards > > Salil > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel