Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp740996pxb; Tue, 12 Apr 2022 12:08:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6GXjFDjG4eYMGOSg5jbiFFIi15jeb+1C+v2m5slOcZw9Fqt37BL+d0UOBBMTBYZbqI9gq X-Received: by 2002:a17:907:6d23:b0:6d9:ac9d:222 with SMTP id sa35-20020a1709076d2300b006d9ac9d0222mr37050163ejc.595.1649790532865; Tue, 12 Apr 2022 12:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649790532; cv=none; d=google.com; s=arc-20160816; b=AW4Nbl5Z6BbToThAMvdHBKD7FufGn2lTM7VRQ7ZBg3/2hVlnsBtMNp0qi3gDyl+eb0 f1zSjWSqo93i1apSU0LF0KQUXJp2yPPg48SuOP6TzM1FOpo0flaq1v+DSC92zUHeP5s9 IXXNR60dlDENZNwG7q55weV65NlLNNBGGE2RGMzyZLzYYqEKrHcl7x5n8BFgD7muS4/u 27p619It30dLXCdZvF7ofbogZYlMUgWNDl0/O5mHelS3J7Z4Nfdwn2fmQtp/j0r+o0Vu 0ZpWCANL5UtexXj03e0EDYFtYvZU+LjtZRrmm3g8k3oXoLsaVf28F4yO8To9R7d5KrWl yngQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=votMMWkY3evryUSLljehvNBS3q80m1phgUF0YTMRaw4=; b=FaPDp4zoBP3Crey7V3PyqTbFtMIu95rjWU3anynrLwyjodMwpYStBvCr453Bzf5w8s EkDlmSQUEmx0o5nFM1h6JYj6GPeVFyi0PJzH+1oKcANgvNykiQ3xIBlqydy72DB2fQJi LA92cRUi4fpVyD37HT1ciuDUDLGUW0N2BJHeUAqnkyUw6LuBH2jvywNWaBCdfNDdCKnP SDxDjE7x+K+R4lsqLz5FjVWdBbIlLXftX36uZYmLYT5luyzvVD2HDZU2lj/VmPoPLtLO RD+TJh9V+wHIdu3pHslvZN0miR7w167XloEJSQfA/9Q5w3bktIRWGvVZKk4CGOJYezyK xb3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j21-20020a170906095500b006e7f5a2a4b1si8633951ejd.853.2022.04.12.12.08.27; Tue, 12 Apr 2022 12:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349471AbiDKTHa (ORCPT + 99 others); Mon, 11 Apr 2022 15:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349416AbiDKTHN (ORCPT ); Mon, 11 Apr 2022 15:07:13 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED1EF33E25; Mon, 11 Apr 2022 12:04:36 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.0.0) id 985912d5c9d862fb; Mon, 11 Apr 2022 21:04:35 +0200 Received: from kreacher.localnet (unknown [213.134.175.113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 7A3E966BDFC; Mon, 11 Apr 2022 21:04:34 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 07/20] ACPICA: Add new ACPI 6.4 semantics for LoadTable() operator Date: Mon, 11 Apr 2022 20:52:26 +0200 Message-ID: <2200163.iZASKD2KPV@kreacher> In-Reply-To: <5578328.DvuYhMxLoT@kreacher> References: <5578328.DvuYhMxLoT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.175.113 X-CLIENT-HOSTNAME: 213.134.175.113 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrudekiedgudefhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepgfektdehueehteffueelleehhfffgfejtdehvddtfeetjeffveetheehvdejgfdunecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudejhedruddufeenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddujeehrdduudefpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bob Moore ACPICA commit b32dde35e26a63a85d78d4dc0a7260b61e626ac1 DDB_HANDLE is gone, now LoadTable() returns a pass/fail integer. Link: https://github.com/acpica/acpica/commit/b32dde35 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- exconfig.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff -Nurp linux.before_name/drivers/acpi/acpica/exconfig.c linux.after_name/drivers/acpi/acpica/exconfig.c --- linux.before_name/drivers/acpi/acpica/exconfig.c 2022-04-01 18:23:55.873311880 +0200 +++ linux.after_name/drivers/acpi/acpica/exconfig.c 2022-04-01 18:23:52.190359143 +0200 @@ -87,11 +87,21 @@ acpi_ex_load_table_op(struct acpi_walk_s struct acpi_namespace_node *parent_node; struct acpi_namespace_node *start_node; struct acpi_namespace_node *parameter_node = NULL; + union acpi_operand_object *return_obj; union acpi_operand_object *ddb_handle; u32 table_index; ACPI_FUNCTION_TRACE(ex_load_table_op); + /* Create the return object */ + + return_obj = acpi_ut_create_integer_object((u64)0); + if (!return_obj) { + return_ACPI_STATUS(AE_NO_MEMORY); + } + + *return_desc = return_obj; + /* Find the ACPI table in the RSDT/XSDT */ acpi_ex_exit_interpreter(); @@ -106,12 +116,6 @@ acpi_ex_load_table_op(struct acpi_walk_s /* Table not found, return an Integer=0 and AE_OK */ - ddb_handle = acpi_ut_create_integer_object((u64) 0); - if (!ddb_handle) { - return_ACPI_STATUS(AE_NO_MEMORY); - } - - *return_desc = ddb_handle; return_ACPI_STATUS(AE_OK); } @@ -198,7 +202,13 @@ acpi_ex_load_table_op(struct acpi_walk_s } } - *return_desc = ddb_handle; + /* Remove the reference to ddb_handle created by acpi_ex_add_table above */ + + acpi_ut_remove_reference(ddb_handle); + + /* Return -1 (non-zero) indicates success */ + + return_obj->integer.value = 0xFFFFFFFFFFFFFFFF; return_ACPI_STATUS(status); }