From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Peter Zijlstra <peterz@infradead.org>,
bp@alien8.de, x86@kernel.org, tony.luck@intel.com,
lenb@kernel.org, daniel.lezcano@linaro.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-pm@vger.kernel.org, ulf.hansson@linaro.org,
paulmck@kernel.org, tglx@linutronix.de,
naresh.kamboju@linaro.org
Subject: Re: [RFC][PATCH 1/4] acpi: Use CPUIDLE_FLAG_TIMER_STOP
Date: Tue, 22 Sep 2020 21:03:15 +0200 [thread overview]
Message-ID: <5947336.4NNQoPcqAU@kreacher> (raw)
In-Reply-To: <20200922032651.GA222679@roeck-us.net>
On Tuesday, September 22, 2020 5:26:51 AM CEST Guenter Roeck wrote:
> On Tue, Sep 15, 2020 at 12:31:58PM +0200, Peter Zijlstra wrote:
> > Make acpi_processor_idle use the common broadcast code, there's no
> > reason not to. This also removes some RCU usage after
> > rcu_idle_enter().
> >
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Reported-by: Borislav Petkov <bp@suse.de>
> > Tested-by: Borislav Petkov <bp@suse.de>
> > ---
> > drivers/acpi/processor_idle.c | 49 +++++++++++++-----------------------------
> > 1 file changed, 16 insertions(+), 33 deletions(-)
> >
> > --- a/drivers/acpi/processor_idle.c
> > +++ b/drivers/acpi/processor_idle.c
> > @@ -161,18 +161,10 @@ static void lapic_timer_propagate_broadc
> > }
> >
> > /* Power(C) State timer broadcast control */
> > -static void lapic_timer_state_broadcast(struct acpi_processor *pr,
> > - struct acpi_processor_cx *cx,
> > - int broadcast)
> > -{
> > - int state = cx - pr->power.states;
> > -
> > - if (state >= pr->power.timer_broadcast_on_state) {
> > - if (broadcast)
> > - tick_broadcast_enter();
> > - else
> > - tick_broadcast_exit();
> > - }
> > +static bool lapic_timer_needs_broadcast(struct acpi_processor *pr,
> > + struct acpi_processor_cx *cx)
> > +{
> > + return cx - pr->power.states >= pr->power.timer_broadcast_on_state;
> > }
> >
> > #else
> > @@ -180,9 +172,9 @@ static void lapic_timer_state_broadcast(
> > static void lapic_timer_check_state(int state, struct acpi_processor *pr,
> > struct acpi_processor_cx *cstate) { }
> > static void lapic_timer_propagate_broadcast(struct acpi_processor *pr) { }
> > -static void lapic_timer_state_broadcast(struct acpi_processor *pr,
> > - struct acpi_processor_cx *cx,
> > - int broadcast)
> > +
> > +static bool lapic_timer_needs_broadcast(struct acpi_processor *pr,
> > + struct acpi_processor_cx *cx)
> > {
> > }
>
> drivers/acpi/processor_idle.c: In function 'lapic_timer_needs_broadcast':
> drivers/acpi/processor_idle.c:179:1: warning: no return statement in function returning non-void [-Wreturn-type]
>
> Should this return true or false ?
false - if the lapic timer doesn't stop, it doesn't need broadcast.
FWIW, patch appended.
Cheers!
---
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Subject: [PATCH] ACPI: processor: Fix build for ARCH_APICTIMER_STOPS_ON_C3 unset
Fix the lapic_timer_needs_broadcast() stub for
ARCH_APICTIMER_STOPS_ON_C3 unset to actually return
a value.
Fixes: aa6b43d57f99 ("ACPI: processor: Use CPUIDLE_FLAG_TIMER_STOP")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/processor_idle.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-pm/drivers/acpi/processor_idle.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_idle.c
+++ linux-pm/drivers/acpi/processor_idle.c
@@ -176,6 +176,7 @@ static void lapic_timer_propagate_broadc
static bool lapic_timer_needs_broadcast(struct acpi_processor *pr,
struct acpi_processor_cx *cx)
{
+ return false;
}
#endif
next prev parent reply other threads:[~2020-09-22 19:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 10:31 [RFC][PATCH 0/4] Fix up ACPI processor idle vs RCU Peter Zijlstra
2020-09-15 10:31 ` [RFC][PATCH 1/4] acpi: Use CPUIDLE_FLAG_TIMER_STOP Peter Zijlstra
2020-09-15 16:26 ` Rafael J. Wysocki
2020-09-16 15:42 ` peterz
2020-09-16 16:01 ` Borislav Petkov
2020-09-16 17:38 ` Rafael J. Wysocki
2020-09-16 17:38 ` Rafael J. Wysocki
2020-09-22 3:26 ` Guenter Roeck
2020-09-22 19:03 ` Rafael J. Wysocki [this message]
2020-09-15 10:31 ` [RFC][PATCH 2/4] acpi: Use CPUIDLE_FLAG_TLB_FLUSHED Peter Zijlstra
2020-09-15 10:32 ` [RFC][PATCH 3/4] cpuidle: Allow cpuidle drivers to take over RCU-idle Peter Zijlstra
2020-09-15 13:20 ` Ulf Hansson
2020-09-15 10:32 ` [RFC][PATCH 4/4] acpi: Take over RCU-idle for C3-BM idle Peter Zijlstra
2020-09-21 9:12 ` Sven Joachim
2020-09-21 10:37 ` [PATCH] rcu/tree: Export rcu_idle_{enter,exit} to module Borislav Petkov
2020-09-21 12:15 ` Rafael J. Wysocki
2020-09-21 13:32 ` Paul E. McKenney
2020-09-21 13:38 ` Rafael J. Wysocki
2020-09-25 15:20 ` [RFC][PATCH 4/4] acpi: Take over RCU-idle for C3-BM idle Guenter Roeck
2020-09-25 15:24 ` Rafael J. Wysocki
2020-09-25 15:29 ` Paul E. McKenney
2020-09-15 18:31 ` [RFC][PATCH 0/4] Fix up ACPI processor idle vs RCU Borislav Petkov
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=5947336.4NNQoPcqAU@kreacher \
--to=rjw@rjwysocki.net \
--cc=bp@alien8.de \
--cc=daniel.lezcano@linaro.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=naresh.kamboju@linaro.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=ulf.hansson@linaro.org \
--cc=x86@kernel.org \
/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).