kernel: mem_domain: Add an arch interface to configure memory domain
Add an architecure specfic code for the memory domain configuration. This is needed to support a memory domain API k_mem_domain_add_thread. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
parent
e1f4a002f3
commit
13ac4d4264
5 changed files with 25 additions and 14 deletions
|
@ -262,12 +262,18 @@ static inline void _x86_mem_domain_pages_update(struct k_mem_domain *mem_domain,
|
|||
|
||||
|
||||
/* Load the required parttions of the new incoming thread */
|
||||
void _x86_mmu_mem_domain_load(struct k_thread *thread)
|
||||
static inline void _x86_mmu_mem_domain_load(struct k_thread *thread)
|
||||
{
|
||||
_x86_mem_domain_pages_update(thread->mem_domain_info.mem_domain,
|
||||
X86_MEM_DOMAIN_SET_PAGES);
|
||||
}
|
||||
|
||||
/* Load the partitions of the thread. */
|
||||
void _arch_mem_domain_configure(struct k_thread *thread)
|
||||
{
|
||||
_x86_mmu_mem_domain_load(thread);
|
||||
}
|
||||
|
||||
/* Destroy or reset the mmu page tables when necessary.
|
||||
* Needed when either swap takes place or k_mem_domain_destroy is called.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue