On architectures with hardware broadcasting of TLB invalidation messages , it makes sense to reduce the range of the mmu_gather structure when unmapping page ranges based on the dirty address information passed to tlb_remove_tlb_entry. arm64 already does this by directly manipulating the start/end fields of the gather structure, but this confuses the generic code which does not expect these fields to change and can end up calculating invalid, negative ranges when forcing a flush in zap_pte_range. This patch moves the minimal range calculation out of the arm64 code and into the generic implementation, simplifying zap_pte_range in the process (which no longer needs to care about start/end, since they will point to the appropriate ranges already). With the range being tracked by core code, the need_flush flag is dropped in favour of checking that the end of the range has actually been set. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk> Cc: Michal Simek <monstr@monstr.eu> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			714 B
			
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			714 B
			
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
 | 
						|
 * Copyright (C) 2008-2009 PetaLogix
 | 
						|
 * Copyright (C) 2006 Atmark Techno, Inc.
 | 
						|
 *
 | 
						|
 * This file is subject to the terms and conditions of the GNU General Public
 | 
						|
 * License. See the file "COPYING" in the main directory of this archive
 | 
						|
 * for more details.
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef _ASM_MICROBLAZE_TLB_H
 | 
						|
#define _ASM_MICROBLAZE_TLB_H
 | 
						|
 | 
						|
#define tlb_flush(tlb)	flush_tlb_mm((tlb)->mm)
 | 
						|
 | 
						|
#include <linux/pagemap.h>
 | 
						|
 | 
						|
#ifdef CONFIG_MMU
 | 
						|
#define tlb_start_vma(tlb, vma)		do { } while (0)
 | 
						|
#define tlb_end_vma(tlb, vma)		do { } while (0)
 | 
						|
#define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0)
 | 
						|
#endif
 | 
						|
 | 
						|
#include <asm-generic/tlb.h>
 | 
						|
 | 
						|
#endif /* _ASM_MICROBLAZE_TLB_H */
 |