* [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM
@ 2021-07-02 7:03 Aubrey Li
2021-07-02 7:03 ` [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled Aubrey Li
2021-07-02 14:00 ` [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM Rafael J. Wysocki
0 siblings, 2 replies; 8+ messages in thread
From: Aubrey Li @ 2021-07-02 7:03 UTC (permalink / raw)
To: rjw, lenb; +Cc: linux-acpi, linux-kernel, Aubrey Li, Dan Williams, Aubrey Li
Accord to Platform Runtime Mechanism Specification v1.0 [1],
Page 42, _OSC bit (BIT 21) is used to indicate OS support of
platform runtime mechanism..
[1]: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
---
include/linux/acpi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index b338613..4df6a81 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -551,8 +551,8 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
#define OSC_SB_OSLPI_SUPPORT 0x00000100
#define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT 0x00001000
#define OSC_SB_GENERIC_INITIATOR_SUPPORT 0x00002000
-#define OSC_SB_PRM_SUPPORT 0x00020000
#define OSC_SB_NATIVE_USB4_SUPPORT 0x00040000
+#define OSC_SB_PRM_SUPPORT 0x00200000
extern bool osc_sb_apei_support_acked;
extern bool osc_pc_lpi_support_confirmed;
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled
2021-07-02 7:03 [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM Aubrey Li
@ 2021-07-02 7:03 ` Aubrey Li
2021-07-02 11:37 ` Rafael J. Wysocki
2021-07-02 14:00 ` [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM Rafael J. Wysocki
1 sibling, 1 reply; 8+ messages in thread
From: Aubrey Li @ 2021-07-02 7:03 UTC (permalink / raw)
To: rjw, lenb; +Cc: linux-acpi, linux-kernel, Aubrey Li, Dan Williams, Aubrey Li
Based on _OSC PRM bit, BIOS can choose switch from legacy handling
to using PRM. So if CONFIG_ACPI_PRMT is disabled, this bit should
not be set to let BIOS fall back to the legacy handling (such as SMI).
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
---
drivers/acpi/bus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 60fb6a84..30a3d4a 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -303,7 +303,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
+#ifdef CONFIG_ACPI_PRMT
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
+#endif
#ifdef CONFIG_ARM64
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT;
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled
2021-07-02 7:03 ` [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled Aubrey Li
@ 2021-07-02 11:37 ` Rafael J. Wysocki
2021-07-02 14:02 ` Rafael J. Wysocki
2021-07-02 14:02 ` Aubrey Li
0 siblings, 2 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2021-07-02 11:37 UTC (permalink / raw)
To: Aubrey Li
Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List, Dan Williams, Aubrey Li
On Fri, Jul 2, 2021 at 9:03 AM Aubrey Li <aubrey.li@intel.com> wrote:
>
> Based on _OSC PRM bit, BIOS can choose switch from legacy handling
> to using PRM. So if CONFIG_ACPI_PRMT is disabled, this bit should
> not be set to let BIOS fall back to the legacy handling (such as SMI).
>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
> ---
> drivers/acpi/bus.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> index 60fb6a84..30a3d4a 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -303,7 +303,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
>
> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
> +#ifdef CONFIG_ACPI_PRMT
> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
> +#endif
What about using if (IS_ENABLED()) instead of #ifdef?
>
> #ifdef CONFIG_ARM64
> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT;
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM
2021-07-02 7:03 [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM Aubrey Li
2021-07-02 7:03 ` [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled Aubrey Li
@ 2021-07-02 14:00 ` Rafael J. Wysocki
1 sibling, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2021-07-02 14:00 UTC (permalink / raw)
To: Aubrey Li
Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List, Dan Williams, Aubrey Li
On Fri, Jul 2, 2021 at 9:03 AM Aubrey Li <aubrey.li@intel.com> wrote:
>
> Accord to Platform Runtime Mechanism Specification v1.0 [1],
> Page 42, _OSC bit (BIT 21) is used to indicate OS support of
> platform runtime mechanism..
>
> [1]: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf
>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
> ---
> include/linux/acpi.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index b338613..4df6a81 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -551,8 +551,8 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
> #define OSC_SB_OSLPI_SUPPORT 0x00000100
> #define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT 0x00001000
> #define OSC_SB_GENERIC_INITIATOR_SUPPORT 0x00002000
> -#define OSC_SB_PRM_SUPPORT 0x00020000
> #define OSC_SB_NATIVE_USB4_SUPPORT 0x00040000
> +#define OSC_SB_PRM_SUPPORT 0x00200000
>
> extern bool osc_sb_apei_support_acked;
> extern bool osc_pc_lpi_support_confirmed;
> --
Applied as 5.14-rc1 material, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled
2021-07-02 11:37 ` Rafael J. Wysocki
@ 2021-07-02 14:02 ` Rafael J. Wysocki
2021-07-02 14:02 ` Aubrey Li
1 sibling, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2021-07-02 14:02 UTC (permalink / raw)
To: Aubrey Li
Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List, Dan Williams, Aubrey Li
On Fri, Jul 2, 2021 at 1:37 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Fri, Jul 2, 2021 at 9:03 AM Aubrey Li <aubrey.li@intel.com> wrote:
> >
> > Based on _OSC PRM bit, BIOS can choose switch from legacy handling
> > to using PRM. So if CONFIG_ACPI_PRMT is disabled, this bit should
> > not be set to let BIOS fall back to the legacy handling (such as SMI).
> >
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
> > ---
> > drivers/acpi/bus.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> > index 60fb6a84..30a3d4a 100644
> > --- a/drivers/acpi/bus.c
> > +++ b/drivers/acpi/bus.c
> > @@ -303,7 +303,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
> >
> > capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
> > capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
> > +#ifdef CONFIG_ACPI_PRMT
> > capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
> > +#endif
>
> What about using if (IS_ENABLED()) instead of #ifdef?
I've made this change myself and applied the patch with a rewritten
changelog and under a different subject ("ACPI: Do not singal PRM
support if not enabled").
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled
2021-07-02 11:37 ` Rafael J. Wysocki
2021-07-02 14:02 ` Rafael J. Wysocki
@ 2021-07-02 14:02 ` Aubrey Li
2021-07-02 14:02 ` Rafael J. Wysocki
1 sibling, 1 reply; 8+ messages in thread
From: Aubrey Li @ 2021-07-02 14:02 UTC (permalink / raw)
To: Rafael J. Wysocki, Aubrey Li
Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List, Dan Williams
On 7/2/21 7:37 PM, Rafael J. Wysocki wrote:
> On Fri, Jul 2, 2021 at 9:03 AM Aubrey Li <aubrey.li@intel.com> wrote:
>>
>> Based on _OSC PRM bit, BIOS can choose switch from legacy handling
>> to using PRM. So if CONFIG_ACPI_PRMT is disabled, this bit should
>> not be set to let BIOS fall back to the legacy handling (such as SMI).
>>
>> Cc: Dan Williams <dan.j.williams@intel.com>
>> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
>> ---
>> drivers/acpi/bus.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
>> index 60fb6a84..30a3d4a 100644
>> --- a/drivers/acpi/bus.c
>> +++ b/drivers/acpi/bus.c
>> @@ -303,7 +303,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
>>
>> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
>> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
>> +#ifdef CONFIG_ACPI_PRMT
>> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
>> +#endif
>
> What about using if (IS_ENABLED()) instead of #ifdef?
aha, sorry, using if (IS_ENABLED()) is better, will come up with a new version soon.
Thanks,
-Aubrey
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled
2021-07-02 14:02 ` Aubrey Li
@ 2021-07-02 14:02 ` Rafael J. Wysocki
2021-07-02 14:06 ` Aubrey Li
0 siblings, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2021-07-02 14:02 UTC (permalink / raw)
To: Aubrey Li
Cc: Rafael J. Wysocki, Aubrey Li, Rafael J. Wysocki, Len Brown,
ACPI Devel Maling List, Linux Kernel Mailing List, Dan Williams
On Fri, Jul 2, 2021 at 4:02 PM Aubrey Li <aubrey.li@linux.intel.com> wrote:
>
> On 7/2/21 7:37 PM, Rafael J. Wysocki wrote:
> > On Fri, Jul 2, 2021 at 9:03 AM Aubrey Li <aubrey.li@intel.com> wrote:
> >>
> >> Based on _OSC PRM bit, BIOS can choose switch from legacy handling
> >> to using PRM. So if CONFIG_ACPI_PRMT is disabled, this bit should
> >> not be set to let BIOS fall back to the legacy handling (such as SMI).
> >>
> >> Cc: Dan Williams <dan.j.williams@intel.com>
> >> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
> >> ---
> >> drivers/acpi/bus.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> >> index 60fb6a84..30a3d4a 100644
> >> --- a/drivers/acpi/bus.c
> >> +++ b/drivers/acpi/bus.c
> >> @@ -303,7 +303,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
> >>
> >> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
> >> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
> >> +#ifdef CONFIG_ACPI_PRMT
> >> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
> >> +#endif
> >
> > What about using if (IS_ENABLED()) instead of #ifdef?
>
> aha, sorry, using if (IS_ENABLED()) is better, will come up with a new version soon.
No need (see my other reply).
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled
2021-07-02 14:02 ` Rafael J. Wysocki
@ 2021-07-02 14:06 ` Aubrey Li
0 siblings, 0 replies; 8+ messages in thread
From: Aubrey Li @ 2021-07-02 14:06 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Aubrey Li, Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List, Dan Williams
On 7/2/21 10:02 PM, Rafael J. Wysocki wrote:
> On Fri, Jul 2, 2021 at 4:02 PM Aubrey Li <aubrey.li@linux.intel.com> wrote:
>>
>> On 7/2/21 7:37 PM, Rafael J. Wysocki wrote:
>>> On Fri, Jul 2, 2021 at 9:03 AM Aubrey Li <aubrey.li@intel.com> wrote:
>>>>
>>>> Based on _OSC PRM bit, BIOS can choose switch from legacy handling
>>>> to using PRM. So if CONFIG_ACPI_PRMT is disabled, this bit should
>>>> not be set to let BIOS fall back to the legacy handling (such as SMI).
>>>>
>>>> Cc: Dan Williams <dan.j.williams@intel.com>
>>>> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
>>>> ---
>>>> drivers/acpi/bus.c | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
>>>> index 60fb6a84..30a3d4a 100644
>>>> --- a/drivers/acpi/bus.c
>>>> +++ b/drivers/acpi/bus.c
>>>> @@ -303,7 +303,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
>>>>
>>>> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
>>>> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
>>>> +#ifdef CONFIG_ACPI_PRMT
>>>> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
>>>> +#endif
>>>
>>> What about using if (IS_ENABLED()) instead of #ifdef?
>>
>> aha, sorry, using if (IS_ENABLED()) is better, will come up with a new version soon.
>
> No need (see my other reply).
>
> Thanks!
>
Okay, thanks Rafael!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-07-02 14:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 7:03 [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM Aubrey Li
2021-07-02 7:03 ` [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled Aubrey Li
2021-07-02 11:37 ` Rafael J. Wysocki
2021-07-02 14:02 ` Rafael J. Wysocki
2021-07-02 14:02 ` Aubrey Li
2021-07-02 14:02 ` Rafael J. Wysocki
2021-07-02 14:06 ` Aubrey Li
2021-07-02 14:00 ` [PATCH 1/2] ACPI: Correct \_SB._OSC bit definition for PRM Rafael J. Wysocki
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).