Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp564692lqd; Wed, 24 Apr 2024 10:08:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsX8EBcjrWQ5MB/YMjwRaxcG6uQQa77ebgQhdwuHcUU+SiATfA6r47ZdhGe+68dFITdxC23nrxJCyoCNshc1kAy8bPCcYZNaHPcok+nQ== X-Google-Smtp-Source: AGHT+IGzn92Hdb6AAYMAWvwR7kUrOWfFQ1wev5t+hAC374etIUyAkCp1h7nLFRaWlqd57xlHC5ka X-Received: by 2002:a05:6512:3f1c:b0:513:cf73:d8d2 with SMTP id y28-20020a0565123f1c00b00513cf73d8d2mr2069636lfa.54.1713978533275; Wed, 24 Apr 2024 10:08:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713978533; cv=pass; d=google.com; s=arc-20160816; b=RUsHBq69ATLSzW9EhDjmYYqMxm2WPwp5FimNsOoUUUVR8hC8QSs0azT1evvNLvfjAx 51OSm0AKbN9V/dFE69QdwALN4+JHv/Iqb434DgFtxBY9JmkctoxO3xBdLGymesyIto5f 1kcnmOBYrg/5Sg9kjJxCEdV1aeLItuLqQsG8NilQHrPfskJwM8z7BK/RQN0S8vjp2kvG c0gqReBYQknJsEz82chwhGIY1BAwpjl+NE1W4dfk2PWA+L+YHIFgc4Gb+ZBJOI1a8jZL /JZc6qPJHimWiTrE822p0QfBi5Ex5gWE9+02HgYdc93Tb+BCa65XCcr82oZ590wDWC03 aLVQ== 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=hSEMY0W6L+cexqhKyZmr3gibrrH/1I7SbJ3TELm4Gec=; fh=8gJ6enT+cIz7CV6Cpc9K6xeN1NKtsyii0RoGPT858/Q=; b=oU29Go8Q6M37JvruX//5TLmfj4DW+9NfmLmedDii0ENrLk3fZWuw95Cr5NKhkscV0w 5xnOAMATlkBG9mI7VhIU3qr3IoyDaxJePxnm2XRAJOtl/xVUUSAxOG0EO0wnTDKfYKkG Q6G3xF0qgt3WlVo51VRxQpoiQGZ6FcKVDy2X+RV4E5HpNGGz8vUB4a0TFSrC4lqaHxb7 jA+bKDjxnqaL4qFbWtwZJmtOZi4e84GyU02jBdAI/Z5bZckZCunp2tfV2OPd9LhHj/fM zXDUnHGAfGARrPPDsDNoaJZvfjK/vyItkjt2oxctxsOgv5PFy9JrpqcTR94bithJM1qc LiDg==; 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-157372-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w12-20020aa7da4c000000b0056e5ac3c9c0si8667605eds.375.2024.04.24.10.08.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:08:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157372-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-157372-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157372-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D50141F2432D for ; Wed, 24 Apr 2024 17:08:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62EBD16D335; Wed, 24 Apr 2024 17:08:38 +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 288FA16D324; 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: 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: 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