From patchwork Fri Jun 13 16:01:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4350391 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C5931BEEAA for ; Fri, 13 Jun 2014 16:06:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1556201B9 for ; Fri, 13 Jun 2014 16:06:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5D1020127 for ; Fri, 13 Jun 2014 16:06:07 +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 1WvTwu-0004gI-GT; Fri, 13 Jun 2014 16:03:28 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WvTvT-0003pB-OX for linux-arm-kernel@lists.infradead.org; Fri, 13 Jun 2014 16:02:02 +0000 Received: from wuerfel.lan (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0Lowim-1WJ8xH3XoC-00eq3o; Fri, 13 Jun 2014 18:01:28 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/14] ARM: mvebu: fix randconfig builds for pmsu driver Date: Fri, 13 Jun 2014 18:01:03 +0200 Message-Id: <1402675276-538682-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402675276-538682-1-git-send-email-arnd@arndb.de> References: <1402675276-538682-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:qVkPYa37d8dtoAed4r/jWf2xM546n79JlgXwKX330d1 GuGGLFA4x//j18AKw5G0Ru4Z8aADdKGETgZEUASPEqFF4AjnGG EXhGjnvLKpBK4Dub9ySFvZnPW7bY9gUJP0G004bOyOdZ5+LEgt t99puHvClUIlY7u3gQtVuec6/ZdLlfMxEAIFx9Ep1Tp3kKt3x1 Fk3gIdQrXbOl1pDH/XNABeoznBmLBcNEMqzkCAzbbhcgNHS1lC jUzfAmPDsh9UdECRTKspw/NSiQ8oHfiwA7S/rejkBOJoxJ5iOj mb7vr5rKmpY8FXT46WTTsWKd2auZy49hl8ViJWyYkm22It0SBK rj6XrNH5cIaw9e8/SJSRKHw0pv8VxoIvkeMug8xl9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140613_090200_321196_294738D8 X-CRM114-Status: GOOD ( 13.47 ) X-Spam-Score: -0.0 (/) Cc: Andrew Lunn , Jason Cooper , Arnd Bergmann , arm@kernel.org, Gregory Clement , Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP local_flush_tlb_all() is not available for NOMMU NOSMP builds. The isb() assembly instruction is not available when building a combined ARMv6/v7 kernel, unlike the isb() inline that falls back to the ARMv6 opcode. If CPUIDLE support is disabled globally, we must not call arm_cpu_suspend. If it is enabled, we should ensure that it is available. Signed-off-by: Arnd Bergmann Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth --- arch/arm/mach-mvebu/Kconfig | 1 + arch/arm/mach-mvebu/pmsu.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 6090b9e..bcfe094 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -18,6 +18,7 @@ menu "Marvell EBU SoC variants" config MACH_MVEBU_V7 bool select ARMADA_370_XP_TIMER + select ARM_CPU_SUSPEND if CPU_IDLE select CACHE_L2X0 config MACH_ARMADA_370 diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 53a55c8..14351bf 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -200,7 +201,9 @@ static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) /* If we are here, wfi failed. As processors run out of * coherency for some time, tlbs might be stale, so flush them */ +#ifdef CONFIG_MMU local_flush_tlb_all(); +#endif ll_enable_coherency(); @@ -210,9 +213,10 @@ static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) "tst %0, #(1 << 2) \n\t" "orreq %0, %0, #(1 << 2) \n\t" "mcreq p15, 0, %0, c1, c0, 0 \n\t" - "isb " : : "r" (0)); + isb(); + pr_warn("Failed to suspend the system\n"); return 0; @@ -220,6 +224,9 @@ static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) static int armada_370_xp_cpu_suspend(unsigned long deepidle) { + if (!IS_ENABLED(CONFIG_CPU_IDLE)) + return -ENODEV; + return cpu_suspend(deepidle, do_armada_370_xp_cpu_suspend); }