From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laura Abbott 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> References: <1365554097-21305-1-git-send-email-lauraa@codeaurora.org> Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:26839 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935170Ab3DJAfF (ORCPT ); Tue, 9 Apr 2013 20:35:05 -0400 In-Reply-To: <1365554097-21305-1-git-send-email-lauraa@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: linux-arm-kernel@lists.infradead.org, Russell King , Nicolas Pitre Cc: linux-arm-msm@vger.kernel.org, Laura Abbott 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 */ -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation From mboxrd@z Thu Jan 1 00:00:00 1970 From: lauraa@codeaurora.org (Laura Abbott) Date: Tue, 9 Apr 2013 17:34:57 -0700 Subject: [RFC PATCHv2 2/2] mm: highmem: Add definitions for kmap_atomic_flush_unused In-Reply-To: <1365554097-21305-1-git-send-email-lauraa@codeaurora.org> References: <1365554097-21305-1-git-send-email-lauraa@codeaurora.org> Message-ID: <1365554097-21305-2-git-send-email-lauraa@codeaurora.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.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 */ -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation