From: Greg Kroah-Hartman Date: Thu, 27 Jun 2013 18:59:17 +0000 (-0700) Subject: 3.9-stable patches X-Git-Tag: v3.9.9~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9e2e51428ac6e6cba0fef5599b30d4391e8f905;p=thirdparty%2Fkernel%2Fstable-queue.git 3.9-stable patches added patches: arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch arm-7762-1-kernel-fix-arm_dt_init_cpu_maps-to-skip-non-cpu-nodes.patch arm-7772-1-fix-missing-flush_kernel_dcache_page-for-nommu.patch s390-ipl-fix-fcp-wwpn-and-lun-format-strings-for-read.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 new file mode 100644 index 00000000000..aa8d13d3a86 --- /dev/null +++ b/queue-3.9/arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch @@ -0,0 +1,82 @@ +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/arm-7762-1-kernel-fix-arm_dt_init_cpu_maps-to-skip-non-cpu-nodes.patch b/queue-3.9/arm-7762-1-kernel-fix-arm_dt_init_cpu_maps-to-skip-non-cpu-nodes.patch new file mode 100644 index 00000000000..fbc5abf9c0f --- /dev/null +++ b/queue-3.9/arm-7762-1-kernel-fix-arm_dt_init_cpu_maps-to-skip-non-cpu-nodes.patch @@ -0,0 +1,36 @@ +From 1ba9bf0a9ae779c1a2b3eb64951e4161d9bad7a9 Mon Sep 17 00:00:00 2001 +From: Lorenzo Pieralisi +Date: Wed, 19 Jun 2013 10:36:26 +0100 +Subject: ARM: 7762/1: kernel: fix arm_dt_init_cpu_maps() to skip non-cpu nodes + +From: Lorenzo Pieralisi + +commit 1ba9bf0a9ae779c1a2b3eb64951e4161d9bad7a9 upstream. + +The introduction of the cpu-map topology node in the cpus node implies +that cpus node might have children that are not cpu nodes. The DT +parsing code needs updating otherwise it would check for cpu nodes +properties in nodes that are not required to contain them, resulting +in warnings that have no bearing on bindings defined in the dts source file. + +Signed-off-by: Lorenzo Pieralisi +Acked-by: Nicolas Pitre +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/devtree.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/arm/kernel/devtree.c ++++ b/arch/arm/kernel/devtree.c +@@ -92,6 +92,9 @@ void __init arm_dt_init_cpu_maps(void) + for_each_child_of_node(cpus, cpu) { + u32 hwid; + ++ if (of_node_cmp(cpu->type, "cpu")) ++ continue; ++ + pr_debug(" * %s...\n", cpu->full_name); + /* + * A device tree containing CPU nodes with missing "reg" diff --git a/queue-3.9/arm-7772-1-fix-missing-flush_kernel_dcache_page-for-nommu.patch b/queue-3.9/arm-7772-1-fix-missing-flush_kernel_dcache_page-for-nommu.patch new file mode 100644 index 00000000000..a318aeca96c --- /dev/null +++ b/queue-3.9/arm-7772-1-fix-missing-flush_kernel_dcache_page-for-nommu.patch @@ -0,0 +1,38 @@ +From 63384fd0b1509acf522a8a8fcede09087eedb7df Mon Sep 17 00:00:00 2001 +From: Simon Baatz +Date: Sat, 22 Jun 2013 22:01:25 +0100 +Subject: ARM: 7772/1: Fix missing flush_kernel_dcache_page() for noMMU + +From: Simon Baatz + +commit 63384fd0b1509acf522a8a8fcede09087eedb7df upstream. + +Commit 1bc3974 (ARM: 7755/1: handle user space mapped pages in +flush_kernel_dcache_page) moved the implementation of +flush_kernel_dcache_page() into mm/flush.c but did not implement it +on noMMU ARM. + +Signed-off-by: Simon Baatz +Acked-by: Kevin Hilman +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mm/nommu.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/arch/arm/mm/nommu.c ++++ b/arch/arm/mm/nommu.c +@@ -57,6 +57,12 @@ void flush_dcache_page(struct page *page + } + EXPORT_SYMBOL(flush_dcache_page); + ++void flush_kernel_dcache_page(struct page *page) ++{ ++ __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE); ++} ++EXPORT_SYMBOL(flush_kernel_dcache_page); ++ + void copy_to_user_page(struct vm_area_struct *vma, struct page *page, + unsigned long uaddr, void *dst, const void *src, + unsigned long len) diff --git a/queue-3.9/s390-ipl-fix-fcp-wwpn-and-lun-format-strings-for-read.patch b/queue-3.9/s390-ipl-fix-fcp-wwpn-and-lun-format-strings-for-read.patch new file mode 100644 index 00000000000..6e1ca2960a0 --- /dev/null +++ b/queue-3.9/s390-ipl-fix-fcp-wwpn-and-lun-format-strings-for-read.patch @@ -0,0 +1,67 @@ +From eda4ddf7e3a2245888e8c45c566fd514cdd5abbb Mon Sep 17 00:00:00 2001 +From: Michael Holzheu +Date: Fri, 21 Jun 2013 13:21:30 +0200 +Subject: s390/ipl: Fix FCP WWPN and LUN format strings for read + +From: Michael Holzheu + +commit eda4ddf7e3a2245888e8c45c566fd514cdd5abbb upstream. + +The following git commit changed the behavior of sscanf: + +commit 53809751ac230a3611b5cdd375f3389f3207d471 +Author: Jan Beulich +Date: Mon Dec 17 16:01:31 2012 -0800 + sscanf: don't ignore field widths for numeric conversions + +This broke the WWPN and LUN sysfs attributes for s390 reipl and dump +on panic. + +Example: + +$ echo 0x0123456701234567 > /sys/firmware/reipl/fcp/wwpn +$ cat /sys/firmware/reipl/fcp/wwpn +0x0001234567012345 + +So fix this and use format strings that work also with the +new sscanf implementation: + +$ echo 0x012345670123456789 > /sys/firmware/reipl/fcp/wwpn +$ cat /sys/firmware/reipl/fcp/wwpn +0x0123456701234567 + +Reviewed-by: Steffen Maier +Signed-off-by: Michael Holzheu +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + arch/s390/kernel/ipl.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/s390/kernel/ipl.c ++++ b/arch/s390/kernel/ipl.c +@@ -754,9 +754,9 @@ static struct bin_attribute sys_reipl_fc + .write = reipl_fcp_scpdata_write, + }; + +-DEFINE_IPL_ATTR_RW(reipl_fcp, wwpn, "0x%016llx\n", "%016llx\n", ++DEFINE_IPL_ATTR_RW(reipl_fcp, wwpn, "0x%016llx\n", "%llx\n", + reipl_block_fcp->ipl_info.fcp.wwpn); +-DEFINE_IPL_ATTR_RW(reipl_fcp, lun, "0x%016llx\n", "%016llx\n", ++DEFINE_IPL_ATTR_RW(reipl_fcp, lun, "0x%016llx\n", "%llx\n", + reipl_block_fcp->ipl_info.fcp.lun); + DEFINE_IPL_ATTR_RW(reipl_fcp, bootprog, "%lld\n", "%lld\n", + reipl_block_fcp->ipl_info.fcp.bootprog); +@@ -1323,9 +1323,9 @@ static struct shutdown_action __refdata + + /* FCP dump device attributes */ + +-DEFINE_IPL_ATTR_RW(dump_fcp, wwpn, "0x%016llx\n", "%016llx\n", ++DEFINE_IPL_ATTR_RW(dump_fcp, wwpn, "0x%016llx\n", "%llx\n", + dump_block_fcp->ipl_info.fcp.wwpn); +-DEFINE_IPL_ATTR_RW(dump_fcp, lun, "0x%016llx\n", "%016llx\n", ++DEFINE_IPL_ATTR_RW(dump_fcp, lun, "0x%016llx\n", "%llx\n", + dump_block_fcp->ipl_info.fcp.lun); + DEFINE_IPL_ATTR_RW(dump_fcp, bootprog, "%lld\n", "%lld\n", + dump_block_fcp->ipl_info.fcp.bootprog); diff --git a/queue-3.9/series b/queue-3.9/series new file mode 100644 index 00000000000..f7cbec1fa17 --- /dev/null +++ b/queue-3.9/series @@ -0,0 +1,4 @@ +s390-ipl-fix-fcp-wwpn-and-lun-format-strings-for-read.patch +arm-7762-1-kernel-fix-arm_dt_init_cpu_maps-to-skip-non-cpu-nodes.patch +arm-7755-1-handle-user-space-mapped-pages-in-flush_kernel_dcache_page.patch +arm-7772-1-fix-missing-flush_kernel_dcache_page-for-nommu.patch