return a;
}
+PUBLIC static inline
+Mword
+Mem_space::is_full_flush(unsigned char rights)
+{
+ return rights & L4_fpage::RX;
+}
+
PUBLIC static inline
unsigned char
Mem_space::xlate_flush_result(Mword attribs)
// Mapping utilities
-
PUBLIC inline NEEDS["mem_unit.h"]
void
Mem_space::tlb_flush(bool force = false)
{
if (!Have_asids)
Mem_unit::tlb_flush();
- else if (force && c_asid())
+ else if (force && c_asid() != ~0UL)
Mem_unit::tlb_flush(c_asid());
// else do nothing, we manage ASID local flushes in v_* already
// Mem_unit::tlb_flush();
}
+PUBLIC static inline NEEDS["mem_unit.h"]
+void
+Mem_space::tlb_flush_spaces(bool all, Mem_space *s1, Mem_space *s2)
+{
+ if (all || !Have_asids)
+ Mem_unit::tlb_flush();
+ else
+ {
+ if (s1)
+ s1->tlb_flush(true);
+ if (s2)
+ s2->tlb_flush(true);
+ }
+}
+
+
PUBLIC inline
void
Mem_space::enable_reverse_lookup()
return Page_table::current();
}
-IMPLEMENT inline NEEDS ["kmem.h", Mem_space::c_asid, Mem_space::need_tlb_flush]
+IMPLEMENT inline NEEDS ["kmem.h", Mem_space::c_asid]
void Mem_space::switchin_context(Mem_space *from)
{
#if 0
if (from != this)
make_current();
- else if (need_tlb_flush())
+ else
tlb_flush(true);
#if 0
_dir->invalidate((void*)Kmem::ipc_window(0), Config::SUPERPAGE_SIZE * 4,
Mem_space::Mem_space (Ram_quota *q, Dir_type* pdir)
: _quota(q), _dir (pdir)
{
- asid(0);
+ asid(~0UL);
enable_reverse_lookup ();
}
PRIVATE inline static
unsigned long
Mem_space::next_asid(unsigned cpu)
-{
- unsigned long ret = _next_free_asid.cpu(cpu)++;
- return ret;
-}
+{ return _next_free_asid.cpu(cpu)++; }
PRIVATE inline NEEDS[Mem_space::next_asid]
unsigned long