Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3969423rdb; Thu, 14 Sep 2023 08:06:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZwUFP++pzreZ72eR1/Rn73XcAI2yvqpm9rypYb3zqJQ0/zqsPs8jnzB9hCrbY1dJK2iCG X-Received: by 2002:a17:90b:3ecd:b0:271:9e59:df28 with SMTP id rm13-20020a17090b3ecd00b002719e59df28mr5132395pjb.29.1694703984532; Thu, 14 Sep 2023 08:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694703984; cv=none; d=google.com; s=arc-20160816; b=CrPazTBG4Jr9BV0LO9iMUIJhyzX3Pxs5MU+ua1hRAAOxzmeNNdRDO2Zkbr27kpKNDf 3iYEZzBHUnD1eS/eJfYDmMVfTkaooco/H3OR/MGltNwjAhneELLGM1As3JoaGzf76RMU muJGWc+CEo5VtmsjKjxC1jkvJJmURIoPOgh8wPkX7LIjmmgmI4G5RvNcl60vF+sjcuXU G0U2AKT5eMolC+BjsIVQG89mRdrs2rB14DkcaTHxzxIZMfCn7uoLVs9DtpZRp7hPSlqf O3MUWnDDuSnR8Sm8OQiiBrjFAkt5unmsRUyPDes0+do45LvwOzkWcdnKvui5bYCJaaSb xvNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=ylL7jtN4bKHkJw6pB0qFDn/be0mvHbpSYIB+ewbJVeY=; fh=oDKY836R4mSc4/0UMhzfb7tYFaJtOWOemYAiY2qfe98=; b=CCxjWHysJKgy9svxuFarPsFI/DntB2drKuRp/0Mt37E8FSsBpmJqMZzNpSKns5uWYK ie6cfD0v+hg5/iFGo7mrwfBDk4UsCOHBgWX9rKQpneBSytG76gB/4eBlKX4XmVIbtuZy iUCE5ufGbVkiwqjFyP2wTNRLTytbmXkjOwHLeCyASB3voXwYZC3AfTNz91+A1lVLi9As pDlqlOnE/bQA2LJEQDWVwHywRGSI9HS+p2vmuD+SvaSggfKXJuzTs9UCRzKV4TbavupA PhQ+1Ndp1VDN7YYpO5clnUVm+PXLCbGwV4jlJL7yo12AZUZJVnsKwiAL2/V3TnZ8g9s0 vaEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t8-20020a17090aba8800b00262e3c1c1efsi1802065pjr.79.2023.09.14.08.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 08:06:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B2CC182FABE4; Thu, 14 Sep 2023 07:55:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240435AbjINOzH (ORCPT + 99 others); Thu, 14 Sep 2023 10:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240347AbjINOzH (ORCPT ); Thu, 14 Sep 2023 10:55:07 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F362DF9; Thu, 14 Sep 2023 07:55:02 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RmgMM5jtxz6FGPS; Thu, 14 Sep 2023 22:54:23 +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_128_GCM_SHA256) id 15.1.2507.31; Thu, 14 Sep 2023 15:54:59 +0100 Date: Thu, 14 Sep 2023 15:54:59 +0100 From: Jonathan Cameron To: Ard Biesheuvel CC: James Morse , , , , , , , , , , Salil Mehta , Russell King , Jean-Philippe Brucker , , Subject: Re: [RFC PATCH v2 27/35] ACPICA: Add new MADT GICC flags fields [code first?] Message-ID: <20230914155459.00002dba@Huawei.com> In-Reply-To: References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-28-james.morse@arm.com> 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 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 07:55:08 -0700 (PDT) On Thu, 14 Sep 2023 09:57:44 +0200 Ard Biesheuvel wrote: > Hello James, > > On Wed, 13 Sept 2023 at 18:41, James Morse wrote: > > > > Add the new flag field to the MADT's GICC structure. > > > > 'Online Capable' indicates a disabled CPU can be enabled later. > > > > Why do we need a bit for this? What would be the point of describing > disabled CPUs that cannot be enabled (and are you are aware of > firmware doing this?). Enabled being not set is common at some similar ACPI tables at least. This is available in most ACPI tables to allow firmware to use 'nearly' static tables and just tweak the 'enabled' bit to say if the record should be ignored or not. Also _STA not present which is for same trick. If you are doing clever dynamic tables, then you can just not present the entry. With that existing use case in mind, need another bit to say this one might one day turn up. Note this is copied from x86 though no one seems to have implemented the kernel support for them yet. Note as per my other reply - this isn't a code first proposal. It's in the spec already (via a code first proposal last year I think). > > So why are we not able to assume that this new bit can always be treated as '1'? Given above, need the extra bit to size stuff to allow for the CPU showing up late. > > > > Signed-off-by: James Morse > > --- > > This patch probably needs to go via the upstream acpica project, > > but is included here so the feature can be testd. > > --- > > include/acpi/actbl2.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h > > index 3751ae69432f..c433a079d8e1 100644 > > --- a/include/acpi/actbl2.h > > +++ b/include/acpi/actbl2.h > > @@ -1046,6 +1046,7 @@ struct acpi_madt_generic_interrupt { > > /* ACPI_MADT_ENABLED (1) Processor is usable if set */ > > #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */ > > #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */ > > +#define ACPI_MADT_GICC_CPU_CAPABLE (1<<3) /* 03: CPU is online capable */ > > > > /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */ > > > > -- > > 2.39.2 > > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >