From patchwork Wed May 29 17:12:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13679311 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 7E62EC25B75 for ; Wed, 29 May 2024 17:16:35 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QY1w8ycJ44dF1CnM0qVr+EmbOu72o7wzjHM8A9H05Bg=; b=BqQB6aVEltW/7C Pc660+MML2GegOTZMFfMEULH0drENvDpLGQKHPT56+m3MdEoJnQ3DSFrBjat5NA2K4XUnIXwaDN3d mvk0+rTN7Di7bv9ZMpnyqyNuCwgH1MK1mHVI/xGR3ARVpLUvY4FoabVNZEtZWC3jUL5u2EnXOchcP ZAv20ERZ1O8VWAgfG/gct+5ivdbkjUIzGTf5OuxNY+YDcb/EHTRRUECx+NGOoqljD3ooTh+MKFLOU iF6RD4IphGKsMilCULiqJfHy6IVZTehoVzxSECQq3SLwz9rGtHZgMGmMJmQUq3RBLE5N+g1VY5fsV EvQIKh4PBg87aZLlg4TA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCMuT-000000052Xt-1ZQD; Wed, 29 May 2024 17:16:21 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCMuQ-000000052Vs-11eh for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2024 17:16:19 +0000 Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VqGGl2clRz67l0C; Thu, 30 May 2024 01:15:11 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 4EFAF140447; Thu, 30 May 2024 01:16:12 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (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.39; Wed, 29 May 2024 18:16:11 +0100 From: Jonathan Cameron To: Dan Williams , , , Sudeep Holla CC: Andrew Morton , David Hildenbrand , Will Deacon , Jia He , Mike Rapoport , , , , Yuquan Wang , Oscar Salvador , Lorenzo Pieralisi , James Morse Subject: [RFC PATCH 7/8] acpi: srat: cxl: Skip zero length CXL fixed memory windows. Date: Wed, 29 May 2024 18:12:35 +0100 Message-ID: <20240529171236.32002-8-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529171236.32002-1-Jonathan.Cameron@huawei.com> References: <20240529171236.32002-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240529_101618_518891_893A291E X-CRM114-Status: GOOD ( 11.93 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org One reported platform uses this nonsensical entry to represent a disable CFWMS. The acpi_cxl driver already correctly errors out on seeing this, but that leaves an additional confusing node in /sys/devices/system/nodes/possible plus wastes some space. Signed-off-by: Jonathan Cameron --- drivers/acpi/numa/srat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index e3f26e71637a..28c963d5c51f 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -329,6 +329,11 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, int node; cfmws = (struct acpi_cedt_cfmws *)header; + + /* At least one firmware reports disabled entries with size 0 */ + if (cfmws->window_size == 0) + return 0; + start = cfmws->base_hpa; end = cfmws->base_hpa + cfmws->window_size;