Patch "mm: add kmap_to_page()" has been added to the 3.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    mm: add kmap_to_page()

to the 3.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-add-kmap_to_page.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From fcb8996728fb59eddf84678df7cb213b2c9a2e26 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Date: Tue, 31 Jul 2012 16:45:02 -0700
Subject: mm: add kmap_to_page()

From: Ben Hutchings <ben@xxxxxxxxxxxxxxx>

commit fcb8996728fb59eddf84678df7cb213b2c9a2e26 upstream.

This is extracted from Mel Gorman's commit 5a178119b0fb ('mm: add
support for direct_IO to highmem pages') upstream.

Required to backport commit b9cdc88df8e6 ('virtio: 9p: correctly pass
physical address to userspace for high pages').

Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Cc: Yijing Wang <wangyijing@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 include/linux/highmem.h |    7 +++++++
 mm/highmem.c            |   12 ++++++++++++
 2 files changed, 19 insertions(+)

--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -39,10 +39,17 @@ extern unsigned long totalhigh_pages;
 
 void kmap_flush_unused(void);
 
+struct page *kmap_to_page(void *addr);
+
 #else /* CONFIG_HIGHMEM */
 
 static inline unsigned int nr_free_highpages(void) { return 0; }
 
+static inline struct page *kmap_to_page(void *addr)
+{
+	return virt_to_page(addr);
+}
+
 #define totalhigh_pages 0UL
 
 #ifndef ARCH_HAS_KMAP
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -94,6 +94,18 @@ static DECLARE_WAIT_QUEUE_HEAD(pkmap_map
 		do { spin_unlock(&kmap_lock); (void)(flags); } while (0)
 #endif
 
+struct page *kmap_to_page(void *vaddr)
+{
+	unsigned long addr = (unsigned long)vaddr;
+
+	if (addr >= PKMAP_ADDR(0) && addr <= PKMAP_ADDR(LAST_PKMAP)) {
+		int i = (addr - PKMAP_ADDR(0)) >> PAGE_SHIFT;
+		return pte_page(pkmap_page_table[i]);
+	}
+
+	return virt_to_page(addr);
+}
+
 static void flush_all_zero_pkmaps(void)
 {
 	int i;


Patches currently in stable-queue which might be from ben@xxxxxxxxxxxxxxx are

queue-3.4/bluetooth-add-support-for-atheros-0930-0219.patch
queue-3.4/bluetooth-add-support-for-imc-networks.patch
queue-3.4/bluetooth-add-usb_vendor_and_interface_info-for-broadcom-foxconn.patch
queue-3.4/bluetooth-add-support-for-bcm20702a0-b.patch
queue-3.4/mm-highmem-export-kmap_to_page-for-modules.patch
queue-3.4/staging-speakup-move-pasting-into-a-work-item.patch
queue-3.4/bluetooth-ath3k-add-support-for-id-0x13d3-0x3402.patch
queue-3.4/bluetooth-add-support-for-atheros-a.patch
queue-3.4/bluetooth-add-support-for-foxconn-hon-hai-b.patch
queue-3.4/bluetooth-add-support-for-atheros.patch
queue-3.4/virtio-9p-correctly-pass-physical-address-to-userspace-for-high-pages.patch
queue-3.4/bluetooth-add-support-for-foxconn-hon-hai.patch
queue-3.4/virtio-blk-fix-hot-unplug-race-in-remove-method.patch
queue-3.4/bluetooth-add-support-for-atheros-04ca-3004-device-to-ath3k.patch
queue-3.4/virtio-console-rename-cvq_lock-to-c_ivq_lock.patch
queue-3.4/bluetooth-add-support-for-bcm20702a0-a.patch
queue-3.4/mm-add-kmap_to_page.patch
queue-3.4/bluetooth-add-support-for-foxconn-hon-hai-a.patch
queue-3.4/virtio-blk-don-t-free-ida-when-disk-is-in-use.patch
queue-3.4/virtio-console-add-locking-around-c_ovq-operations.patch
queue-3.4/bluetooth-support-ar3011-in-acer-iconia-tab-w500.patch
queue-3.4/bluetooth-add-support-for-foxconn-hon-hai-ar5bbu22-0489-e03c.patch
queue-3.4/bluetooth-ath3k-add-support-for-fujitsu-lifebook-uh5x2.patch
queue-3.4/bluetooth-add-support-for-gc-wb300d-pcie-to-ath3k.patch
queue-3.4/bluetooth-add-support-for-bcm20702a0.patch
queue-3.4/bluetooth-add-support-for-mediatek-bluetooth-device.patch
queue-3.4/virtio-blk-call-del_gendisk-before-disable-guest-kick.patch
queue-3.4/bluetooth-add-support-for-sony-vaio-t-series.patch
queue-3.4/bluetooth-device-0cf3-3008-should-map-ar-3012.patch
queue-3.4/virtio_blk-drop-unused-request-tracking-list.patch
queue-3.4/virtio_console-fix-uapi-header.patch
queue-3.4/bluetooth-device-04ca-3008-should-use-ath3k.patch
queue-3.4/bluetooth-fix-missing-length-checks-for-l2cap-signalling-pdus.patch
queue-3.4/virtio-blk-reset-device-after-blk_cleanup_queue.patch
queue-3.4/bluetooth-add-support-for-atheros-0489-e057.patch
queue-3.4/bluetooth-add-a-new-pid-vid-0cf3-e005-for-ar3012.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]