Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1007713lqd; Thu, 25 Apr 2024 03:24:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWztPLrdWoZ1mNbWlU46H3NCD0rZdVgeXzWhR96f5OkskaDwwZxOgYhU3XGZu2y+Nwa/PsLTGeH6lGp+lhN3BjgyjAB3LztmYwurghEqw== X-Google-Smtp-Source: AGHT+IHo6K6+HuM/ZiwsIloWILUM+0qGtyPVY2jhuchOMiX23sye6Lwe3jtI/1beacMaUF6kCzUT X-Received: by 2002:a05:6a00:130b:b0:6f0:c78f:75e1 with SMTP id j11-20020a056a00130b00b006f0c78f75e1mr6294134pfu.0.1714040685976; Thu, 25 Apr 2024 03:24:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714040685; cv=pass; d=google.com; s=arc-20160816; b=iPMF0RER+TBuTMtbUAINITkMwMf8kIWlwxd4bQgDOVealjDJeC3N7WJK7A3Qz/Qokw g7K7EBT2A5QBH0Uf8Ns3ARFiJRx24z82JdfORSqmlNNgsrDtjNIE/OZoDF/L4uqoo2od YLk1q7Hx0ql4fL6Rrwu/PmxmCbnu8cCNzsKmy8sNmcI93R5pVcsvKvzywmdGCGO8gn8h mzhaV7zabW56oplct/eYMSx2VwNYV6uu/zxTxSXzva/Y+pAUpbB4BKXfYcVmfZ0zeSMe AdaIh2/rl7IWqRg12M7QCWD6q6pmDwF9UxCRhWvL3nw2OG7Z5GqFuDQEmWF8IucTG6uI idJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=N2f36dzn6tK1uWE63BDmkR5IuQJBVaDaF91oDGrFHCE=; fh=8gJ6enT+cIz7CV6Cpc9K6xeN1NKtsyii0RoGPT858/Q=; b=ctfv5vQvfIfXxndE2Nh/3M2gHj7Y4jAJj9Nc5NAS+iarjEyVh+f0jTfKTxv9S5VdFi qZUrves/GCp4HGVd6JsRL0VSXrj90vjotCRJxNAU7VS/H+bugkQ4Nk5T4WkHrwwiVgxl m15dxFefwKr+d03y1C8lhlbrsAmoznGW+w6Jcnc4myz2ZSU33V6BU+AMuYZyqAQaJnoi hHUFpDZtUj9yaul52c5OJeDEijIRrimQ9BBKzOlR3UrwSks1NuuXzq3/vd1S3a0ny2VV bbOJWrLKwxShi/4434wYurMkJvOE6gSVVjaSQQ/VNE9FNsuSYq2c47UcLEFlCz+uXF+7 g8Ag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-158386-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s66-20020a632c45000000b005fc96b27e11si8603291pgs.687.2024.04.25.03.24.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 03:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158386-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-158386-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1D0512852B8 for ; Thu, 25 Apr 2024 10:24:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 966E486AFC; Thu, 25 Apr 2024 10:24:02 +0000 (UTC) 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 155FB85277; 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=1714040642; cv=none; b=Gga+avrUyHu7GW/Yfo+ZbA/GDulY/k5EFRAAlQY8nc3/nINAVQfrMMnRpKV4AsOL5hzDU09vb1dBVaTLKzgE02NABS0/3PxK/p9R2xzTzVwHFHP3CXYtnFqAj8T8u48MkJp+1bV/Ka03qnPBIns8OTi/KYC7E1YrLjxrWP0vYiE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714040642; c=relaxed/simple; bh=wmKTX0hf311FdAlA97nBVl4pjiE0U/L+0ndYEl0pI3U=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YZl3lzLOCZSudKg1Gjk8dtvV/9B0Sjg+ZTUxrRVeGItLMzSxk7cy5edXoiVBlev90LANWkQTWC6C5PDvMrZ1N5pY8sM6ziejP+Tacmq2LN1w77LJtvIxTCe6vvAjcoC4jAYZEzWtOjMaDL7Dw07f49V8uRGUZOx8yh1fTlk+rqQ= 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: linux-kernel@vger.kernel.org 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