From patchwork Mon Mar 4 04:51:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonsoo Kim X-Patchwork-Id: 2210581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id DE395DF2F2 for ; Mon, 4 Mar 2013 04:55:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCNLt-0001cT-Iw; Mon, 04 Mar 2013 04:50:17 +0000 Received: from lgemrelse1q.lge.com ([156.147.1.111]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCNLm-0001bn-2E for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2013 04:50:14 +0000 X-AuditID: 9c93016f-b7c56ae00000569b-07-513427fe3d84 Received: from js1304-P5Q-DELUXE.LGE.NET ( [10.177.220.249]) by LGEMRELSE1Q.lge.com (Symantec Brightmail Gateway) with SMTP id 51.ED.22171.EF724315; Mon, 4 Mar 2013 13:50:06 +0900 (KST) From: Joonsoo Kim To: Russell King Subject: [RFC PATCH] ARM: mm: disable kmap_high_get() for SMP Date: Mon, 4 Mar 2013 13:51:07 +0900 Message-Id: <1362372667-953-1-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130303_235010_370336_1602984B X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.8 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [156.147.1.111 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Joonsoo Kim , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Pitre X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 With SMP and enabling kmap_high_get(), it makes users of kmap_atomic() sequential ordered, because kmap_high_get() use global kmap_lock(). It is not welcome situation, so turn off this optimization for SMP. Cc: Nicolas Pitre Signed-off-by: Joonsoo Kim diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h index 8c5e828..82fea0f 100644 --- a/arch/arm/include/asm/highmem.h +++ b/arch/arm/include/asm/highmem.h @@ -26,15 +26,13 @@ extern void kunmap_high(struct page *page); * The reason for kmap_high_get() is to ensure that the currently kmap'd * page usage count does not decrease to zero while we're using its * existing virtual mapping in an atomic context. With a VIVT cache this - * is essential to do, but with a VIPT cache this is only an optimization - * so not to pay the price of establishing a second mapping if an existing - * one can be used. However, on platforms without hardware TLB maintenance - * broadcast, we simply cannot use ARCH_NEEDS_KMAP_HIGH_GET at all since - * the locking involved must also disable IRQs which is incompatible with - * the IPI mechanism used by global TLB operations. + * is essential to do, but with a VIPT cache this is only an optimization. + * With SMP and enabling kmap_high_get(), it makes users of kmap_atomic() + * sequential ordered, because kmap_high_get() use global kmap_lock(). + * It is not welcome situation, so turn off this optimization for SMP. */ #define ARCH_NEEDS_KMAP_HIGH_GET -#if defined(CONFIG_SMP) && defined(CONFIG_CPU_TLB_V6) +#if defined(CONFIG_SMP) #undef ARCH_NEEDS_KMAP_HIGH_GET #if defined(CONFIG_HIGHMEM) && defined(CONFIG_CPU_CACHE_VIVT) #error "The sum of features in your kernel config cannot be supported together"