[kernel] r8391 - in dists/etch/linux-2.6/debian: .
patches/bugfix/mips patches/series
Martin Michlmayr
tbm at alioth.debian.org
Sat Mar 24 17:02:51 UTC 2007
Author: tbm
Date: Sat Mar 24 16:02:50 2007
New Revision: 8391
Added:
dists/etch/linux-2.6/debian/patches/bugfix/mips/flush_anon_page.patch
Modified:
dists/etch/linux-2.6/debian/changelog
dists/etch/linux-2.6/debian/patches/series/12
Log:
mips: Implement flush_anon_page() to fix data corruption issues
Modified: dists/etch/linux-2.6/debian/changelog
==============================================================================
--- dists/etch/linux-2.6/debian/changelog (original)
+++ dists/etch/linux-2.6/debian/changelog Sat Mar 24 16:02:50 2007
@@ -48,6 +48,10 @@
[ Bastian Blank ]
* xen: Fix highmem dma copy code. (closes: #415805)
+ [ Martin Michlmayr ]
+ * mips: Implement flush_anon_page() to fix data corruption issues
+ (Ralf Baechle).
+
-- Bastian Blank <waldi at debian.org> Sat, 24 Mar 2007 08:06:27 +0100
linux-2.6 (2.6.18.dfsg.1-11) unstable; urgency=low
Added: dists/etch/linux-2.6/debian/patches/bugfix/mips/flush_anon_page.patch
==============================================================================
--- (empty file)
+++ dists/etch/linux-2.6/debian/patches/bugfix/mips/flush_anon_page.patch Sat Mar 24 16:02:50 2007
@@ -0,0 +1,102 @@
+Author: Ralf Baechle <ralf at linux-mips.org> Fri Mar 23 21:36:37 2007 +0000
+Commit: 8f26705aefa297c71275e59fc46fbcadf80e0078
+Gitweb: http://www.linux-mips.org/g/linux/8f26705a
+Branch: linux-2.6.18-stable
+
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+(cherry picked from commit 2a58ce5784b74b09a4c306a60c3c3ba3f3376ee7)
+
+---
+
+ arch/mips/mm/cache.c | 16 +++++++++++++++-
+ arch/mips/mm/init.c | 4 ++--
+ include/asm-mips/cacheflush.h | 13 +++++++++++++
+ 3 files changed, 30 insertions(+), 3 deletions(-)
+
+diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
+index f94e300..6244b8d 100644
+--- a/arch/mips/mm/cache.c
++++ b/arch/mips/mm/cache.c
+@@ -3,7 +3,8 @@
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+- * Copyright (C) 1994 - 2003 by Ralf Baechle
++ * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf at linux-mips.org)
++ * Copyright (C) 2007 MIPS Technologies, Inc.
+ */
+ #include <linux/init.h>
+ #include <linux/kernel.h>
+@@ -89,6 +90,19 @@ void __flush_dcache_page(struct page *page)
+
+ EXPORT_SYMBOL(__flush_dcache_page);
+
++void __flush_anon_page(struct page *page, unsigned long vmaddr)
++{
++ if (pages_do_alias((unsigned long)page_address(page), vmaddr)) {
++ void *kaddr;
++
++ kaddr = kmap_coherent(page, vmaddr);
++ flush_data_cache_page((unsigned long)kaddr);
++ kunmap_coherent(kaddr);
++ }
++}
++
++EXPORT_SYMBOL(__flush_anon_page);
++
+ void __update_cache(struct vm_area_struct *vma, unsigned long address,
+ pte_t pte)
+ {
+diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
+index b3d3aee..965870b 100644
+--- a/arch/mips/mm/init.c
++++ b/arch/mips/mm/init.c
+@@ -130,7 +130,7 @@ static void __init kmap_coherent_init(void)
+ static inline void kmap_coherent_init(void) {}
+ #endif
+
+-static inline void *kmap_coherent(struct page *page, unsigned long addr)
++void *kmap_coherent(struct page *page, unsigned long addr)
+ {
+ enum fixed_addresses idx;
+ unsigned long vaddr, flags, entrylo;
+@@ -184,7 +184,7 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr)
+
+ #define UNIQUE_ENTRYHI(idx) (CKSEG0 + ((idx) << (PAGE_SHIFT + 1)))
+
+-static inline void kunmap_coherent(struct page *page)
++void kunmap_coherent(struct page *page)
+ {
+ #ifndef CONFIG_MIPS_MT_SMTC
+ unsigned int wired;
+diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
+index d10517c..d45c2bc 100644
+--- a/include/asm-mips/cacheflush.h
++++ b/include/asm-mips/cacheflush.h
+@@ -46,8 +46,18 @@ static inline void flush_dcache_page(struct page *page)
+ #define flush_dcache_mmap_lock(mapping) do { } while (0)
+ #define flush_dcache_mmap_unlock(mapping) do { } while (0)
+
++#define ARCH_HAS_FLUSH_ANON_PAGE
++static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr)
++{
++ extern void __flush_anon_page(struct page *, unsigned long);
++
++ if (cpu_has_dc_aliases && PageAnon(page))
++ __flush_anon_page(page, vmaddr);
++}
++
+ extern void (*__flush_icache_page)(struct vm_area_struct *vma,
+ struct page *page);
++
+ static inline void flush_icache_page(struct vm_area_struct *vma,
+ struct page *page)
+ {
+@@ -86,4 +96,7 @@ extern void (*flush_data_cache_page)(unsigned long addr);
+ /* Run kernel code uncached, useful for cache probing functions. */
+ unsigned long __init run_uncached(void *func);
+
++extern void *kmap_coherent(struct page *page, unsigned long addr);
++extern void kunmap_coherent(struct page *page);
++
+ #endif /* _ASM_CACHEFLUSH_H */
Modified: dists/etch/linux-2.6/debian/patches/series/12
==============================================================================
--- dists/etch/linux-2.6/debian/patches/series/12 (original)
+++ dists/etch/linux-2.6/debian/patches/series/12 Sat Mar 24 16:02:50 2007
@@ -7,3 +7,4 @@
+ bugfix/ipv6_getsockopt_sticky-null-opt.patch
+ bugfix/sparc/tcp-sendmsg-t12k-oops-fix.patch
+ bugfix/bnx2_tx_avail-off-by-1-fix.patch
++ bugfix/mips/flush_anon_page.patch
More information about the Kernel-svn-changes
mailing list