From patchwork Wed Apr 10 00:34:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 2418871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 8F28A3FD8C for ; Wed, 10 Apr 2013 00:35:39 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPj0Y-0001tj-Du; Wed, 10 Apr 2013 00:35:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPj0S-0000MF-N8; Wed, 10 Apr 2013 00:35:20 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPj0F-0000L6-C1 for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2013 00:35:08 +0000 X-IronPort-AV: E=Sophos;i="4.87,441,1363158000"; d="scan'208";a="37062505" Received: from pdmz-ns-snip_115.254.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.115.254]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Apr 2013 17:35:04 -0700 Received: from lauraa-linux.qualcomm.com (pdmz-ns-snip_218_1.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id D696010004D6; Tue, 9 Apr 2013 17:35:04 -0700 (PDT) From: Laura Abbott To: linux-arm-kernel@lists.infradead.org, Russell King , Nicolas Pitre Subject: [RFC PATCHv2 2/2] mm: highmem: Add definitions for kmap_atomic_flush_unused Date: Tue, 9 Apr 2013 17:34:57 -0700 Message-Id: <1365554097-21305-2-git-send-email-lauraa@codeaurora.org> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1365554097-21305-1-git-send-email-lauraa@codeaurora.org> References: <1365554097-21305-1-git-send-email-lauraa@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130409_203507_579880_B640124C X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.254 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-msm@vger.kernel.org, Laura Abbott 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 kmap_flush_unused does not flush kmap_atomic mappings which are handled separately. Architectures may have use cases to require these to be flushed. Add an option to let archtectures define kmap_atomic flushing to get rid of extra mappings. Signed-off-by: Laura Abbott --- include/linux/highmem.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 7fb31da..e666549 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -39,6 +39,12 @@ extern unsigned long totalhigh_pages; void kmap_flush_unused(void); +#ifdef CONFIG_ARCH_WANT_KMAP_ATOMIC_FLUSH +void kmap_atomic_flush_unused(void); +#else +static inline void kmap_atomic_flush_unused(void) { } +#endif + struct page *kmap_to_page(void *addr); #else /* CONFIG_HIGHMEM */ @@ -79,6 +85,7 @@ static inline void __kunmap_atomic(void *addr) #define kmap_atomic_to_page(ptr) virt_to_page(ptr) #define kmap_flush_unused() do {} while(0) +#define kmap_atomic_flush_unused() do {} while(0) #endif #endif /* CONFIG_HIGHMEM */