Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4176134pxk; Tue, 22 Sep 2020 12:14:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0UATreJT7zbl+J4fgA6Ajzx10HDRWIDN1QxZzXeev/YaKk8xYHGjnI0MEhdydZ4FC/8Ce X-Received: by 2002:a17:906:8401:: with SMTP id n1mr6407072ejx.215.1600802054723; Tue, 22 Sep 2020 12:14:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600802054; cv=none; d=google.com; s=arc-20160816; b=yA2TnTtah2U6tLn9FJFfV6qX2Pnt8226rGW2JHdZyY6xv1BPCFkZttfbuTcKyyaS4/ opy79mI1LQHeWSfOIpYVEuFyiEt+UndaR9B9apiij5EZH8ISMW8J68ggWh4PI2X6OYLA qd2fmf6rJXkMBkH7gyJb2uzwMz6yM1M4aRxAa220nevpbKzYPd4xINgLDZx7jRngYiFQ YJO5tLt7qx2N7VvFFT4KNn9LxX8HctwSV8rdqCSEL7UL31fajb6N0YpvXyyXLSr5+o+b HBoA9tEben7JbDnbppHcw/oMkkfhOKVe5SQuWm2hFPybfqPycKOTOyjdZ7YRuLZmmiic nXTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=igu9UmTwyoOQ6OB9YU0MyfTXS4AtDkbU8vsPf4XCjEo=; b=JE3Wys2O6WE28PI2K+gxjmKD9upK21seJLTDMyGwC7I6riAwYwAMPWnXHKYr6JsSYN e4yxzSJJ/fjC46JMapFxbIE22H21bJ1MD2+4vRtclgojf+r/hG2LpJAp6TtJty7gSBxg 7HygcgMrrlfaYWmE+TPvaCNnmeGv+V/v9ISEPpKN7aJceRboYLVqFjtnHDQgCtLPg+Ty 3cNrDrextYVE+h06HBGMsUgzranO9WV1yIVByeJ6QCmKlfyc8BJpFUOZjmFX2eFHM4b2 L+5uUra1xP7EJlfy+bbKwqxbIsBjvlsZ3jsfzPkJLLbymEgEZsrDeVnL/LiOjObLjBc2 rlfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t25si10790997ejs.675.2020.09.22.12.13.50; Tue, 22 Sep 2020 12:14:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbgIVTKA (ORCPT + 99 others); Tue, 22 Sep 2020 15:10:00 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:54314 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbgIVTKA (ORCPT ); Tue, 22 Sep 2020 15:10:00 -0400 X-Greylist: delayed 401 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Sep 2020 15:09:58 EDT Received: from 89-64-89-53.dynamic.chello.pl (89.64.89.53) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.468) id 1a302cbbceee2e3b; Tue, 22 Sep 2020 21:03:16 +0200 From: "Rafael J. Wysocki" To: Guenter Roeck Cc: Peter Zijlstra , 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 Message-ID: <5947336.4NNQoPcqAU@kreacher> In-Reply-To: <20200922032651.GA222679@roeck-us.net> References: <20200915103157.345404192@infradead.org> <20200915103806.280265587@infradead.org> <20200922032651.GA222679@roeck-us.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > > Acked-by: Rafael J. Wysocki > > Reported-by: Borislav Petkov > > Tested-by: Borislav Petkov > > --- > > 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 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 Signed-off-by: Rafael J. Wysocki --- 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