From bf3abfa9f63baa79568e9fce29d08ce3f9d8317c Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 12 Mar 2002 00:35:07 +0000 Subject: [PATCH] Update ARM tree for 2.5.6 --- arch/arm/mm/fault-armv.c | 8 +++++--- include/asm-arm/proc-armv/cache.h | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 22428e7d98b4..c6efcd2c9896 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c @@ -181,7 +181,7 @@ bad_pmd: static void make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page) { - struct vm_area_struct *mpnt; + struct list_head *l; struct mm_struct *mm = vma->vm_mm; unsigned long pgoff = (addr - vma->vm_start) >> PAGE_SHIFT; int aliases = 0; @@ -191,10 +191,12 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page) * space, then we need to handle them specially to maintain * cache coherency. */ - for (mpnt = page->mapping->i_mmap_shared; mpnt; - mpnt = mpnt->vm_next_share) { + list_for_each(l, &page->mapping->i_mmap_shared) { + struct vm_area_struct *mpnt; unsigned long off; + mpnt = list_entry(l, struct vm_area_struct, shared); + /* * If this VMA is not in our MM, we can ignore it. * Note that we intentionally don't mask out the VMA diff --git a/include/asm-arm/proc-armv/cache.h b/include/asm-arm/proc-armv/cache.h index c73f03773594..a35cf1c83313 100644 --- a/include/asm-arm/proc-armv/cache.h +++ b/include/asm-arm/proc-armv/cache.h @@ -1,7 +1,7 @@ /* * linux/include/asm-arm/proc-armv/cache.h * - * Copyright (C) 1999-2001 Russell King + * Copyright (C) 1999-2002 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -134,7 +134,8 @@ static __inline__ void flush_page_to_ram(struct page *page) #define clean_dcache_range(_s,_e) cpu_dcache_clean_range((_s),(_e)) #define flush_dcache_range(_s,_e) cpu_cache_clean_invalidate_range((_s),(_e),0) -#define mapping_mapped(map) ((map)->i_mmap || (map)->i_mmap_shared) +#define mapping_mapped(map) (!list_empty(&(map)->i_mmap) || \ + !list_empty(&(map)->i_mmap_shared)) /* * flush_dcache_page is used when the kernel has written to the page @@ -204,7 +205,7 @@ static inline void flush_icache_page(struct vm_area_struct *vma, struct page *pa * TLB Management * ============== * - * The arch/arm/mm/tlb-*.S files implement this methods. + * The arch/arm/mm/tlb-*.S files implement these methods. * * The TLB specific code is expected to perform whatever tests it * needs to determine if it should invalidate the TLB for each -- 2.39.5