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

TOMOYO Linux Cross Reference
Linux/arch/hexagon/include/asm/mmu_context.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-only */
  2 /*
  3  * MM context support for the Hexagon architecture
  4  *
  5  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  6  */
  7 
  8 #ifndef _ASM_MMU_CONTEXT_H
  9 #define _ASM_MMU_CONTEXT_H
 10 
 11 #include <linux/mm_types.h>
 12 
 13 #include <asm/setup.h>
 14 #include <asm/page.h>
 15 #include <asm/pgalloc.h>
 16 #include <asm/mem-layout.h>
 17 
 18 /*
 19  * VM port hides all TLB management, so "lazy TLB" isn't very
 20  * meaningful.  Even for ports to architectures with visble TLBs,
 21  * this is almost invariably a null function.
 22  *
 23  * mm->context is set up by pgd_alloc, so no init_new_context required.
 24  */
 25 
 26 /*
 27  *  Switch active mm context
 28  */
 29 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 30                                 struct task_struct *tsk)
 31 {
 32         int l1;
 33 
 34         /*
 35          * For virtual machine, we have to update system map if it's been
 36          * touched.
 37          */
 38         if (next->context.generation < prev->context.generation) {
 39                 for (l1 = MIN_KERNEL_SEG; l1 <= max_kernel_seg; l1++)
 40                         next->pgd[l1] = init_mm.pgd[l1];
 41 
 42                 next->context.generation = prev->context.generation;
 43         }
 44 
 45         __vmnewmap((void *)next->context.ptbase);
 46 }
 47 
 48 /*
 49  *  Activate new memory map for task
 50  */
 51 #define activate_mm activate_mm
 52 static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
 53 {
 54         unsigned long flags;
 55 
 56         local_irq_save(flags);
 57         switch_mm(prev, next, current_thread_info()->task);
 58         local_irq_restore(flags);
 59 }
 60 
 61 /*  Generic hooks for arch_dup_mmap and arch_exit_mmap  */
 62 #include <asm-generic/mm_hooks.h>
 63 
 64 #include <asm-generic/mmu_context.h>
 65 
 66 #endif
 67 

~ [ 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