cregit-Linux how code gets into the kernel

Release 4.15 arch/riscv/include/asm/tlbflush.h

/*
 * Copyright (C) 2009 Chen Liqin <liqin.chen@sunplusct.com>
 * Copyright (C) 2012 Regents of the University of California
 *
 *   This program is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU General Public License
 *   as published by the Free Software Foundation, version 2.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 */

#ifndef _ASM_RISCV_TLBFLUSH_H

#define _ASM_RISCV_TLBFLUSH_H

#include <linux/mm_types.h>

/*
 * Flush entire local TLB.  'sfence.vma' implicitly fences with the instruction
 * cache as well, so a 'fence.i' is not necessary.
 */

static inline void local_flush_tlb_all(void) { __asm__ __volatile__ ("sfence.vma" : : : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
Palmer Dabbelt12100.00%1100.00%
Total12100.00%1100.00%

/* Flush one page from local TLB */
static inline void local_flush_tlb_page(unsigned long addr) { __asm__ __volatile__ ("sfence.vma %0" : : "r" (addr) : "memory"); }

Contributors

PersonTokensPropCommitsCommitProp
Palmer Dabbelt14100.00%1100.00%
Total14100.00%1100.00%

#ifndef CONFIG_SMP #define flush_tlb_all() local_flush_tlb_all() #define flush_tlb_page(vma, addr) local_flush_tlb_page(addr) #define flush_tlb_range(vma, start, end) local_flush_tlb_all() #else /* CONFIG_SMP */ #include <asm/sbi.h> #define flush_tlb_all() sbi_remote_sfence_vma(0, 0, -1) #define flush_tlb_page(vma, addr) flush_tlb_range(vma, addr, 0) #define flush_tlb_range(vma, start, end) \ sbi_remote_sfence_vma(0, start, (end) - (start)) #endif /* CONFIG_SMP */ /* Flush the TLB entries of the specified mm context */
static inline void flush_tlb_mm(struct mm_struct *mm) { flush_tlb_all(); }

Contributors

PersonTokensPropCommitsCommitProp
Palmer Dabbelt15100.00%1100.00%
Total15100.00%1100.00%

/* Flush a range of kernel pages */
static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) { flush_tlb_all(); }

Contributors

PersonTokensPropCommitsCommitProp
Palmer Dabbelt18100.00%1100.00%
Total18100.00%1100.00%

#endif /* _ASM_RISCV_TLBFLUSH_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Palmer Dabbelt13697.84%266.67%
Andrew Waterman32.16%133.33%
Total139100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.