From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AC9415B552 for ; Fri, 7 Jun 2024 09:10:21 +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=1717751423; cv=none; b=M8Os8zm61bjosLqDIn7p91JTFI4pQ7lHugGkLD/aOR6ulXf6Z01iPvbG7YZJrHBumXpFqNgdwa2ga/JN0tkKAYs/+IHTcYzby2u/lOUJ4bwzog/1/v+DzYulvgLGIDt6kG1Cd+UDg3OuHmbV2X708+AYP9MEWfVo7m75hsIhu1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717751423; c=relaxed/simple; bh=DYpx4jfQ2pJ69pholDvW6SWXEkPz4I4Vl9+n460bUJI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rUOSxmcNTxfyXtDYrq0M0EGnZuAHZacwZOXKLgcTTOjPKIzLReB3sLyGn/eiu/kQm+qEi4qph1WJiEPEv71WQmWM7Wqci+hhol014EgFhtyT8pKLldNZ+5b9nSWuDUgcftB2WhyixhmYh/O/SMi1Z7SV+gP+JT9FYWFQm28wucc= 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: acpica-devel@lists.linux.dev 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. 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 264F6C27C55 for ; Fri, 7 Jun 2024 09:10:41 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3MnkIty3cTW3/FxqJS0YmG1DUfN8504IXgCdkYa1nwU=; b=aR6WLrS2FSj2XD 2GAfdmTA64LRTjvsPzxtOHui9RJDuS6B+1Uw25uZem6+cc2XlmR21G1uhyElQfk2jWLsDTckZ/R+I 9goZuGGAaqJCOzyu780xjEmqqLwApru23U7bsngsHkqh2BkMP3w76nTPyXKjrjM5fBkmR1bB1yRNV nBYYQmq4O0wWu7EQEbDPdhD7F4TyZTT/3zbhiY90+/k9yA3sdKi3lSYy+CaZCgA40/LnsKH8SSPwD DziihPilwz351i/NwyAxpS5krkkbl++e7lMWG/qtFH+l1P3HZWjz805Jl4JjAuq36mcnxz6xx8nsw JhGBUzsLXKf4sZPtGpRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFVcB-0000000DFlN-1DLq; Fri, 07 Jun 2024 09:10:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFVc7-0000000DFjF-3z6x for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 09:10:25 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240607_021024_107030_D4F0A4F2 X-CRM114-Status: GOOD ( 15.68 ) 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-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gMjAyNC0wNi0wNyA4OjUzIGFtLCBBbWl0IFNpbmdoIFRvbWFyIHdyb3RlOgo+PiBPbiBGcmks IEp1biAwNywgMjAyNCBhdCAxMjoyMTo1NEFNICswNTMwLCBBbWl0IFNpbmdoIFRvbWFyIHdyb3Rl Ogo+Pgo+PiBbLi4uXQo+Pgo+Pj4+IGRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvcHJvY2Vzc29y X2NvcmUuYyAKPj4+PiBiL2RyaXZlcnMvYWNwaS9wcm9jZXNzb3JfY29yZS5jCj4+Pj4gaW5kZXgg YjIwM2NmZTI4NTUwLi45MTU3MTNjMGU5YjcgMTAwNjQ0Cj4+Pj4gLS0tIGEvZHJpdmVycy9hY3Bp L3Byb2Nlc3Nvcl9jb3JlLmMKPj4+PiArKysgYi9kcml2ZXJzL2FjcGkvcHJvY2Vzc29yX2NvcmUu Ywo+Pj4+IEBAIC0yMTUsNiArMjE1LDIxIEBAIHBoeXNfY3B1aWRfdCBfX2luaXQgYWNwaV9tYXBf bWFkdF9lbnRyeSh1MzIgCj4+Pj4gYWNwaV9pZCkKPj4+PiDCoMKgwqDCoMKgwqAgcmV0dXJuIHJ2 Owo+Pj4+IMKgwqAgfQo+Pj4+ICtpbnQgX19pbml0IGFjcGlfZ2V0X21hZHRfcmV2aXNpb24odm9p ZCkKPj4+Cj4+PiBXb25kZXJpbmcsIGlmIHdlIGNhbiBoYXZlI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