2023-09-27 20:11:53

by Sunil V L

[permalink] [raw]
Subject: [PATCH v2 -next 4/4] clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu

The timer capability to wakeup the cpu irrespective of its idle state is
provided by the flag in RHCT. Update the timer code to set this flag.

Signed-off-by: Sunil V L <[email protected]>
---
drivers/clocksource/timer-riscv.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
index 9c8f3e2decc2..06f5bad3c3e0 100644
--- a/drivers/clocksource/timer-riscv.c
+++ b/drivers/clocksource/timer-riscv.c
@@ -225,6 +225,10 @@ TIMER_OF_DECLARE(riscv_timer, "riscv", riscv_timer_init_dt);
#ifdef CONFIG_ACPI
static int __init riscv_timer_acpi_init(struct acpi_table_header *table)
{
+ struct acpi_table_rhct *rhct = (struct acpi_table_rhct *)table;
+
+ riscv_timer_cannot_wake_cpu = rhct->flags & ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU;
+
return riscv_timer_init_common();
}

--
2.39.2


2023-09-27 22:16:59

by Samuel Holland

[permalink] [raw]
Subject: Re: [PATCH v2 -next 4/4] clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu

On 2023-09-27 12:00 PM, Sunil V L wrote:
> The timer capability to wakeup the cpu irrespective of its idle state is
> provided by the flag in RHCT. Update the timer code to set this flag.
>
> Signed-off-by: Sunil V L <[email protected]>
> ---
> drivers/clocksource/timer-riscv.c | 4 ++++
> 1 file changed, 4 insertions(+)

Reviewed-by: Samuel Holland <[email protected]>

2023-10-02 16:26:01

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 -next 4/4] clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu

On Wed, Sep 27, 2023 at 10:30:15PM +0530, Sunil V L wrote:
> The timer capability to wakeup the cpu irrespective of its idle state is
> provided by the flag in RHCT. Update the timer code to set this flag.
>
> Signed-off-by: Sunil V L <[email protected]>

Reviewed-by: Conor Dooley <[email protected]>

Thanks,
Conor.

> ---
> drivers/clocksource/timer-riscv.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
> index 9c8f3e2decc2..06f5bad3c3e0 100644
> --- a/drivers/clocksource/timer-riscv.c
> +++ b/drivers/clocksource/timer-riscv.c
> @@ -225,6 +225,10 @@ TIMER_OF_DECLARE(riscv_timer, "riscv", riscv_timer_init_dt);
> #ifdef CONFIG_ACPI
> static int __init riscv_timer_acpi_init(struct acpi_table_header *table)
> {
> + struct acpi_table_rhct *rhct = (struct acpi_table_rhct *)table;
> +
> + riscv_timer_cannot_wake_cpu = rhct->flags & ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU;
> +
> return riscv_timer_init_common();
> }
>
> --
> 2.39.2
>
>
> _______________________________________________
> linux-riscv mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-riscv


Attachments:
(No filename) (1.23 kB)
signature.asc (235.00 B)
Download all attachments

2023-10-04 08:38:49

by Andrew Jones

[permalink] [raw]
Subject: Re: [PATCH v2 -next 4/4] clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu

On Wed, Sep 27, 2023 at 10:30:15PM +0530, Sunil V L wrote:
> The timer capability to wakeup the cpu irrespective of its idle state is
> provided by the flag in RHCT. Update the timer code to set this flag.
>
> Signed-off-by: Sunil V L <[email protected]>
> ---
> drivers/clocksource/timer-riscv.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
> index 9c8f3e2decc2..06f5bad3c3e0 100644
> --- a/drivers/clocksource/timer-riscv.c
> +++ b/drivers/clocksource/timer-riscv.c
> @@ -225,6 +225,10 @@ TIMER_OF_DECLARE(riscv_timer, "riscv", riscv_timer_init_dt);
> #ifdef CONFIG_ACPI
> static int __init riscv_timer_acpi_init(struct acpi_table_header *table)
> {
> + struct acpi_table_rhct *rhct = (struct acpi_table_rhct *)table;
> +
> + riscv_timer_cannot_wake_cpu = rhct->flags & ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU;
> +
> return riscv_timer_init_common();
> }
>
> --
> 2.39.2
>

Reviewed-by: Andrew Jones <[email protected]>

2023-10-11 09:16:03

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH v2 -next 4/4] clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu

On 27/09/2023 19:00, Sunil V L wrote:
> The timer capability to wakeup the cpu irrespective of its idle state is
> provided by the flag in RHCT. Update the timer code to set this flag.
>
> Signed-off-by: Sunil V L <[email protected]>
> ---

Applied, thanks

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Subject: [tip: timers/core] clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu

The following commit has been merged into the timers/core branch of tip:

Commit-ID: d7f546c751e8c873302331af6a203ee61f894e9d
Gitweb: https://git.kernel.org/tip/d7f546c751e8c873302331af6a203ee61f894e9d
Author: Sunil V L <[email protected]>
AuthorDate: Wed, 27 Sep 2023 22:30:15 +05:30
Committer: Daniel Lezcano <[email protected]>
CommitterDate: Wed, 11 Oct 2023 12:06:41 +02:00

clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu

The timer capability to wakeup the cpu irrespective of its idle state is
provided by the flag in RHCT. Update the timer code to set this flag.

Signed-off-by: Sunil V L <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Reviewed-by: Samuel Holland <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
drivers/clocksource/timer-riscv.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
index da3071b..5019865 100644
--- a/drivers/clocksource/timer-riscv.c
+++ b/drivers/clocksource/timer-riscv.c
@@ -212,6 +212,10 @@ TIMER_OF_DECLARE(riscv_timer, "riscv", riscv_timer_init_dt);
#ifdef CONFIG_ACPI
static int __init riscv_timer_acpi_init(struct acpi_table_header *table)
{
+ struct acpi_table_rhct *rhct = (struct acpi_table_rhct *)table;
+
+ riscv_timer_cannot_wake_cpu = rhct->flags & ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU;
+
return riscv_timer_init_common();
}