Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp913386lqt; Fri, 7 Jun 2024 02:30:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVH+6DERfUiqgDEEDFeXkXvw6/cKn3ZVmnISkwJucA29gBCrkCeJODfsp53qf7NrHGTXBQknzxHIWG7o+fs9Txu8cuxCv5FKUbvrBpIRw== X-Google-Smtp-Source: AGHT+IHJywR7XRcb6qtVuQyXvxqGL5E6FO984lOkL4qXDU0zYWky8w5qPyvMLmQ308P775N+lOmU X-Received: by 2002:a50:9f07:0:b0:57c:5f88:7c69 with SMTP id 4fb4d7f45d1cf-57c5f887ca8mr598511a12.38.1717752606309; Fri, 07 Jun 2024 02:30:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717752606; cv=pass; d=google.com; s=arc-20160816; b=psGODZv46/M6mZN+GWqsnYFVwVPF7hBh+jT9HW1KJJ8B0t66Xe4Wn93rKcLmQIjkV6 u4VYlJ7lW5sG3Y3z3ymstHfOqq16HcXyQfNq2Ly2gg9nIhEADOphNM+XWthNOZAoVuFL hIi/fh3rU3/X+05mQ8F7dDhjbmg1SqTB8ljCR9uf79xtcxEsikngwvRX4br5inRY9JBz pkyJIGQI7zaiERMsmf+ZRdYm5bmKXngZQoJxlTCZOV8M4k4bU8BiMV3gD0l2FufwdoW4 CGg6OisOP6pe48/lCCRuoKRfcQIZpE5c1kB255aDJ0kZNnK28o+G/jdG4OUiExSSLkid O9Kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=5ctRGH/aFa/686+NHy++uKNOPyUNQ6I0lJCUaywdDXY=; fh=G06KHwcMGoDP9wiHYwyW8MoAJwj0OFUDHxJC1HpLSsM=; b=lzhJdgL6yUnGMgFoHVrjGAkTn0EMrCJXd+iOz5VH67B8hLsYlxHCCqfv8BCgG5wy0T l40hiwdpRI9fV2Mo5Mnre40RBqFlo+UfBw0o2IOY9mz3cBxyveSsktii0KkAUohtzeLp Nf1iISNAWrDGLTpesE3Qx76MD1bTZGNTWtkg/OCt3PVQVgLYkPHZfZq7kgQVX/6axw8t xvR/IEpy8FxolOvH9xZFwqX7xP/Ai90WuvrJn5oe9dU8mNUT0XcmjACpmNJA3wPKSqEu XTbUXSX/SoEF9c8L+lWKCr18EIKZrKEgCtCmLYwbW2mNR228ahFlHI1hLpZxGFmp63nF 4YXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-205688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c80581ffbsi156052766b.162.2024.06.07.02.30.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 02:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-205688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 CF2111F27AC0 for ; Fri, 7 Jun 2024 09:11:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E66315B968; Fri, 7 Jun 2024 09:10:23 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FE8715B546; Fri, 7 Jun 2024 09:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717751422; cv=none; b=n7pwIVBrIfmEqI4vtrvGGSONW9r37fvjgs42lmcX6uKWtU7IzxWiqSm9fbP0UlI4Nx0nvAUcW/z/q0e1YrtgBsZyfUgecvGViJ1iopUH+Ynd4VmPojBP7pSiSvUaCq2OYSCnDXc+dywfeQmN/itHaizkHURjM7diXdAcUBsnhu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717751422; c=relaxed/simple; bh=DYpx4jfQ2pJ69pholDvW6SWXEkPz4I4Vl9+n460bUJI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pi2NaIOTGSOVM18jnKstL2mrCZStHCmphlLNyWe/tbjQ8Oyo/tjgiS1s2I8vB35LnacB6lcPBQtxEbCyV//AkdwWNuyy8XlLOMZIZmJRbabQlS9ck4X6R8PYrwD2gkJmY0HNjKjtSq+V+3+iHGYk6KY/bre8GGai3xx4vlakWU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E08E82F4; Fri, 7 Jun 2024 02:10:44 -0700 (PDT) Received: from [10.57.70.104] (unknown [10.57.70.104]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E3EE93F762; Fri, 7 Jun 2024 02:10:18 -0700 (PDT) Message-ID: Date: Fri, 7 Jun 2024 10:10:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 1/1] irqchip/gic-v3: Enable non-coherent redistributors/ITSes ACPI probing To: Amit Singh Tomar , Lorenzo Pieralisi Cc: linux-kernel@vger.kernel.org, Marc Zyngier , Thomas Gleixner , Mark Rutland , "Rafael J. Wysocki" , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev References: <20240123110332.112797-1-lpieralisi@kernel.org> <20240606094238.757649-1-lpieralisi@kernel.org> <20240606094238.757649-2-lpieralisi@kernel.org> <02dba55e-39a3-4853-ac52-834cb1c0fc7f@marvell.com> From: Robin Murphy Content-Language: en-GB In-Reply-To: <02dba55e-39a3-4853-ac52-834cb1c0fc7f@marvell.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-06-07 8:53 am, Amit Singh Tomar wrote: >> On Fri, Jun 07, 2024 at 12:21:54AM +0530, Amit Singh Tomar wrote: >> >> [...] >> >>>> diff --git a/drivers/acpi/processor_core.c >>>> b/drivers/acpi/processor_core.c >>>> index b203cfe28550..915713c0e9b7 100644 >>>> --- a/drivers/acpi/processor_core.c >>>> +++ b/drivers/acpi/processor_core.c >>>> @@ -215,6 +215,21 @@ phys_cpuid_t __init acpi_map_madt_entry(u32 >>>> acpi_id) >>>>        return rv; >>>>    } >>>> +int __init acpi_get_madt_revision(void) >>> >>> Wondering, if we can have a generic function (acpi_get_tbl_revision) to >>> obtain the revision number for any ACPI table, not just specific to >>> MADT? >> >> We could - I don't think there would be users other than code in this >> patch though so I thought it would not be necessary. >> > > Right, it might not be essential now but I see that MPAM will be another > user of it once the MPAM patches are out. > > https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/tree/drivers/acpi/arm64/mpam.c?h=mpam/snapshot/v6.7-rc2#n299 Not really; there's already plenty of ACPI code which checks the revision of a table *while* also parsing other information from it, and that MPAM code is doing the same. Using a standalone function to look up the table, check one thing and throw it away, and then immediately have to look it up again to do the rest would be needlessly overcomplicated. The thing in the GIC case is that doing this semi-redundant lookup to re-retrieve the top-level MADT header while we're already deep into parsing its subtables is still the least-worst option, because the alternative would be invasively churning the whole common MADT abstraction to pass that information all the way down just for this one slightly niche thing. Thanks, Robin.