1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

disable TLB flush => no required in a single-address space OS

This commit is contained in:
Stefan Lankes 2016-05-14 09:20:43 +02:00
parent 3c79ad7aa0
commit 672eada76e

View file

@ -588,13 +588,16 @@ int ipi_tlb_flush(void);
*/
static inline void flush_tlb(void)
{
/* single-address space OS => no TLB flush required */
#if 0
size_t val = read_cr3();
if (val)
write_cr3(val);
#if MAX_CORES > 1
//ipi_tlb_flush();
ipi_tlb_flush();
#endif
#endif
}
@ -603,10 +606,13 @@ static inline void flush_tlb(void)
*/
static inline void tlb_flush_one_page(size_t addr)
{
/* single-address space OS => no TLB flush required */
#if 0
asm volatile("invlpg (%0)" : : "r"(addr) : "memory");
#if MAX_CORES > 1
//ipi_tlb_flush();
ipi_tlb_flush();
#endif
#endif
}