From patchwork Thu Jan 8 02:11:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 5590131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6F0529F443 for ; Thu, 8 Jan 2015 02:15:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AAE220375 for ; Thu, 8 Jan 2015 02:15:45 +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 A81782034F for ; Thu, 8 Jan 2015 02:15:44 +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 1Y92ah-00069j-3X; Thu, 08 Jan 2015 02:12:51 +0000 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y92aa-0005zf-D5 for linux-arm-kernel@lists.infradead.org; Thu, 08 Jan 2015 02:12:45 +0000 Received: by mail-qg0-f51.google.com with SMTP id i50so359200qgf.10 for ; Wed, 07 Jan 2015 18:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Yg7f7wBNrj12ErxiJX0xUFMxclINnl1VaAFWGBq/TEU=; b=hd5XFw9Zg08Vs3K0LcbPHzcyHy1QYO2Dp6NtzkCpaEO8Hzyy1Twqw60XZfkxHcHpSO 71bb2LgjV0njYphDAypCuk033G8KRjq7P6zriPaLs4gwKMNZk28UNdmI60EwsiGBhjew X26OCa8vSreIj6QX3prFUqFoRd70WBdLD8l5rOIVWXyzrr6+rgLe5irzrTCk4KwdjtCv OTGtjIOWpijqYpztw9axm0ijZyBxA9pQDnCSh+PI25Uqd717NtF/Y+qYqnmllpZ/TZ8s xmsZT9QeuITKXtSSVX+bcY7QpnVJloEcVmz/Oaasb0DmZgesMIzyrbxWv0GgBFK1GrXb N2PQ== X-Received: by 10.224.171.129 with SMTP id h1mr10832333qaz.74.1420683142699; Wed, 07 Jan 2015 18:12:22 -0800 (PST) Received: from fainelli-desktop.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id m9sm2823404qaz.15.2015.01.07.18.12.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jan 2015 18:12:21 -0800 (PST) From: Florian Fainelli To: linux-arm-kernel@lists.infradead.org Subject: [RFC] ARM: Make CPU_DCACHE_DISABLE depend on !SMP Date: Wed, 7 Jan 2015 18:11:28 -0800 Message-Id: <1420683088-1856-1-git-send-email-f.fainelli@gmail.com> X-Mailer: git-send-email 2.1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150107_181244_642572_D49151BD X-CRM114-Status: GOOD ( 11.64 ) X-Spam-Score: -0.8 (/) Cc: linux@arm.linux.org.uk, Florian Fainelli , will.deacon@arm.com, arnd@arndb.de 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=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Enabling CPU_DCACHE_DISABLE on a SMP capable system will prevent the kernel from booting because of the following ldrex instruction in arch_spin_lock: (gdb) x/10i $pc => 0xc053cfa8 <_raw_spin_lock+4>: ldrex r3, [r0] 0xc053cfac <_raw_spin_lock+8>: add r2, r3, #65536 ; 0x10000 which is taken by the very first printk call: at /home/fainelli/work/linux/arch/arm/include/asm/spinlock.h:65 fmt=0xc0637650 "\001\066Booting Linux on physical CPU 0x%x\n", args=) at kernel/printk/printk.c:1525 fmt=0xc05370f4 "\024\320\215\342\004\340\235\344\020\320\215\342\036\377/\341\017") at kernel/printk/printk.c:1688 ldrex requires exclusive monitor(s) (local or global) which are no longer working when the Data cache is disabled in CP15 and will just hang the CPU there. Signed-off-by: Florian Fainelli Acked-by: Arnd Bergmann --- arch/arm/mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 03823e784f63..09245fd1e900 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -738,7 +738,7 @@ config CPU_ICACHE_DISABLE config CPU_DCACHE_DISABLE bool "Disable D-Cache (C-bit)" - depends on CPU_CP15 + depends on CPU_CP15 && !SMP help Say Y here to disable the processor data cache. Unless you have a reason not to or are unsure, say N.