~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/parisc/include/asm/tlbflush.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _PARISC_TLBFLUSH_H
  3 #define _PARISC_TLBFLUSH_H
  4 
  5 /* TLB flushing routines.... */
  6 
  7 #include <linux/mm.h>
  8 #include <linux/sched.h>
  9 #include <asm/mmu_context.h>
 10 
 11 extern void flush_tlb_all(void);
 12 extern void flush_tlb_all_local(void *);
 13 
 14 #define smp_flush_tlb_all()     flush_tlb_all()
 15 
 16 int __flush_tlb_range(unsigned long sid,
 17         unsigned long start, unsigned long end);
 18 
 19 #define flush_tlb_range(vma, start, end) \
 20         __flush_tlb_range((vma)->vm_mm->context.space_id, start, end)
 21 
 22 #define flush_tlb_kernel_range(start, end) \
 23         __flush_tlb_range(0, start, end)
 24 
 25 /*
 26  * flush_tlb_mm()
 27  *
 28  * The code to switch to a new context is NOT valid for processes
 29  * which play with the space id's.  Thus, we have to preserve the
 30  * space and just flush the entire tlb.  However, the compilers,
 31  * dynamic linker, etc, do not manipulate space id's, so there
 32  * could be a significant performance benefit in switching contexts
 33  * and not flushing the whole tlb.
 34  */
 35 
 36 static inline void flush_tlb_mm(struct mm_struct *mm)
 37 {
 38         BUG_ON(mm == &init_mm); /* Should never happen */
 39 
 40 #if 1 || defined(CONFIG_SMP)
 41         /* Except for very small threads, flushing the whole TLB is
 42          * faster than using __flush_tlb_range.  The pdtlb and pitlb
 43          * instructions are very slow because of the TLB broadcast.
 44          * It might be faster to do local range flushes on all CPUs
 45          * on PA 2.0 systems.
 46          */
 47         flush_tlb_all();
 48 #else
 49         /* FIXME: currently broken, causing space id and protection ids
 50          * to go out of sync, resulting in faults on userspace accesses.
 51          * This approach needs further investigation since running many
 52          * small applications (e.g., GCC testsuite) is faster on HP-UX.
 53          */
 54         if (mm) {
 55                 if (mm->context != 0)
 56                         free_sid(mm->context);
 57                 mm->context = alloc_sid();
 58                 if (mm == current->active_mm)
 59                         load_context(mm->context);
 60         }
 61 #endif
 62 }
 63 
 64 static inline void flush_tlb_page(struct vm_area_struct *vma,
 65         unsigned long addr)
 66 {
 67         purge_tlb_entries(vma->vm_mm, addr);
 68 }
 69 #endif
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php