Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5415151ybi; Wed, 12 Jun 2019 02:03:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcV1UtVQzV8gyJyIlQK8lPIJkYW4mAxDItwaiPpPmiV0Dqlnx+SKq8OEhVgkArEE4VFUVD X-Received: by 2002:a63:1a59:: with SMTP id a25mr17109524pgm.173.1560330235521; Wed, 12 Jun 2019 02:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560330235; cv=none; d=google.com; s=arc-20160816; b=lcMYNu5v7pInvYw7FsqQ3e74DQsO8LlLqi53CTSw16kVmKpQM6auteWxOTcNdNhhwZ qdyLxgXjbrz7Jsexok6WDfXvoBLkA350kBQ/96XabnyLibVbxoOicOO5u2Udyd4RrTI3 nHeysdaOOKSzoyLS6modxJ0qf+zMjMfW8h29Vcmbg5VZx8mG5G8viOGoGfrRBCUlSPgx hzzqJp+HbTb8faLzI3WJXbwIJD3/C2hG9zc6/cNEW9EaZGTkNTfIMdpiWndOL7xIpYja 2+n20c8a+dERoAtJ/Ok77VGTZfJQsvMrbp69M4ZEIoznswO74Arg9TGndkoOl4K8QChT MFGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=/mUZvwT8wqm+PTVDkwXF9MKXntkr5l7qlMyFnsqEPaU=; b=eB1huhuzN8URE+qjqdttsfAOxUUyV+pilnScgUozFtcIQaKgauVKGN1G/9PBU+vvKo WJe1gmBSyl06bAD7IA/Sbv4mmjONPcYfuuvTsxEikLnW80P6WjFVYI1xhGvPNJPrQ5XZ 3+iGh5pXfzXmihHAHLhK3MT/z/BtBr/AK6gNaXwfJiFw28CUMEvUBopIt8CC8lt6hB/P QHXgbLn7YS4RyS+fOfB1qII857Pa4hqCcdaboJNvNsMEWYHgrxNNFjRZpMwb5XjevO/j ZX7eGyai46jMhy7UkRO9FhgZSui4sMQxW0uTFyBbzGWWc0rP7zyQ7mMHidUH+gRXT3Y+ Im2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si14576000pls.216.2019.06.12.02.03.39; Wed, 12 Jun 2019 02:03:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731772AbfFLIpj (ORCPT + 99 others); Wed, 12 Jun 2019 04:45:39 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:43566 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbfFLIpi (ORCPT ); Wed, 12 Jun 2019 04:45:38 -0400 X-Greylist: delayed 539 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Jun 2019 04:45:38 EDT Received: from pc-niv.weinmann.com (localhost [127.0.0.1]) by mail.steuer-voss.de (Postfix) with ESMTP id 80C9B4D05C; Wed, 12 Jun 2019 10:36:37 +0200 (CEST) From: Nikolaus Voss To: "Rafael J. Wysocki" , Len Brown , Robert Moore , Erik Schmauss , Jacek Anaszewski , Pavel Machek , Dan Murphy , Thierry Reding Cc: Nikolaus Voss , linux-acpi@vger.kernel.org, devel@acpica.org, linux-leds@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, nv@vosn.de Subject: [PATCH v2 1/3] ACPI: Resolve objects on host-directed table loads Date: Wed, 12 Jun 2019 10:36:06 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If an ACPI SSDT overlay is loaded after built-in tables have been loaded e.g. via configfs or efivar_ssdt_load() it is necessary to rewalk the namespace to resolve references. Without this, relative and absolute paths like ^PCI0.SBUS or \_SB.PCI0.SBUS are not resolved correctly. Make configfs load use the same method as efivar_ssdt_load(). Signed-off-by: Nikolaus Voss --- drivers/acpi/acpi_configfs.c | 6 +----- drivers/acpi/acpica/tbxfload.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/acpi_configfs.c b/drivers/acpi/acpi_configfs.c index f92033661239..663f0d88f912 100644 --- a/drivers/acpi/acpi_configfs.c +++ b/drivers/acpi/acpi_configfs.c @@ -56,11 +56,7 @@ static ssize_t acpi_table_aml_write(struct config_item *cfg, if (!table->header) return -ENOMEM; - ACPI_INFO(("Host-directed Dynamic ACPI Table Load:")); - ret = acpi_tb_install_and_load_table( - ACPI_PTR_TO_PHYSADDR(table->header), - ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, - &table->index); + ret = acpi_load_table(table->header); if (ret) { kfree(table->header); table->header = NULL; diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c index 4f30f06a6f78..ef8f8a9f3c9c 100644 --- a/drivers/acpi/acpica/tbxfload.c +++ b/drivers/acpi/acpica/tbxfload.c @@ -297,6 +297,17 @@ acpi_status acpi_load_table(struct acpi_table_header *table) status = acpi_tb_install_and_load_table(ACPI_PTR_TO_PHYSADDR(table), ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &table_index); + + if (ACPI_SUCCESS(status)) { + /* Complete the initialization/resolution of package objects */ + + status = acpi_ns_walk_namespace(ACPI_TYPE_PACKAGE, + ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, 0, + acpi_ns_init_one_package, + NULL, NULL, NULL); + } + return_ACPI_STATUS(status); } -- 2.17.1