From patchwork Fri Oct 2 18:02:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 7318261 Return-Path: X-Original-To: patchwork-linux-arm@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 2C762BEEA4 for ; Fri, 2 Oct 2015 18:05:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F87B2081C for ; Fri, 2 Oct 2015 18:05:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54AAD2081B for ; Fri, 2 Oct 2015 18:05:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zi4g1-0007H2-8E; Fri, 02 Oct 2015 18:03:25 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zi4fv-0006mX-AU for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2015 18:03:20 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id A2DF01412F9; Fri, 2 Oct 2015 18:02:57 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 8E1E21412FC; Fri, 2 Oct 2015 18:02:57 +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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 C6FA01412F9; Fri, 2 Oct 2015 18:02:56 +0000 (UTC) Date: Fri, 2 Oct 2015 11:02:55 -0700 From: Stephen Boyd To: Mason Subject: Re: Dropping "depends on SMP" for HAVE_ARM_TWD -- take 2 Message-ID: <20151002180255.GK12338@codeaurora.org> References: <560E53E3.7070207@free.fr> <560E8584.8000207@free.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <560E8584.8000207@free.fr> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151002_110319_582434_AB55EC33 X-CRM114-Status: GOOD ( 26.89 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Dirk Behme , Russell King , Arnd Bergmann , Marc Zyngier , Linus Walleij , Felipe Balbi , Shawn Guo , Linux ARM Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 10/02, Mason wrote: > [ Adding original reporter ] > > On 02/10/2015 11:52, Mason wrote: > > > [ take 1 was sent on 2015-03-26 ] > > > > Hello everyone, > > > > In http://thread.gmane.org/gmane.linux.ports.arm.kernel/389931/focus=392348 > > Stephen Boyd wrote: > > > >> I don't see any problem with the TWD dropping the dependency on SMP. > >> The code should work the same on a UP configuration [...] > > > > And Arnd recently said: > > > >> I think this has come up before and should be fixed. Could you > >> send a patch that allows using TWD in uniprocessor configurations? > > > > Basically, this means reverting Shawn Guo's 904464b91eca patch. > > and removing "depends on SMP" for HAVE_ARM_TWD. > > > > However, Shawn's patch fixed an issue, therefore it seems likely > > that simply reverting is not the proper solution? > > > > What should I do? > > For reference, the warning used to be: > > ------------[ cut here ]------------ > WARNING: at arch/arm/kernel/smp_twd.c:345 > twd_local_timer_of_register+0x7c/0x90() > twd_local_timer_of_register failed (-6) > Modules linked in: > Backtrace: > [<80011f14>] (dump_backtrace+0x0/0x10c) from [<8044dd30>] > (dump_stack+0x18/0x1c) > r7:805e9f58 r6:805ba84c r5:80539331 r4:00000159 > [<8044dd18>] (dump_stack+0x0/0x1c) from [<80020fbc>] > (warn_slowpath_common+0x54/0x6c) > [<80020f68>] (warn_slowpath_common+0x0/0x6c) from [<80021078>] > (warn_slowpath_fmt+0x38/0x40) > r9:412fc09a r8:8fffffff r7:ffffffff r6:00000001 r5:80633b8c > r4:80b32da8 > [<80021040>] (warn_slowpath_fmt+0x0/0x40) from [<805ba84] > (twd_local_timer_of_register+0x7c/0x90) > r3:fffffffa r2:8053934b > [<805ba7d0>] (twd_local_timer_of_register+0x0/0x90) from [<805c0bec>] > (imx6q_timer_init+0x18/0x4c) > r5:80633800 r4:8053b701 > [<805c0bd4>] (imx6q_timer_init+0x0/0x4c) from [<805ba4e8>] > (time_init+0x28/0x38) > r5:80633800 r4:805dc0f4 > [<805ba4c0>] (time_init+0x0/0x38) from [<805b6854>] > (start_kernel+0x1a0/0x310) > [<805b66b4>] (start_kernel+0x0/0x310) from [<10008044>] (0x10008044) > r8:1000406a r7:805f3f8c r6:805dc0c4 r5:805f0518 r4:10c5387d > ---[ end trace 1b75b31a2719ed1c ]--- > > > I cannot reproduce on v4.2 + my platform... The warning has been removed in commit 5028090d1da1 (ARM: 8434/1: Revert "7655/1: smp_twd: make twd_local_timer_of_register() no-op for nosmp", 2015-09-14) sitting in linux-next. Oddly, that commit doesn't remove the depends on SMP for the Kconfig. So it seems that we can apply this patch and everyone is happy? We could also drop the "if SMP" part of most of the platform selects if anyone actually cares. ---8<---- diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 369791fb619c..be64d9d604c3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1389,7 +1389,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