From: Greg Kroah-Hartman Date: Fri, 21 Jun 2013 15:41:41 +0000 (-0700) Subject: delete arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch... X-Git-Tag: v3.0.84~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a984c10d72d6767203d042a82ffe85681451fd9;p=thirdparty%2Fkernel%2Fstable-queue.git delete arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch from all branches --- diff --git a/queue-3.0/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch b/queue-3.0/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch deleted file mode 100644 index 16b78439edc..00000000000 --- a/queue-3.0/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 1bc39742aab09248169ef9d3727c9def3528b3f3 Mon Sep 17 00:00:00 2001 -From: Simon Baatz -Date: Mon, 10 Jun 2013 21:10:12 +0100 -Subject: ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page - -From: Simon Baatz - -commit 1bc39742aab09248169ef9d3727c9def3528b3f3 upstream. - -Commit f8b63c1 made flush_kernel_dcache_page a no-op assuming that -the pages it needs to handle are kernel mapped only. However, for -example when doing direct I/O, pages with user space mappings may -occur. - -Thus, continue to do lazy flushing if there are no user space -mappings. Otherwise, flush the kernel cache lines directly. - -Signed-off-by: Simon Baatz -Reviewed-by: Catalin Marinas -Signed-off-by: Russell King -Signed-off-by: Greg Kroah-Hartman - ---- - arch/arm/include/asm/cacheflush.h | 4 +--- - arch/arm/mm/flush.c | 33 +++++++++++++++++++++++++++++++++ - 2 files changed, 34 insertions(+), 3 deletions(-) - ---- a/arch/arm/include/asm/cacheflush.h -+++ b/arch/arm/include/asm/cacheflush.h -@@ -305,9 +305,7 @@ static inline void flush_anon_page(struc - } - - #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE --static inline void flush_kernel_dcache_page(struct page *page) --{ --} -+extern void flush_kernel_dcache_page(struct page *); - - #define flush_dcache_mmap_lock(mapping) \ - spin_lock_irq(&(mapping)->tree_lock) ---- a/arch/arm/mm/flush.c -+++ b/arch/arm/mm/flush.c -@@ -304,6 +304,39 @@ void flush_dcache_page(struct page *page - EXPORT_SYMBOL(flush_dcache_page); - - /* -+ * Ensure cache coherency for the kernel mapping of this page. We can -+ * assume that the page is pinned via kmap. -+ * -+ * If the page only exists in the page cache and there are no user -+ * space mappings, this is a no-op since the page was already marked -+ * dirty at creation. Otherwise, we need to flush the dirty kernel -+ * cache lines directly. -+ */ -+void flush_kernel_dcache_page(struct page *page) -+{ -+ if (cache_is_vivt() || cache_is_vipt_aliasing()) { -+ struct address_space *mapping; -+ -+ mapping = page_mapping(page); -+ -+ if (!mapping || mapping_mapped(mapping)) { -+ void *addr; -+ -+ addr = page_address(page); -+ /* -+ * kmap_atomic() doesn't set the page virtual -+ * address for highmem pages, and -+ * kunmap_atomic() takes care of cache -+ * flushing already. -+ */ -+ if (!IS_ENABLED(CONFIG_HIGHMEM) || addr) -+ __cpuc_flush_dcache_area(addr, PAGE_SIZE); -+ } -+ } -+} -+EXPORT_SYMBOL(flush_kernel_dcache_page); -+ -+/* - * Flush an anonymous page so that users of get_user_pages() - * can safely access the data. The expected sequence is: - * diff --git a/queue-3.0/series b/queue-3.0/series index 88625d55840..94aab0145b7 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -1,3 +1,2 @@ -arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch alsa-usb-audio-work-around-android-accessory-firmware-bug.patch tilepro-work-around-module-link-error-with-gcc-4.7.patch diff --git a/queue-3.4/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch b/queue-3.4/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch deleted file mode 100644 index 08e1596c56d..00000000000 --- a/queue-3.4/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 1bc39742aab09248169ef9d3727c9def3528b3f3 Mon Sep 17 00:00:00 2001 -From: Simon Baatz -Date: Mon, 10 Jun 2013 21:10:12 +0100 -Subject: ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page - -From: Simon Baatz - -commit 1bc39742aab09248169ef9d3727c9def3528b3f3 upstream. - -Commit f8b63c1 made flush_kernel_dcache_page a no-op assuming that -the pages it needs to handle are kernel mapped only. However, for -example when doing direct I/O, pages with user space mappings may -occur. - -Thus, continue to do lazy flushing if there are no user space -mappings. Otherwise, flush the kernel cache lines directly. - -Signed-off-by: Simon Baatz -Reviewed-by: Catalin Marinas -Signed-off-by: Russell King -Signed-off-by: Greg Kroah-Hartman - ---- - arch/arm/include/asm/cacheflush.h | 4 +--- - arch/arm/mm/flush.c | 33 +++++++++++++++++++++++++++++++++ - 2 files changed, 34 insertions(+), 3 deletions(-) - ---- a/arch/arm/include/asm/cacheflush.h -+++ b/arch/arm/include/asm/cacheflush.h -@@ -305,9 +305,7 @@ static inline void flush_anon_page(struc - } - - #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE --static inline void flush_kernel_dcache_page(struct page *page) --{ --} -+extern void flush_kernel_dcache_page(struct page *); - - #define flush_dcache_mmap_lock(mapping) \ - spin_lock_irq(&(mapping)->tree_lock) ---- a/arch/arm/mm/flush.c -+++ b/arch/arm/mm/flush.c -@@ -299,6 +299,39 @@ void flush_dcache_page(struct page *page - EXPORT_SYMBOL(flush_dcache_page); - - /* -+ * Ensure cache coherency for the kernel mapping of this page. We can -+ * assume that the page is pinned via kmap. -+ * -+ * If the page only exists in the page cache and there are no user -+ * space mappings, this is a no-op since the page was already marked -+ * dirty at creation. Otherwise, we need to flush the dirty kernel -+ * cache lines directly. -+ */ -+void flush_kernel_dcache_page(struct page *page) -+{ -+ if (cache_is_vivt() || cache_is_vipt_aliasing()) { -+ struct address_space *mapping; -+ -+ mapping = page_mapping(page); -+ -+ if (!mapping || mapping_mapped(mapping)) { -+ void *addr; -+ -+ addr = page_address(page); -+ /* -+ * kmap_atomic() doesn't set the page virtual -+ * address for highmem pages, and -+ * kunmap_atomic() takes care of cache -+ * flushing already. -+ */ -+ if (!IS_ENABLED(CONFIG_HIGHMEM) || addr) -+ __cpuc_flush_dcache_area(addr, PAGE_SIZE); -+ } -+ } -+} -+EXPORT_SYMBOL(flush_kernel_dcache_page); -+ -+/* - * Flush an anonymous page so that users of get_user_pages() - * can safely access the data. The expected sequence is: - * diff --git a/queue-3.4/series b/queue-3.4/series index 2915a5daf05..1c4e34debdb 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -1,4 +1,3 @@ -arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch alsa-usb-audio-fix-invalid-volume-resolution-for-logitech-hd-webcam-c310.patch alsa-usb-audio-work-around-android-accessory-firmware-bug.patch clk-remove-notifier-from-list-before-freeing-it.patch diff --git a/queue-3.9/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch b/queue-3.9/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch deleted file mode 100644 index aa8d13d3a86..00000000000 --- a/queue-3.9/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 1bc39742aab09248169ef9d3727c9def3528b3f3 Mon Sep 17 00:00:00 2001 -From: Simon Baatz -Date: Mon, 10 Jun 2013 21:10:12 +0100 -Subject: ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page - -From: Simon Baatz - -commit 1bc39742aab09248169ef9d3727c9def3528b3f3 upstream. - -Commit f8b63c1 made flush_kernel_dcache_page a no-op assuming that -the pages it needs to handle are kernel mapped only. However, for -example when doing direct I/O, pages with user space mappings may -occur. - -Thus, continue to do lazy flushing if there are no user space -mappings. Otherwise, flush the kernel cache lines directly. - -Signed-off-by: Simon Baatz -Reviewed-by: Catalin Marinas -Signed-off-by: Russell King -Signed-off-by: Greg Kroah-Hartman - ---- - arch/arm/include/asm/cacheflush.h | 4 +--- - arch/arm/mm/flush.c | 33 +++++++++++++++++++++++++++++++++ - 2 files changed, 34 insertions(+), 3 deletions(-) - ---- a/arch/arm/include/asm/cacheflush.h -+++ b/arch/arm/include/asm/cacheflush.h -@@ -320,9 +320,7 @@ static inline void flush_anon_page(struc - } - - #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE --static inline void flush_kernel_dcache_page(struct page *page) --{ --} -+extern void flush_kernel_dcache_page(struct page *); - - #define flush_dcache_mmap_lock(mapping) \ - spin_lock_irq(&(mapping)->tree_lock) ---- a/arch/arm/mm/flush.c -+++ b/arch/arm/mm/flush.c -@@ -298,6 +298,39 @@ void flush_dcache_page(struct page *page - EXPORT_SYMBOL(flush_dcache_page); - - /* -+ * Ensure cache coherency for the kernel mapping of this page. We can -+ * assume that the page is pinned via kmap. -+ * -+ * If the page only exists in the page cache and there are no user -+ * space mappings, this is a no-op since the page was already marked -+ * dirty at creation. Otherwise, we need to flush the dirty kernel -+ * cache lines directly. -+ */ -+void flush_kernel_dcache_page(struct page *page) -+{ -+ if (cache_is_vivt() || cache_is_vipt_aliasing()) { -+ struct address_space *mapping; -+ -+ mapping = page_mapping(page); -+ -+ if (!mapping || mapping_mapped(mapping)) { -+ void *addr; -+ -+ addr = page_address(page); -+ /* -+ * kmap_atomic() doesn't set the page virtual -+ * address for highmem pages, and -+ * kunmap_atomic() takes care of cache -+ * flushing already. -+ */ -+ if (!IS_ENABLED(CONFIG_HIGHMEM) || addr) -+ __cpuc_flush_dcache_area(addr, PAGE_SIZE); -+ } -+ } -+} -+EXPORT_SYMBOL(flush_kernel_dcache_page); -+ -+/* - * Flush an anonymous page so that users of get_user_pages() - * can safely access the data. The expected sequence is: - * diff --git a/queue-3.9/series b/queue-3.9/series index 86c8aeb4061..86f0fc2d1fc 100644 --- a/queue-3.9/series +++ b/queue-3.9/series @@ -1,6 +1,5 @@ arm-7752-1-errata-louis-bit-field-in-clidr-register-is-incorrect.patch arm-7754-1-fix-the-cpu-id-and-the-mask-associated-to-the-pj4b.patch -arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch perf-arm64-record-the-user-mode-pc-in-the-call-chain.patch alsa-usb-audio-fix-invalid-volume-resolution-for-logitech-hd-webcam-c310.patch alsa-hda-fix-pin-configurations-for-macbook-air-4-2.patch