From patchwork Wed Feb 11 18:45:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 5814171 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 21251BF440 for ; Wed, 11 Feb 2015 18:45:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9E1D20256 for ; Wed, 11 Feb 2015 18:45:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D497F20221 for ; Wed, 11 Feb 2015 18:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753936AbbBKSpT (ORCPT ); Wed, 11 Feb 2015 13:45:19 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:32869 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753283AbbBKSpR (ORCPT ); Wed, 11 Feb 2015 13:45:17 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id C1541141287; Wed, 11 Feb 2015 18:45:16 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 91F8214128B; Wed, 11 Feb 2015 18:45:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 423C7141287; Wed, 11 Feb 2015 18:45:16 +0000 (UTC) Date: Wed, 11 Feb 2015 10:45:15 -0800 From: Stephen Boyd To: Mason Cc: Linux ARM , cpufreq , Linux PM , Mark Rutland , Thomas Gleixner , Peter Zijlstra , John Stultz , Stefan Agner , Shawn Guo , Rob Herring , Linus Walleij Subject: Re: Delays, clocks, timers, hrtimers, etc Message-ID: <20150211184515.GB11190@codeaurora.org> References: <54C8E125.3070905@free.fr> <54D52F84.9050600@free.fr> <266c7b1ff2d1a8ba0ae4866f4fb4eca5@agner.ch> <54D576B1.4000001@free.fr> <54D903F6.3050608@codeaurora.org> <54D93556.9050008@free.fr> <54D93FFA.3090506@codeaurora.org> <54D947B4.4080401@free.fr> <54DB94B0.8020000@free.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54DB94B0.8020000@free.fr> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 02/11, Mason wrote: > Mason wrote: > > > Also, you wrote "I don't see any problem with the TWD dropping the > dependency on SMP." Would something as simple as this be acceptable? > (Most probably NOT; there are a lot of smp* occurrences in smp_twd.c > even the file name.) What is the rationale for the dependency? > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index a34698d..47b02c8 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1565,7 +1565,6 @@ config HAVE_ARM_ARCH_TIMER > config HAVE_ARM_TWD > bool > - depends on SMP > select CLKSRC_OF if OF > help > This options enables support for the ARM timer and watchdog unit > Hmm it looks like we would also need to add this to the patch. It looks like a holdover from when the local timer APIs were around. Back then twd_local_timer_common_register() would fail if is_smp() was false or setup_max_cpus was 0. Now it will just register a clockevent that may or may not be used depending on what other clockevents are in the system and the ratings of those other clockevents. ----8<---- diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 172c6a05d27f..e8f6d241881f 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -23,7 +23,6 @@ #include #include -#include #include /* set up by the platform code */ @@ -388,9 +387,6 @@ static void __init twd_local_timer_of_register(struct device_node *np) { int err; - if (!is_smp() || !setup_max_cpus) - return; - twd_ppi = irq_of_parse_and_map(np, 0); if (!twd_ppi) { err = -EINVAL;