* [PATCH] ACPI / tables: Fix DSDT override mechanism
@ 2016-05-05 15:22 Rafael J. Wysocki
2016-05-05 23:27 ` [PATCH v2] " Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2016-05-05 15:22 UTC (permalink / raw)
To: ACPI Devel Maling List; +Cc: Lv Zheng, Linux Kernel Mailing List
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Commit 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to
tables.c) forgot to move the CONFIG_ACPI_CUSTOM_DSDT_FILE inclusion
directive from osl.c to tables.c. Fix that.
Fixes: 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to tables.c)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
Commit 5ae74f2cc2f1 is in linux-next now.
---
drivers/acpi/osl.c | 4 ----
drivers/acpi/tables.c | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
Index: linux-pm/drivers/acpi/tables.c
===================================================================
--- linux-pm.orig/drivers/acpi/tables.c
+++ linux-pm/drivers/acpi/tables.c
@@ -45,6 +45,10 @@ static struct acpi_table_desc initial_ta
static int acpi_apic_instance __initdata;
+#ifdef CONFIG_ACPI_CUSTOM_DSDT
+#include CONFIG_ACPI_CUSTOM_DSDT_FILE
+#endif
+
/*
* Disable table checksum verification for the early stage due to the size
* limitation of the current x86 early mapping implementation.
Index: linux-pm/drivers/acpi/osl.c
===================================================================
--- linux-pm.orig/drivers/acpi/osl.c
+++ linux-pm/drivers/acpi/osl.c
@@ -56,10 +56,6 @@ struct acpi_os_dpc {
struct work_struct work;
};
-#ifdef CONFIG_ACPI_CUSTOM_DSDT
-#include CONFIG_ACPI_CUSTOM_DSDT_FILE
-#endif
-
#ifdef ENABLE_DEBUGGER
#include <linux/kdb.h>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] ACPI / tables: Fix DSDT override mechanism
2016-05-05 15:22 [PATCH] ACPI / tables: Fix DSDT override mechanism Rafael J. Wysocki
@ 2016-05-05 23:27 ` Rafael J. Wysocki
2016-05-06 0:31 ` Zheng, Lv
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2016-05-05 23:27 UTC (permalink / raw)
To: ACPI Devel Maling List; +Cc: Lv Zheng, Linux Kernel Mailing List
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Commit 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to
tables.c) forgot to move the CONFIG_ACPI_CUSTOM_DSDT_FILE inclusion
directive from osl.c to tables.c. Fix that.
Fixes: 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to tables.c)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
A cosmetic change.
v1 -> v2: Move the new #include closer to the other #include directives in
tables.c.
---
drivers/acpi/osl.c | 4 ----
drivers/acpi/tables.c | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
Index: linux-pm/drivers/acpi/tables.c
===================================================================
--- linux-pm.orig/drivers/acpi/tables.c
+++ linux-pm/drivers/acpi/tables.c
@@ -36,6 +36,10 @@
#include <linux/memblock.h>
#include "internal.h"
+#ifdef CONFIG_ACPI_CUSTOM_DSDT
+#include CONFIG_ACPI_CUSTOM_DSDT_FILE
+#endif
+
#define ACPI_MAX_TABLES 128
static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
Index: linux-pm/drivers/acpi/osl.c
===================================================================
--- linux-pm.orig/drivers/acpi/osl.c
+++ linux-pm/drivers/acpi/osl.c
@@ -56,10 +56,6 @@ struct acpi_os_dpc {
struct work_struct work;
};
-#ifdef CONFIG_ACPI_CUSTOM_DSDT
-#include CONFIG_ACPI_CUSTOM_DSDT_FILE
-#endif
-
#ifdef ENABLE_DEBUGGER
#include <linux/kdb.h>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] ACPI / tables: Fix DSDT override mechanism
2016-05-05 23:27 ` [PATCH v2] " Rafael J. Wysocki
@ 2016-05-06 0:31 ` Zheng, Lv
2016-05-06 8:32 ` Zheng, Lv
0 siblings, 1 reply; 4+ messages in thread
From: Zheng, Lv @ 2016-05-06 0:31 UTC (permalink / raw)
To: Rafael J. Wysocki, ACPI Devel Maling List; +Cc: Linux Kernel Mailing List
Hi,
I also noticed this and was about to write a fix patch.
The build issue wasn't caught by LKP, I noticed it during ACPICA release test.
Thanks for doing this. :-)
> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki
> Subject: [PATCH v2] ACPI / tables: Fix DSDT override mechanism
>
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Commit 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to
> tables.c) forgot to move the CONFIG_ACPI_CUSTOM_DSDT_FILE inclusion
> directive from osl.c to tables.c. Fix that.
>
> Fixes: 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to tables.c)
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> A cosmetic change.
>
> v1 -> v2: Move the new #include closer to the other #include directives in
> tables.c.
>
> ---
> drivers/acpi/osl.c | 4 ----
> drivers/acpi/tables.c | 4 ++++
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> Index: linux-pm/drivers/acpi/tables.c
> ================================================================
> ===
> --- linux-pm.orig/drivers/acpi/tables.c
> +++ linux-pm/drivers/acpi/tables.c
> @@ -36,6 +36,10 @@
> #include <linux/memblock.h>
> #include "internal.h"
>
> +#ifdef CONFIG_ACPI_CUSTOM_DSDT
> +#include CONFIG_ACPI_CUSTOM_DSDT_FILE
> +#endif
> +
[Lv Zheng]
IMO, we could move this closer to acpi_os_table_override.
And move CONFIG_ACPI_CUSTOM_DSDT out of this function to form the following style:
#ifdef CONFIG_ACPI_CUSTOM_DSDT
#include CONFIG_ACPI_CUSTOM_DSDT_FILE
acpi_status acpi_os_table_override(...)
{
}
#else
acpi_status acpi_os_table_override(...)
{
return AE_SUPPORT;
}
#endif
We can return AE_SUPPORT from acpi_os_table_override() here, please refer to drivers/acpi/acpica/tbinstal.c.
By doing so, we can:
1. make acpi_os_table_override clearer, and
2. make #ifdef maintained at function boundary, and
3. remove additional #ifdef CONFIG_ACPI_CUSTOM_DSDT, and
4. help to avoid same future mistakes.
Thanks and best regards
-Lv
> #define ACPI_MAX_TABLES 128
>
> static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
> Index: linux-pm/drivers/acpi/osl.c
> ================================================================
> ===
> --- linux-pm.orig/drivers/acpi/osl.c
> +++ linux-pm/drivers/acpi/osl.c
> @@ -56,10 +56,6 @@ struct acpi_os_dpc {
> struct work_struct work;
> };
>
> -#ifdef CONFIG_ACPI_CUSTOM_DSDT
> -#include CONFIG_ACPI_CUSTOM_DSDT_FILE
> -#endif
> -
> #ifdef ENABLE_DEBUGGER
> #include <linux/kdb.h>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] ACPI / tables: Fix DSDT override mechanism
2016-05-06 0:31 ` Zheng, Lv
@ 2016-05-06 8:32 ` Zheng, Lv
0 siblings, 0 replies; 4+ messages in thread
From: Zheng, Lv @ 2016-05-06 8:32 UTC (permalink / raw)
To: Zheng, Lv, Rafael J. Wysocki, ACPI Devel Maling List
Cc: Linux Kernel Mailing List
Hi,
> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> owner@vger.kernel.org] On Behalf Of Zheng, Lv
> Subject: RE: [PATCH v2] ACPI / tables: Fix DSDT override mechanism
>
> Hi,
>
> I also noticed this and was about to write a fix patch.
> The build issue wasn't caught by LKP, I noticed it during ACPICA release test.
> Thanks for doing this. :-)
>
> > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> > owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki
> > Subject: [PATCH v2] ACPI / tables: Fix DSDT override mechanism
> >
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Commit 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to
> > tables.c) forgot to move the CONFIG_ACPI_CUSTOM_DSDT_FILE inclusion
> > directive from osl.c to tables.c. Fix that.
> >
> > Fixes: 5ae74f2cc2f1 (ACPI / tables: Move table override mechanisms to
> tables.c)
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >
> > A cosmetic change.
> >
> > v1 -> v2: Move the new #include closer to the other #include directives in
> > tables.c.
> >
> > ---
> > drivers/acpi/osl.c | 4 ----
> > drivers/acpi/tables.c | 4 ++++
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > Index: linux-pm/drivers/acpi/tables.c
> >
> ================================================================
> > ===
> > --- linux-pm.orig/drivers/acpi/tables.c
> > +++ linux-pm/drivers/acpi/tables.c
> > @@ -36,6 +36,10 @@
> > #include <linux/memblock.h>
> > #include "internal.h"
> >
> > +#ifdef CONFIG_ACPI_CUSTOM_DSDT
> > +#include CONFIG_ACPI_CUSTOM_DSDT_FILE
> > +#endif
> > +
> [Lv Zheng]
> IMO, we could move this closer to acpi_os_table_override.
> And move CONFIG_ACPI_CUSTOM_DSDT out of this function to form the
> following style:
>
> #ifdef CONFIG_ACPI_CUSTOM_DSDT
> #include CONFIG_ACPI_CUSTOM_DSDT_FILE
>
> acpi_status acpi_os_table_override(...)
> {
> }
> #else
> acpi_status acpi_os_table_override(...)
> {
> return AE_SUPPORT;
> }
> #endif
>
> We can return AE_SUPPORT from acpi_os_table_override() here, please refer
> to drivers/acpi/acpica/tbinstal.c.
> By doing so, we can:
> 1. make acpi_os_table_override clearer, and
> 2. make #ifdef maintained at function boundary, and
> 3. remove additional #ifdef CONFIG_ACPI_CUSTOM_DSDT, and
> 4. help to avoid same future mistakes.
>
[Lv Zheng]
What I said above may not be suitable for a stable material.
And I also noticed that not only DSDT override, but also initrd override need a similar stub change.
So we needn't them in this patch.
Acked-by: Lv Zheng <lv.zheng@intel.com>
Thanks and best regards
-Lv
>
> > #define ACPI_MAX_TABLES 128
> >
> > static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
> > Index: linux-pm/drivers/acpi/osl.c
> >
> ================================================================
> > ===
> > --- linux-pm.orig/drivers/acpi/osl.c
> > +++ linux-pm/drivers/acpi/osl.c
> > @@ -56,10 +56,6 @@ struct acpi_os_dpc {
> > struct work_struct work;
> > };
> >
> > -#ifdef CONFIG_ACPI_CUSTOM_DSDT
> > -#include CONFIG_ACPI_CUSTOM_DSDT_FILE
> > -#endif
> > -
> > #ifdef ENABLE_DEBUGGER
> > #include <linux/kdb.h>
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> \x04�{.n�+�������+%��lzwm��b�맲��r��zX��\x16��(��\x17��ܨ}���Ơz�&j:+v���\r���
> �zZ+��+zf���h���~����i���z�\x1e�w���?����&�)ߢ^[f
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-06 8:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 15:22 [PATCH] ACPI / tables: Fix DSDT override mechanism Rafael J. Wysocki
2016-05-05 23:27 ` [PATCH v2] " Rafael J. Wysocki
2016-05-06 0:31 ` Zheng, Lv
2016-05-06 8:32 ` Zheng, Lv
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).