arc: fix arch_ API implementations on current CPU
All of these should be no-ops for the following reasons: 1. User threads cannot configure memory domains, only supervisor threads. 2. The scope of memory domains is user thread memory access, supervisor threads can access the entire memory map. Hence it's never required to reprogram the MPU on the current CPU when a memory domain API is called. This does not address the issue #27785 if a user thread in the domain is running on some other CPU. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
2222fa1426
commit
ed938d18b1
1 changed files with 4 additions and 26 deletions
|
@ -38,13 +38,7 @@ int arch_mem_domain_max_partitions_get(void)
|
|||
void arch_mem_domain_partition_remove(struct k_mem_domain *domain,
|
||||
uint32_t partition_id)
|
||||
{
|
||||
if (_current->mem_domain_info.mem_domain != domain) {
|
||||
return;
|
||||
}
|
||||
|
||||
arc_core_mpu_disable();
|
||||
arc_core_mpu_remove_mem_partition(domain, partition_id);
|
||||
arc_core_mpu_enable();
|
||||
/* No-op on this architecture */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -52,13 +46,7 @@ void arch_mem_domain_partition_remove(struct k_mem_domain *domain,
|
|||
*/
|
||||
void arch_mem_domain_thread_add(struct k_thread *thread)
|
||||
{
|
||||
if (_current != thread) {
|
||||
return;
|
||||
}
|
||||
|
||||
arc_core_mpu_disable();
|
||||
arc_core_mpu_configure_mem_domain(thread);
|
||||
arc_core_mpu_enable();
|
||||
/* No-op on this architecture */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -66,13 +54,7 @@ void arch_mem_domain_thread_add(struct k_thread *thread)
|
|||
*/
|
||||
void arch_mem_domain_destroy(struct k_mem_domain *domain)
|
||||
{
|
||||
if (_current->mem_domain_info.mem_domain != domain) {
|
||||
return;
|
||||
}
|
||||
|
||||
arc_core_mpu_disable();
|
||||
arc_core_mpu_remove_mem_domain(domain);
|
||||
arc_core_mpu_enable();
|
||||
/* No-op on this architecture */
|
||||
}
|
||||
|
||||
void arch_mem_domain_partition_add(struct k_mem_domain *domain,
|
||||
|
@ -83,11 +65,7 @@ void arch_mem_domain_partition_add(struct k_mem_domain *domain,
|
|||
|
||||
void arch_mem_domain_thread_remove(struct k_thread *thread)
|
||||
{
|
||||
if (_current != thread) {
|
||||
return;
|
||||
}
|
||||
|
||||
arch_mem_domain_destroy(thread->mem_domain_info.mem_domain);
|
||||
/* No-op on this architecture */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue