From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
To: Lv Zheng <lv.zheng@intel.com>, Len Brown <len.brown@intel.com>
Cc: Lv Zheng <zetalog@gmail.com>, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ACPI: Fix the issue that auto SSDT loading is conflict with customized SSDT that is included by the customized DSDT.
Date: Fri, 09 May 2014 12:40:25 +0200 [thread overview]
Message-ID: <536CB099.6000104@intel.com> (raw)
In-Reply-To: <f31e537e671ca01168e98e555cdee4154bb6c136.1399624932.git.lv.zheng@intel.com>
On 5/9/2014 10:44 AM, Lv Zheng wrote:
> This patch fixes the following issue:
> User can specify a DSDT with SSDT embedded, in which case, no_static_ssdt
> must be enforced. If we don't do that, then:
> 1. The namespace object conflicts will result in an AE_ALREADY_EXISTS
> exception;
> 2. The namespace objects that are deleted from the original SSDT will be
> restored by the auto loading of the original SSDT.
>
> Note that the DSDT customization is a compile-time feature, thus the SSDT
> inclusion indication of the DSDT customization is also implemented as a
> compile-time configurable.
>
> Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=69711
> Original-by: Enrico Etxe Arte <goitizena.generoa@gmail.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
> drivers/acpi/Kconfig | 8 ++++++++
> drivers/acpi/internal.h | 5 +++++
> drivers/acpi/osl.c | 14 +++++++++++++-
> drivers/acpi/tables.c | 2 ++
> 4 files changed, 28 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index c0160bb..6fef394 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -233,6 +233,14 @@ config ACPI_CUSTOM_DSDT
> bool
> default ACPI_CUSTOM_DSDT_FILE != ""
>
> +config ACPI_CUSTOM_DSDT_WITH_SSDT
> + bool "Customize DSDT with SSDT tables included"
> + depends on ACPI_CUSTOM_DSDT
If you think that we really have to have a separate CONFIG_ option here,
I would prefer ACPI_CUSTOM_DSDT to become a menu with a choice to build
it either with or without embedded SSDTs.
> + help
> + This option turns on acpi.no_static_ssdt by default.
This description requires the user building the kernel to know what the
above command line option means which isn't very useful.
> +
> + If the SSDT tables has been merged into the custom DSDT file, say Y.
> +
> config ACPI_INITRD_TABLE_OVERRIDE
> bool "ACPI tables override via initrd"
> depends on BLK_DEV_INITRD && X86
> diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
> index 9573913..f84ef59 100644
> --- a/drivers/acpi/internal.h
> +++ b/drivers/acpi/internal.h
> @@ -57,6 +57,11 @@ void acpi_cmos_rtc_init(void);
> #else
> static inline void acpi_cmos_rtc_init(void) {}
> #endif
> +#ifdef CONFIG_ACPI_CUSTOM_DSDT_WITH_SSDT
> +void __init acpi_ssdt_customized(void);
> +#else
> +static inline void acpi_ssdt_customized(void) {}
> +#endif
>
> extern bool acpi_force_hot_remove;
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 9aeae41..089e55d 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -1770,15 +1770,27 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
> }
> #endif
>
> -static int __init acpi_no_static_ssdt_setup(char *s)
> +static void __init acpi_set_no_static_ssdt(void)
> {
> acpi_gbl_disable_ssdt_table_install = TRUE;
> pr_info("ACPI: static SSDT installation disabled\n");
> +}
> +
> +#ifdef CONFIG_ACPI_CUSTOM_DSDT_WITH_SSDT
> +void __init acpi_ssdt_customized(void)
> +{
> + acpi_set_no_static_ssdt();
> +}
> +#else
> +static int __init acpi_no_static_ssdt_setup(char *s)
> +{
> + acpi_set_no_static_ssdt();
>
> return 0;
> }
>
> early_param("acpi_no_static_ssdt", acpi_no_static_ssdt_setup);
> +#endif
>
> static int __init acpi_disable_return_repair(char *s)
> {
> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> index 2178229..aaf2177 100644
> --- a/drivers/acpi/tables.c
> +++ b/drivers/acpi/tables.c
> @@ -184,6 +184,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
> }
> }
>
> +#include "internal.h"
>
> int __init
> acpi_table_parse_entries(char *id,
> @@ -333,6 +334,7 @@ int __init acpi_table_init(void)
> {
> acpi_status status;
>
> + acpi_ssdt_customized();
> status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
> if (ACPI_FAILURE(status))
> return -EINVAL;
next prev parent reply other threads:[~2014-05-09 10:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 2:48 [PATCH 0/2] ACPI: Fix issues related to the DSDT customization Lv Zheng
2014-04-08 2:49 ` [PATCH 1/2] ACPI: Fix the issue that auto SSDT loading is conflict with customized SSDT that is included by the customized DSDT Lv Zheng
2014-04-21 21:14 ` Rafael J. Wysocki
2014-04-22 0:50 ` Zheng, Lv
2014-04-22 11:19 ` Rafael J. Wysocki
2014-04-23 1:21 ` Zheng, Lv
2014-04-23 10:48 ` Rafael J. Wysocki
2014-04-25 0:37 ` Zheng, Lv
2014-04-08 2:49 ` [PATCH 2/2] ACPI: Fix the issue that the DSDT local copy is conflict with " Lv Zheng
2014-04-21 21:16 ` Rafael J. Wysocki
2014-04-22 0:43 ` Zheng, Lv
2014-05-09 8:44 ` [PATCH v2 1/2] ACPI: Fix the issue that auto SSDT loading is conflict with customized SSDT that is included by " Lv Zheng
2014-05-09 10:40 ` Rafael J. Wysocki [this message]
2014-05-10 3:55 ` Lv Zheng
2014-05-09 8:44 ` [PATCH v2 2/2] ACPI: Fix the issue that the DSDT local copy is conflict with " Lv Zheng
2014-05-12 0:29 ` Rafael J. Wysocki
2014-05-12 0:30 ` Zheng, Lv
2014-05-12 7:49 ` [PATCH v3 1/2] ACPI: Cleanup to convert acpi.no_static_ssdt into a compile-time configurable Lv Zheng
2014-05-19 22:49 ` Rafael J. Wysocki
2014-05-19 22:52 ` Rafael J. Wysocki
2014-05-20 2:01 ` Zheng, Lv
2014-05-12 7:50 ` [PATCH v3 2/2] ACPI: Fix the issue that the DSDT local copy is conflict with the customized DSDT Lv Zheng
2014-05-19 22:34 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536CB099.6000104@intel.com \
--to=rafael.j.wysocki@intel.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=zetalog@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).