- update-to-the-kernel-kmap-kunmap-api.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     update to the kernel kmap/kunmap API

has been removed from the -mm tree.  Its filename is

     update-to-the-kernel-kmap-kunmap-api.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: update to the kernel kmap/kunmap API
From: James Bottomley <James.Bottomley@xxxxxxxxxxxx>

Give non-highmem architectures access to the kmap API for the purposes of
overriding (this is what the attached patch does).

The proposal is that we should now require all architectures with coherence
issues to manage data coherence via the kmap/kunmap API.  Thus driver
writers never have to write code like

kmap(page)
modify data in page
flush_kernel_dcache_page(page)
kunmap(page)

instead, kmap/kunmap will manage the coherence and driver (and filesystem)
writers don't need to worry about how to flush between kmap and kunmap. 
For most architectures, the page only needs to be flushed if it was
actually written to *and* there are user mappings of it, so the best
implementation looks to be: clear the page dirty pte bit in the kernel page
tables on kmap and on kunmap, check page->mappings for user maps, and then
the dirty bit, and only flush if it both has user mappings and is dirty.


Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/highmem.h |    2 ++
 1 file changed, 2 insertions(+)

diff -puN include/linux/highmem.h~update-to-the-kernel-kmap-kunmap-api include/linux/highmem.h
--- a/include/linux/highmem.h~update-to-the-kernel-kmap-kunmap-api
+++ a/include/linux/highmem.h
@@ -29,6 +29,7 @@ unsigned int nr_free_highpages(void);
 
 static inline unsigned int nr_free_highpages(void) { return 0; }
 
+#ifndef ARCH_HAS_KMAP
 static inline void *kmap(struct page *page)
 {
 	might_sleep();
@@ -41,6 +42,7 @@ static inline void *kmap(struct page *pa
 #define kunmap_atomic(addr, idx)	do { } while (0)
 #define kmap_atomic_pfn(pfn, idx)	page_address(pfn_to_page(pfn))
 #define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
+#endif
 
 #endif /* CONFIG_HIGHMEM */
 
_

Patches currently in -mm which might be from James.Bottomley@xxxxxxxxxxxx are

origin.patch
git-parisc.patch
git-scsi-misc.patch
git-scsi-target.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux