Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4790743ybg; Tue, 29 Oct 2019 12:26:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPTqPeMjSKkJ40mDMOTp7mrajZSXAQOZmPOBFYuXChIELMPvl7UbFZ5IzJ4TsSnnYZVUdF X-Received: by 2002:a17:906:7257:: with SMTP id n23mr5099128ejk.132.1572377161189; Tue, 29 Oct 2019 12:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572377161; cv=none; d=google.com; s=arc-20160816; b=BQ9v/KdACSwh90H/Se1ZN/LDJUGoCkwOlqn/q3l8d5OndcmTAuH+tYDeAwHyG2kpQm W24WXUqiTOy6eo4x/x0Z/7W1Oi7qcdYwndre21e2XWB0AZVOhaIxUyviNKvzL9Hsl2tH YwihoeCc6fXP2rn0l9gPOnkeIKmfb4W96cTEKRe41VaN3336jK2pSl6ahYTt8cBfYOK9 +20SyqLuaAcXrm+ZPb2IWeY7dl7AokkyDGQujpk8gGGv0eFRjeOiR3MBVuEoR2UDaGhz IHzizO8GiMQIR97WA9df8HoUjqw3E6CPLy11VpQKZedrlyFK7o9CiaMH+5kZUP6F1+1/ YvEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OMRxOWZpu1dr96++kRLkGqF4JG/vk7voGkpNSd1iKXw=; b=GCu80/SFcJfGH7bMBHgYlYG/ppfxTCAWFc0HC1IAvYcvoYyL2pcZxAwsexiJJJXbeH bQ9h48djNRQs0cD9NAcFTF2cBn368m/vUjpEujCiYBOGPCriQAyxSh6Fk+5BGuXzk2Ru XvZfToPLYysgd0iJSv8WYkhyvWRWGdRtocLtlprw8iy/33HAvPS/37x7nKRqzm3kt28y 6+gPb2v/u0ylzR1dYJlN+v9qwgRg/elEdUf54KtSourvNNC5u8E46aNKQzMn4bU7aspD JqWsDERNcgnu68HJUm+8Mt0pRDGe5duW4z6yr+SdckrtLWHBr/9Ic1SapM4MnADCyK3e Dipg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ozcm2IWk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g23si8686687ejk.186.2019.10.29.12.25.37; Tue, 29 Oct 2019 12:26:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ozcm2IWk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387719AbfJ2Mn2 (ORCPT + 99 others); Tue, 29 Oct 2019 08:43:28 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:46041 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727675AbfJ2Mn1 (ORCPT ); Tue, 29 Oct 2019 08:43:27 -0400 Received: by mail-qt1-f195.google.com with SMTP id x21so2710141qto.12 for ; Tue, 29 Oct 2019 05:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OMRxOWZpu1dr96++kRLkGqF4JG/vk7voGkpNSd1iKXw=; b=ozcm2IWkf2kNtuYCUjt+8ArvFK/2tKRtrBxPUJbunA7rPNlc0HxCY71sOWY0wV6yle VMaj+9CPSz7Yh+ObskBaZxF9CqEBImBFo4eqIbA/24KRyE8rBYcXoqKjRR4hwZ0qfPJO F0EaQVN+YNPh/tNG58mPvXtcqsJZiw7ZiYHf1FBOuACg8X8xJeJDCtMf8QuKRHKPg2c0 uNVeP+ABNB3gsrrfXF8eQ2co4oiynkaswFhPcMWQMivdB92SNJhepyCg18vMBP7iW/DD 8UYO8Qt3O9X5/xm/wHCkzkG+AmSkAdPwsvYNzEjD3JbgHgEwtq8TUO94E8rJy5ospivy pi+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=OMRxOWZpu1dr96++kRLkGqF4JG/vk7voGkpNSd1iKXw=; b=SlotPGe65bXKmJzGRbe4stc+sgSEC2EXtnRBuYLVmu5zFH1sSx4f9WfamET/5ZBVnt kxvn7EKkJYwrKY+CJnrPMKUjAF1/lIIZ8X0+SBnb0Aw/fja1bT7g4iYBOX5sPYSQasz/ 9L6QZupmJ75XZAUw9Zhuq+NZMYVxL1nZ9urtPlUMTdaTlSzgQ06zGO9cYinl5zC42GDG dZdBq/Gk86vQrPX5xgvsqkRTQDA+P5YYVU0d5Xce1+b1e+eEgEF6FU25evm99tydtjHA wbdyoSLa9gjbbsmN62O9e0vYT+hBiRzHlnq8WZVOOPqcUMBISOu9wRJsTvS4K149L53W 02cQ== X-Gm-Message-State: APjAAAUE2QWHa2HDs1+bvFeLjjqb8fvC69quhERnSXCbax22DfiulGVh uGIO8THgw0Kl0SkMU1C9FSFSRNjzc5BRWj6xibFh0A== X-Received: by 2002:ac8:cc3:: with SMTP id o3mr4052238qti.239.1572353005620; Tue, 29 Oct 2019 05:43:25 -0700 (PDT) MIME-Version: 1.0 References: <20191015084139.8510-1-benjamin.gaignard@st.com> In-Reply-To: <20191015084139.8510-1-benjamin.gaignard@st.com> From: Benjamin Gaignard Date: Tue, 29 Oct 2019 13:43:14 +0100 Message-ID: Subject: Re: [PATCH] arm: kernel: initialize broadcast hrtimer based clock event device To: Benjamin Gaignard Cc: Russell King - ARM Linux , Thomas Gleixner , Greg Kroah-Hartman , Linux Kernel Mailing List , Linux ARM , linux-stm32@st-md-mailman.stormreply.com, maz@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mar. 15 oct. 2019 =C3=A0 10:42, Benjamin Gaignard a =C3=A9crit : > > On platforms implementing CPU power management, the CPUidle subsystem > can allow CPUs to enter idle states where local timers logic is lost on p= ower > down. To keep the software timers functional the kernel relies on an > always-on broadcast timer to be present in the platform to relay the > interrupt signalling the timer expiries. > > For platforms implementing CPU core gating that do not implement an alway= s-on > HW timer or implement it in a broken way, this patch adds code to initial= ize > the kernel hrtimer based clock event device upon boot (which can be chose= n as > tick broadcast device by the kernel). > It relies on a dynamically chosen CPU to be always powered-up. This CPU t= hen > relays the timer interrupt to CPUs in deep-idle states through its HW loc= al > timer device. > > Having a CPU always-on has implications on power management platform > capabilities and makes CPUidle suboptimal, since at least a CPU is kept > always in a shallow idle state by the kernel to relay timer interrupts, > but at least leaves the kernel with a functional system with some working > power management capabilities. > > The hrtimer based clock event device is unconditionally registered, but > has the lowest possible rating such that any broadcast-capable HW clock > event device present will be chosen in preference as the tick broadcast > device. Gentle ping, Thanks, Benjamin > > Signed-off-by: Benjamin Gaignard > --- > Note: > - The same reasons lead to same patch than for arm64 so I have copy the > commit message from: 9358d755bd5c ("arm64: kernel: initialize broadcast > hrtimer based clock event device") > arch/arm/kernel/time.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c > index b996b2cf0703..dddc7ebf4db4 100644 > --- a/arch/arm/kernel/time.c > +++ b/arch/arm/kernel/time.c > @@ -9,6 +9,7 @@ > * reading the RTC at bootup, etc... > */ > #include > +#include > #include > #include > #include > @@ -107,5 +108,6 @@ void __init time_init(void) > of_clk_init(NULL); > #endif > timer_probe(); > + tick_setup_hrtimer_broadcast(); > } > } > -- > 2.15.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel