Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2225384/?format=api
{ "id": 2225384, "url": "http://patchwork.ozlabs.org/api/patches/2225384/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260420220804.71564-2-heinrich.schuchardt@canonical.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260420220804.71564-2-heinrich.schuchardt@canonical.com>", "list_archive_url": null, "date": "2026-04-20T22:08:01", "name": "[1/4] acpi: add index parameter to acpi_find_table", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8314e7e8b1f306c912e57c2d6f9be3fc0fd8c248", "submitter": { "id": 82181, "url": "http://patchwork.ozlabs.org/api/people/82181/?format=api", "name": "Heinrich Schuchardt", "email": "heinrich.schuchardt@canonical.com" }, "delegate": { "id": 3184, "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api", "username": "sjg", "first_name": "Simon", "last_name": "Glass", "email": "sjg@chromium.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260420220804.71564-2-heinrich.schuchardt@canonical.com/mbox/", "series": [ { "id": 500693, "url": "http://patchwork.ozlabs.org/api/series/500693/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=500693", "date": "2026-04-20T22:08:00", "name": "acpi: handle duplicate tables in acpi dump", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500693/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225384/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225384/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (4096-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.a=rsa-sha256 header.s=20251003 header.b=St5oKQxo;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=canonical.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (4096-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.b=\"St5oKQxo\";\n\tdkim-atps=neutral", "phobos.denx.de; dmarc=pass (p=reject dis=none)\n header.from=canonical.com", "phobos.denx.de; spf=pass\n smtp.mailfrom=heinrich.schuchardt@canonical.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g00440hz2z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 08:08:20 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id EFDDC844E7;\n\tTue, 21 Apr 2026 00:08:12 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 327FE84496; Tue, 21 Apr 2026 00:08:10 +0200 (CEST)", "from smtp-relay-canonical-0.canonical.com\n (smtp-relay-canonical-0.canonical.com [185.125.188.120])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 1526D844EB\n for <u-boot@lists.denx.de>; Tue, 21 Apr 2026 00:08:07 +0200 (CEST)", "from LT03.fritz.box (ip-176-199-115-125.um44.pools.vodafone-ip.de\n [176.199.115.125])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 96ED940A2D;\n Mon, 20 Apr 2026 22:08:06 +0000 (UTC)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20251003; t=1776722886;\n bh=edDvIAaoqdGpD3dtk6qcSzrrhdVXUPgpKOlUsuaTObo=;\n h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n MIME-Version;\n b=St5oKQxoPQyf+vABzhRPYVeQP7ECXoPoSpcd7WsyZEwIQSzDv5EebMcuIMF7UJIRd\n ouYbgV0+tC7hcSwIxkdwjaMh4+SEj8odikSaIIivfqjqXsiidbBnmnLQmfHar9cWrN\n FO4KiLlv3itXMpEJx2DoLm5vD1kxDfle+A5m7JNVc3IlJ5OLGbcXZ4Ssj2fjFgQr6Z\n Ga+kbjmoLmMYrtTFJx5f2FEQnz0++8S+xhLAZcdm5fWuMhYBTuIvGpRhZH95gm5mRZ\n 3RllY2Od0vtd6gWsXP4RfsMtNQlq0icmdGcI/i0ZaR23myLhss/J6XZuow33zALsaA\n ERBSBez6CjuK/imLrdw01ZRftGxWcs5eP7RDmJJ7LCV0VB5e9g3BcnXODTiiIeLvKy\n ndLEmUyLRW6es6I2Fjp1ofIbIeWsu/XzC5AX5HsM5ehlng+utG86jQK+wDhYdpCJzo\n XeMcruXBvaZATFD6Ez/J+euHvqVOJdGT3x2U1FN3aZ9IyT4RWtU2Tq6lVhuWgza3p5\n tfZUvN6GTqSugdfegq2HTMKKS57YoMCW8e7AcXIg0hBdQkJmbbOjFZFH/NLaZP6dax\n G7QPP/sdIYfYMdcI+BOZkvmG+8bGp6+vEWm4zBWRbAz0z5Nx9frT3KtQ2VT01xU1gZ\n iqszoBsOyyM2is2JpCXv/N0k=", "From": "Heinrich Schuchardt <heinrich.schuchardt@canonical.com>", "To": "Simon Glass <sjg@chromium.org>", "Cc": "Tom Rini <trini@konsulko.com>, Bin Meng <bmeng.cn@gmail.com>,\n u-boot@lists.denx.de,\n Heinrich Schuchardt <heinrich.schuchardt@canonical.com>", "Subject": "[PATCH 1/4] acpi: add index parameter to acpi_find_table", "Date": "Tue, 21 Apr 2026 00:08:01 +0200", "Message-ID": "<20260420220804.71564-2-heinrich.schuchardt@canonical.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260420220804.71564-1-heinrich.schuchardt@canonical.com>", "References": "<20260420220804.71564-1-heinrich.schuchardt@canonical.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "ACPI tables like SSDT may have multiple indexs.\n\nAdd an index parameter to acpi_find_table() to allow finding the n-th\ninstance of an ACPI table with the same signature.\n\nUpdate all callers to pass index 1.\n\nSigned-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>\n---\n cmd/acpi.c | 2 +-\n drivers/serial/serial_coreboot.c | 2 +-\n include/acpi/acpi_table.h | 3 ++-\n lib/acpi/acpi.c | 21 ++++++++++++++++-----\n test/dm/acpi.c | 18 +++++++++---------\n 5 files changed, 29 insertions(+), 17 deletions(-)", "diff": "diff --git a/cmd/acpi.c b/cmd/acpi.c\nindex bb243202009..a88cd995460 100644\n--- a/cmd/acpi.c\n+++ b/cmd/acpi.c\n@@ -55,7 +55,7 @@ static int dump_table_name(const char *sig)\n {\n \tstruct acpi_table_header *hdr;\n \n-\thdr = acpi_find_table(sig);\n+\thdr = acpi_find_table(sig, 0);\n \tif (!hdr)\n \t\treturn -ENOENT;\n \tprintf(\"%.*s @ %16lx\\n\", ACPI_NAME_LEN, hdr->signature,\ndiff --git a/drivers/serial/serial_coreboot.c b/drivers/serial/serial_coreboot.c\nindex b1f69f6998c..e41430a8cd7 100644\n--- a/drivers/serial/serial_coreboot.c\n+++ b/drivers/serial/serial_coreboot.c\n@@ -30,7 +30,7 @@ static int read_dbg2(struct ns16550_plat *plat)\n \t\treturn -ENOENT;\n \t}\n \n-\ttab = acpi_find_table(\"DBG2\");\n+\ttab = acpi_find_table(\"DBG2\", 0);\n \tif (!tab) {\n \t\tlog_debug(\"No DBG2 table\\n\");\n \t\treturn -ENOENT;\ndiff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h\nindex 4895366a618..1c5aba9c54d 100644\n--- a/include/acpi/acpi_table.h\n+++ b/include/acpi/acpi_table.h\n@@ -1284,9 +1284,10 @@ ulong write_acpi_tables(ulong start);\n * acpi_find_table() - Look up an ACPI table\n *\n * @sig: Signature of table (4 characters, upper case)\n+ * @index: 1-based index number to find\n * Return: pointer to table header, or NULL if not found\n */\n-struct acpi_table_header *acpi_find_table(const char *sig);\n+struct acpi_table_header *acpi_find_table(const char *sig, ulong index);\n \n /**\n * acpi_update_checksum() - update ACPI table checksum\ndiff --git a/lib/acpi/acpi.c b/lib/acpi/acpi.c\nindex 596301a43fe..0cc492b1569 100644\n--- a/lib/acpi/acpi.c\n+++ b/lib/acpi/acpi.c\n@@ -18,7 +18,7 @@ void acpi_update_checksum(struct acpi_table_header *header)\n \theader->checksum = table_compute_checksum(header, header->length);\n }\n \n-struct acpi_table_header *acpi_find_table(const char *sig)\n+struct acpi_table_header *acpi_find_table(const char *sig, ulong index)\n {\n \tstruct acpi_rsdp *rsdp;\n \tstruct acpi_rsdt *rsdt;\n@@ -46,8 +46,11 @@ struct acpi_table_header *acpi_find_table(const char *sig)\n \t\t\thdr = nomap_sysmem(xsdt->entry[i], 0);\n \t\telse\n \t\t\thdr = nomap_sysmem(rsdt->entry[i], 0);\n-\t\tif (!memcmp(hdr->signature, sig, ACPI_NAME_LEN))\n-\t\t\treturn hdr;\n+\t\tif (!memcmp(hdr->signature, sig, ACPI_NAME_LEN)) {\n+\t\t\tif (!index)\n+\t\t\t\treturn hdr;\n+\t\t\t--index;\n+\t\t}\n \t\tif (!memcmp(hdr->signature, \"FACP\", ACPI_NAME_LEN)) {\n \t\t\tstruct acpi_fadt *fadt = (struct acpi_fadt *)hdr;\n \n@@ -60,7 +63,11 @@ struct acpi_table_header *acpi_find_table(const char *sig)\n \t\t\t\t\tdsdt = nomap_sysmem(fadt->dsdt, 0);\n \t\t\t\telse\n \t\t\t\t\tdsdt = NULL;\n-\t\t\t\treturn dsdt;\n+\t\t\t\tif (dsdt) {\n+\t\t\t\t\tif (!index)\n+\t\t\t\t\t\treturn dsdt;\n+\t\t\t\t\t--index;\n+\t\t\t\t}\n \t\t\t}\n \n \t\t\tif (!memcmp(sig, \"FACS\", ACPI_NAME_LEN)) {\n@@ -73,7 +80,11 @@ struct acpi_table_header *acpi_find_table(const char *sig)\n \t\t\t\t\tfacs = nomap_sysmem(fadt->firmware_ctrl, 0);\n \t\t\t\telse\n \t\t\t\t\tfacs = NULL;\n-\t\t\t\treturn facs;\n+\t\t\t\tif (facs) {\n+\t\t\t\t\tif (!index)\n+\t\t\t\t\t\treturn facs;\n+\t\t\t\t\t--index;\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\ndiff --git a/test/dm/acpi.c b/test/dm/acpi.c\nindex 559ea269de2..8bec09f4e44 100644\n--- a/test/dm/acpi.c\n+++ b/test/dm/acpi.c\n@@ -809,33 +809,33 @@ static int dm_test_acpi_find_table(struct unit_test_state *uts)\n \tut_assert(xsdt);\n \n \t/* Find with both RSDT and XSDT */\n-\ttable = acpi_find_table(\"TST1\");\n+\ttable = acpi_find_table(\"TST1\", 0);\n \tut_asserteq_ptr(table1, table);\n \tut_asserteq_strn(\"TST1\", table->signature);\n-\ttable = acpi_find_table(\"TST2\");\n+\ttable = acpi_find_table(\"TST2\", 0);\n \tut_asserteq_ptr(table2, table);\n \tut_asserteq_strn(\"TST2\", table->signature);\n-\ttable = acpi_find_table(\"TST3\");\n+\ttable = acpi_find_table(\"TST3\", 0);\n \tut_asserteq_ptr(table3, table);\n \tut_asserteq_strn(\"TST3\", table->signature);\n \n \t/* Find with XSDT only */\n \trsdp->rsdt_address = 0;\n-\ttable = acpi_find_table(\"TST1\");\n+\ttable = acpi_find_table(\"TST1\", 0);\n \tut_asserteq_ptr(table1, table);\n-\ttable = acpi_find_table(\"TST2\");\n+\ttable = acpi_find_table(\"TST2\", 0);\n \tut_asserteq_ptr(table2, table);\n-\ttable = acpi_find_table(\"TST3\");\n+\ttable = acpi_find_table(\"TST3\", 0);\n \tut_asserteq_ptr(table3, table);\n \trsdp->rsdt_address = rsdt;\n \n \t/* Find with RSDT only */\n \trsdp->xsdt_address = 0;\n-\ttable = acpi_find_table(\"TST1\");\n+\ttable = acpi_find_table(\"TST1\", 0);\n \tut_asserteq_ptr(table1, table);\n-\ttable = acpi_find_table(\"TST2\");\n+\ttable = acpi_find_table(\"TST2\", 0);\n \tut_asserteq_ptr(table2, table);\n-\ttable = acpi_find_table(\"TST3\");\n+\ttable = acpi_find_table(\"TST3\", 0);\n \tut_asserteq_ptr(table3, table);\n \trsdp->xsdt_address = xsdt;\n \n", "prefixes": [ "1/4" ] }