* [PATCH v2 0/2] S3 wakeup support for hardware reduced model @ 2024-08-12 5:46 Jiaqing Zhao 2024-08-12 5:46 ` [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build Jiaqing Zhao 2024-08-12 5:46 ` [PATCH v2 2/2] ACPICA: Allow setting waking vector on reduced hardware platforms Jiaqing Zhao 0 siblings, 2 replies; 6+ messages in thread From: Jiaqing Zhao @ 2024-08-12 5:46 UTC (permalink / raw) To: Robert Moore, Rafael J. Wysocki, Len Brown, linux-acpi, acpica-devel Cc: linux-kernel, Jiaqing Zhao S3 wakeup requires waking vector in FACS table, which is typically set by OS. This patchset enables FACS table support and allows setting waking vector in "Hardware-reduced ACPI support only" builds (CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y). Link: https://github.com/acpica/acpica/pull/960 Link: https://github.com/acpica/acpica/commit/ee53ed6b5452612bb44af542b68d605f8b2b1104 v1->v2: * Not removing acpi_hw_set_firmware_waking_vector() declaration in hwxfsleep.c * Change was merged in ACPICA project, add links to it. Jiaqing Zhao (2): ACPICA: Detect FACS in reduced hardware build ACPICA: Allow setting waking vector on reduced hardware platforms drivers/acpi/acpica/acglobal.h | 6 +----- drivers/acpi/acpica/hwxfsleep.c | 15 ++++++--------- drivers/acpi/acpica/tbutils.c | 5 +---- drivers/acpi/acpica/utxfinit.c | 24 ++++++++++++------------ include/acpi/acconfig.h | 1 - include/acpi/acpixf.h | 8 ++++---- 6 files changed, 24 insertions(+), 35 deletions(-) -- 2.43.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build 2024-08-12 5:46 [PATCH v2 0/2] S3 wakeup support for hardware reduced model Jiaqing Zhao @ 2024-08-12 5:46 ` Jiaqing Zhao 2024-08-20 14:55 ` Rafael J. Wysocki 2024-08-12 5:46 ` [PATCH v2 2/2] ACPICA: Allow setting waking vector on reduced hardware platforms Jiaqing Zhao 1 sibling, 1 reply; 6+ messages in thread From: Jiaqing Zhao @ 2024-08-12 5:46 UTC (permalink / raw) To: Robert Moore, Rafael J. Wysocki, Len Brown, linux-acpi, acpica-devel Cc: linux-kernel, Jiaqing Zhao According to Section 5.2.10 of ACPI Specification, FACS is optional in reduced hardware model. Enable the detection for "Hardware-reduced ACPI support only" build (CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y) also. Link: https://github.com/acpica/acpica/commit/ee53ed6b5452612bb44af542b68d605f8b2b1104 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> --- drivers/acpi/acpica/acglobal.h | 6 +----- drivers/acpi/acpica/tbutils.c | 5 +---- drivers/acpi/acpica/utxfinit.c | 24 ++++++++++++------------ include/acpi/acconfig.h | 1 - 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index f4c90fc99be2..309ce8efb4f6 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h @@ -29,11 +29,7 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_dsdt_index, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL(u32, acpi_gbl_facs_index, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL(u32, acpi_gbl_fadt_index, ACPI_INVALID_TABLE_INDEX); - -#if (!ACPI_REDUCED_HARDWARE) -ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS); - -#endif /* !ACPI_REDUCED_HARDWARE */ +ACPI_INIT_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS, NULL); /* These addresses are calculated from the FADT Event Block addresses */ diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 15fa68a5ea6e..356700349b45 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c @@ -18,7 +18,6 @@ ACPI_MODULE_NAME("tbutils") static acpi_physical_address acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size); -#if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * * FUNCTION: acpi_tb_initialize_facs @@ -37,8 +36,7 @@ acpi_status acpi_tb_initialize_facs(void) struct acpi_table_facs *facs; if (acpi_gbl_FADT.Xfacs && - (!acpi_gbl_FADT.facs - || !acpi_gbl_use32_bit_facs_addresses)) { + (!acpi_gbl_FADT.facs || !acpi_gbl_use32_bit_facs_addresses)) { (void)acpi_get_table_by_index(acpi_gbl_xfacs_index, ACPI_CAST_INDIRECT_PTR(struct acpi_table_header, @@ -56,7 +54,6 @@ acpi_status acpi_tb_initialize_facs(void) return (AE_OK); } -#endif /* !ACPI_REDUCED_HARDWARE */ /******************************************************************************* * diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c index 1915bec2b279..70ae0afa7939 100644 --- a/drivers/acpi/acpica/utxfinit.c +++ b/drivers/acpi/acpica/utxfinit.c @@ -120,6 +120,18 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags) */ acpi_gbl_early_initialization = FALSE; + /* + * Obtain a permanent mapping for the FACS. This is required for the + * Global Lock and the Firmware Waking Vector + */ + if (!(flags & ACPI_NO_FACS_INIT)) { + status = acpi_tb_initialize_facs(); + if (ACPI_FAILURE(status)) { + ACPI_WARNING((AE_INFO, "Could not map the FACS table")); + return_ACPI_STATUS(status); + } + } + #if (!ACPI_REDUCED_HARDWARE) /* Enable ACPI mode */ @@ -137,18 +149,6 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags) } } - /* - * Obtain a permanent mapping for the FACS. This is required for the - * Global Lock and the Firmware Waking Vector - */ - if (!(flags & ACPI_NO_FACS_INIT)) { - status = acpi_tb_initialize_facs(); - if (ACPI_FAILURE(status)) { - ACPI_WARNING((AE_INFO, "Could not map the FACS table")); - return_ACPI_STATUS(status); - } - } - /* * Initialize ACPI Event handling (Fixed and General Purpose) * diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index d768d9c568cf..2da5f4a6e814 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -67,7 +67,6 @@ * General Purpose Events (GPEs) * Global Lock * ACPI PM timer - * FACS table (Waking vectors and Global Lock) */ #ifndef ACPI_REDUCED_HARDWARE #define ACPI_REDUCED_HARDWARE FALSE -- 2.43.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build 2024-08-12 5:46 ` [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build Jiaqing Zhao @ 2024-08-20 14:55 ` Rafael J. Wysocki 2024-08-26 1:09 ` Jiaqing Zhao 0 siblings, 1 reply; 6+ messages in thread From: Rafael J. Wysocki @ 2024-08-20 14:55 UTC (permalink / raw) To: Jiaqing Zhao Cc: Robert Moore, Rafael J. Wysocki, Len Brown, linux-acpi, acpica-devel, linux-kernel On Mon, Aug 12, 2024 at 7:47 AM Jiaqing Zhao <jiaqing.zhao@linux.intel.com> wrote: > > According to Section 5.2.10 of ACPI Specification, FACS is optional > in reduced hardware model. Enable the detection for "Hardware-reduced > ACPI support only" build (CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y) also. > > Link: https://github.com/acpica/acpica/commit/ee53ed6b5452612bb44af542b68d605f8b2b1104 > Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> > --- > drivers/acpi/acpica/acglobal.h | 6 +----- > drivers/acpi/acpica/tbutils.c | 5 +---- > drivers/acpi/acpica/utxfinit.c | 24 ++++++++++++------------ > include/acpi/acconfig.h | 1 - > 4 files changed, 14 insertions(+), 22 deletions(-) > > diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h > index f4c90fc99be2..309ce8efb4f6 100644 > --- a/drivers/acpi/acpica/acglobal.h > +++ b/drivers/acpi/acpica/acglobal.h > @@ -29,11 +29,7 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_dsdt_index, ACPI_INVALID_TABLE_INDEX); > ACPI_INIT_GLOBAL(u32, acpi_gbl_facs_index, ACPI_INVALID_TABLE_INDEX); > ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX); > ACPI_INIT_GLOBAL(u32, acpi_gbl_fadt_index, ACPI_INVALID_TABLE_INDEX); > - > -#if (!ACPI_REDUCED_HARDWARE) > -ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS); > - > -#endif /* !ACPI_REDUCED_HARDWARE */ > +ACPI_INIT_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS, NULL); > > /* These addresses are calculated from the FADT Event Block addresses */ > > diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c > index 15fa68a5ea6e..356700349b45 100644 > --- a/drivers/acpi/acpica/tbutils.c > +++ b/drivers/acpi/acpica/tbutils.c > @@ -18,7 +18,6 @@ ACPI_MODULE_NAME("tbutils") > static acpi_physical_address > acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size); > > -#if (!ACPI_REDUCED_HARDWARE) > /******************************************************************************* > * > * FUNCTION: acpi_tb_initialize_facs > @@ -37,8 +36,7 @@ acpi_status acpi_tb_initialize_facs(void) > struct acpi_table_facs *facs; > > if (acpi_gbl_FADT.Xfacs && > - (!acpi_gbl_FADT.facs > - || !acpi_gbl_use32_bit_facs_addresses)) { > + (!acpi_gbl_FADT.facs || !acpi_gbl_use32_bit_facs_addresses)) { > (void)acpi_get_table_by_index(acpi_gbl_xfacs_index, > ACPI_CAST_INDIRECT_PTR(struct > acpi_table_header, I'm not sure how this change is related to the rest of the patch. It doesn't appear to be present in the original commit pointed to by the Link tag. > @@ -56,7 +54,6 @@ acpi_status acpi_tb_initialize_facs(void) > > return (AE_OK); > } > -#endif /* !ACPI_REDUCED_HARDWARE */ > > /******************************************************************************* > * > diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c > index 1915bec2b279..70ae0afa7939 100644 > --- a/drivers/acpi/acpica/utxfinit.c > +++ b/drivers/acpi/acpica/utxfinit.c > @@ -120,6 +120,18 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags) > */ > acpi_gbl_early_initialization = FALSE; > > + /* > + * Obtain a permanent mapping for the FACS. This is required for the > + * Global Lock and the Firmware Waking Vector > + */ > + if (!(flags & ACPI_NO_FACS_INIT)) { > + status = acpi_tb_initialize_facs(); > + if (ACPI_FAILURE(status)) { > + ACPI_WARNING((AE_INFO, "Could not map the FACS table")); > + return_ACPI_STATUS(status); > + } > + } > + > #if (!ACPI_REDUCED_HARDWARE) > > /* Enable ACPI mode */ > @@ -137,18 +149,6 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags) > } > } > > - /* > - * Obtain a permanent mapping for the FACS. This is required for the > - * Global Lock and the Firmware Waking Vector > - */ > - if (!(flags & ACPI_NO_FACS_INIT)) { > - status = acpi_tb_initialize_facs(); > - if (ACPI_FAILURE(status)) { > - ACPI_WARNING((AE_INFO, "Could not map the FACS table")); > - return_ACPI_STATUS(status); > - } > - } > - > /* > * Initialize ACPI Event handling (Fixed and General Purpose) > * > diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h > index d768d9c568cf..2da5f4a6e814 100644 > --- a/include/acpi/acconfig.h > +++ b/include/acpi/acconfig.h > @@ -67,7 +67,6 @@ > * General Purpose Events (GPEs) > * Global Lock > * ACPI PM timer > - * FACS table (Waking vectors and Global Lock) > */ > #ifndef ACPI_REDUCED_HARDWARE > #define ACPI_REDUCED_HARDWARE FALSE > -- > 2.43.0 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build 2024-08-20 14:55 ` Rafael J. Wysocki @ 2024-08-26 1:09 ` Jiaqing Zhao 2024-08-26 9:59 ` Rafael J. Wysocki 0 siblings, 1 reply; 6+ messages in thread From: Jiaqing Zhao @ 2024-08-26 1:09 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Robert Moore, Rafael J. Wysocki, Len Brown, linux-acpi, acpica-devel, linux-kernel On 2024-08-20 22:55, Rafael J. Wysocki wrote: > On Mon, Aug 12, 2024 at 7:47 AM Jiaqing Zhao > <jiaqing.zhao@linux.intel.com> wrote: >> >> According to Section 5.2.10 of ACPI Specification, FACS is optional >> in reduced hardware model. Enable the detection for "Hardware-reduced >> ACPI support only" build (CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y) also. >> >> Link: https://github.com/acpica/acpica/commit/ee53ed6b5452612bb44af542b68d605f8b2b1104 >> Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> >> --- >> drivers/acpi/acpica/acglobal.h | 6 +----- >> drivers/acpi/acpica/tbutils.c | 5 +---- >> drivers/acpi/acpica/utxfinit.c | 24 ++++++++++++------------ >> include/acpi/acconfig.h | 1 - >> 4 files changed, 14 insertions(+), 22 deletions(-) >> >> diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h >> index f4c90fc99be2..309ce8efb4f6 100644 >> --- a/drivers/acpi/acpica/acglobal.h >> +++ b/drivers/acpi/acpica/acglobal.h >> @@ -29,11 +29,7 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_dsdt_index, ACPI_INVALID_TABLE_INDEX); >> ACPI_INIT_GLOBAL(u32, acpi_gbl_facs_index, ACPI_INVALID_TABLE_INDEX); >> ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX); >> ACPI_INIT_GLOBAL(u32, acpi_gbl_fadt_index, ACPI_INVALID_TABLE_INDEX); >> - >> -#if (!ACPI_REDUCED_HARDWARE) >> -ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS); >> - >> -#endif /* !ACPI_REDUCED_HARDWARE */ >> +ACPI_INIT_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS, NULL); >> >> /* These addresses are calculated from the FADT Event Block addresses */ >> >> diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c >> index 15fa68a5ea6e..356700349b45 100644 >> --- a/drivers/acpi/acpica/tbutils.c >> +++ b/drivers/acpi/acpica/tbutils.c >> @@ -18,7 +18,6 @@ ACPI_MODULE_NAME("tbutils") >> static acpi_physical_address >> acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size); >> >> -#if (!ACPI_REDUCED_HARDWARE) >> /******************************************************************************* >> * >> * FUNCTION: acpi_tb_initialize_facs >> @@ -37,8 +36,7 @@ acpi_status acpi_tb_initialize_facs(void) >> struct acpi_table_facs *facs; >> >> if (acpi_gbl_FADT.Xfacs && >> - (!acpi_gbl_FADT.facs >> - || !acpi_gbl_use32_bit_facs_addresses)) { >> + (!acpi_gbl_FADT.facs || !acpi_gbl_use32_bit_facs_addresses)) { >> (void)acpi_get_table_by_index(acpi_gbl_xfacs_index, >> ACPI_CAST_INDIRECT_PTR(struct >> acpi_table_header, > > I'm not sure how this change is related to the rest of the patch. > > It doesn't appear to be present in the original commit pointed to by > the Link tag. This change here is just indention fix, in original acpica, the indention is just fine. Shall I remove this change? >> @@ -56,7 +54,6 @@ acpi_status acpi_tb_initialize_facs(void) >> >> return (AE_OK); >> } >> -#endif /* !ACPI_REDUCED_HARDWARE */ >> >> /******************************************************************************* >> * >> diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c >> index 1915bec2b279..70ae0afa7939 100644 >> --- a/drivers/acpi/acpica/utxfinit.c >> +++ b/drivers/acpi/acpica/utxfinit.c >> @@ -120,6 +120,18 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags) >> */ >> acpi_gbl_early_initialization = FALSE; >> >> + /* >> + * Obtain a permanent mapping for the FACS. This is required for the >> + * Global Lock and the Firmware Waking Vector >> + */ >> + if (!(flags & ACPI_NO_FACS_INIT)) { >> + status = acpi_tb_initialize_facs(); >> + if (ACPI_FAILURE(status)) { >> + ACPI_WARNING((AE_INFO, "Could not map the FACS table")); >> + return_ACPI_STATUS(status); >> + } >> + } >> + >> #if (!ACPI_REDUCED_HARDWARE) >> >> /* Enable ACPI mode */ >> @@ -137,18 +149,6 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags) >> } >> } >> >> - /* >> - * Obtain a permanent mapping for the FACS. This is required for the >> - * Global Lock and the Firmware Waking Vector >> - */ >> - if (!(flags & ACPI_NO_FACS_INIT)) { >> - status = acpi_tb_initialize_facs(); >> - if (ACPI_FAILURE(status)) { >> - ACPI_WARNING((AE_INFO, "Could not map the FACS table")); >> - return_ACPI_STATUS(status); >> - } >> - } >> - >> /* >> * Initialize ACPI Event handling (Fixed and General Purpose) >> * >> diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h >> index d768d9c568cf..2da5f4a6e814 100644 >> --- a/include/acpi/acconfig.h >> +++ b/include/acpi/acconfig.h >> @@ -67,7 +67,6 @@ >> * General Purpose Events (GPEs) >> * Global Lock >> * ACPI PM timer >> - * FACS table (Waking vectors and Global Lock) >> */ >> #ifndef ACPI_REDUCED_HARDWARE >> #define ACPI_REDUCED_HARDWARE FALSE >> -- >> 2.43.0 >> >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build 2024-08-26 1:09 ` Jiaqing Zhao @ 2024-08-26 9:59 ` Rafael J. Wysocki 0 siblings, 0 replies; 6+ messages in thread From: Rafael J. Wysocki @ 2024-08-26 9:59 UTC (permalink / raw) To: Jiaqing Zhao Cc: Rafael J. Wysocki, Robert Moore, Rafael J. Wysocki, Len Brown, linux-acpi, acpica-devel, linux-kernel On Mon, Aug 26, 2024 at 3:10 AM Jiaqing Zhao <jiaqing.zhao@linux.intel.com> wrote: > > On 2024-08-20 22:55, Rafael J. Wysocki wrote: > > On Mon, Aug 12, 2024 at 7:47 AM Jiaqing Zhao > > <jiaqing.zhao@linux.intel.com> wrote: > >> > >> According to Section 5.2.10 of ACPI Specification, FACS is optional > >> in reduced hardware model. Enable the detection for "Hardware-reduced > >> ACPI support only" build (CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y) also. > >> > >> Link: https://github.com/acpica/acpica/commit/ee53ed6b5452612bb44af542b68d605f8b2b1104 > >> Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> > >> --- > >> drivers/acpi/acpica/acglobal.h | 6 +----- > >> drivers/acpi/acpica/tbutils.c | 5 +---- > >> drivers/acpi/acpica/utxfinit.c | 24 ++++++++++++------------ > >> include/acpi/acconfig.h | 1 - > >> 4 files changed, 14 insertions(+), 22 deletions(-) > >> > >> diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h > >> index f4c90fc99be2..309ce8efb4f6 100644 > >> --- a/drivers/acpi/acpica/acglobal.h > >> +++ b/drivers/acpi/acpica/acglobal.h > >> @@ -29,11 +29,7 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_dsdt_index, ACPI_INVALID_TABLE_INDEX); > >> ACPI_INIT_GLOBAL(u32, acpi_gbl_facs_index, ACPI_INVALID_TABLE_INDEX); > >> ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX); > >> ACPI_INIT_GLOBAL(u32, acpi_gbl_fadt_index, ACPI_INVALID_TABLE_INDEX); > >> - > >> -#if (!ACPI_REDUCED_HARDWARE) > >> -ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS); > >> - > >> -#endif /* !ACPI_REDUCED_HARDWARE */ > >> +ACPI_INIT_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS, NULL); > >> > >> /* These addresses are calculated from the FADT Event Block addresses */ > >> > >> diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c > >> index 15fa68a5ea6e..356700349b45 100644 > >> --- a/drivers/acpi/acpica/tbutils.c > >> +++ b/drivers/acpi/acpica/tbutils.c > >> @@ -18,7 +18,6 @@ ACPI_MODULE_NAME("tbutils") > >> static acpi_physical_address > >> acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size); > >> > >> -#if (!ACPI_REDUCED_HARDWARE) > >> /******************************************************************************* > >> * > >> * FUNCTION: acpi_tb_initialize_facs > >> @@ -37,8 +36,7 @@ acpi_status acpi_tb_initialize_facs(void) > >> struct acpi_table_facs *facs; > >> > >> if (acpi_gbl_FADT.Xfacs && > >> - (!acpi_gbl_FADT.facs > >> - || !acpi_gbl_use32_bit_facs_addresses)) { > >> + (!acpi_gbl_FADT.facs || !acpi_gbl_use32_bit_facs_addresses)) { > >> (void)acpi_get_table_by_index(acpi_gbl_xfacs_index, > >> ACPI_CAST_INDIRECT_PTR(struct > >> acpi_table_header, > > > > I'm not sure how this change is related to the rest of the patch. > > > > It doesn't appear to be present in the original commit pointed to by > > the Link tag. > > This change here is just indention fix, in original acpica, the indention is just fine. > > Shall I remove this change? Yes, please. If you send a Linux counterpart of an ACPICA change, it should not contain any changes in addition to what was there in the original ACPICA commit. Thanks! ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] ACPICA: Allow setting waking vector on reduced hardware platforms 2024-08-12 5:46 [PATCH v2 0/2] S3 wakeup support for hardware reduced model Jiaqing Zhao 2024-08-12 5:46 ` [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build Jiaqing Zhao @ 2024-08-12 5:46 ` Jiaqing Zhao 1 sibling, 0 replies; 6+ messages in thread From: Jiaqing Zhao @ 2024-08-12 5:46 UTC (permalink / raw) To: Robert Moore, Rafael J. Wysocki, Len Brown, linux-acpi, acpica-devel Cc: linux-kernel, Jiaqing Zhao Allow setting waking vector in FACS table on reduced hardware platforms to support S3 wakeup. Link: https://github.com/acpica/acpica/commit/ee53ed6b5452612bb44af542b68d605f8b2b1104 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> --- drivers/acpi/acpica/hwxfsleep.c | 15 ++++++--------- include/acpi/acpixf.h | 8 ++++---- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index 36ea48f64110..8dbf83aeb455 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c @@ -16,20 +16,11 @@ ACPI_MODULE_NAME("hwxfsleep") /* Local prototypes */ -#if (!ACPI_REDUCED_HARDWARE) static acpi_status acpi_hw_set_firmware_waking_vector(struct acpi_table_facs *facs, acpi_physical_address physical_address, acpi_physical_address physical_address64); -#endif - -/* - * These functions are removed for the ACPI_REDUCED_HARDWARE case: - * acpi_set_firmware_waking_vector - * acpi_enter_sleep_state_s4bios - */ -#if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * * FUNCTION: acpi_hw_set_firmware_waking_vector @@ -115,6 +106,12 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address, ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) +/* + * These functions are removed for the ACPI_REDUCED_HARDWARE case: + * acpi_enter_sleep_state_s4bios + */ + +#if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * * FUNCTION: acpi_enter_sleep_state_s4bios diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 80dc36f9d527..99bb45a46600 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -881,10 +881,10 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state)) -ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status - acpi_set_firmware_waking_vector - (acpi_physical_address physical_address, - acpi_physical_address physical_address64)) +ACPI_EXTERNAL_RETURN_STATUS(acpi_status + acpi_set_firmware_waking_vector + (acpi_physical_address physical_address, + acpi_physical_address physical_address64)) /* * ACPI Timer interfaces */ -- 2.43.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-26 10:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-08-12 5:46 [PATCH v2 0/2] S3 wakeup support for hardware reduced model Jiaqing Zhao 2024-08-12 5:46 ` [PATCH v2 1/2] ACPICA: Detect FACS in reduced hardware build Jiaqing Zhao 2024-08-20 14:55 ` Rafael J. Wysocki 2024-08-26 1:09 ` Jiaqing Zhao 2024-08-26 9:59 ` Rafael J. Wysocki 2024-08-12 5:46 ` [PATCH v2 2/2] ACPICA: Allow setting waking vector on reduced hardware platforms Jiaqing Zhao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox