Skip to content

Commit 7d35a8c

Browse files
galakioannisg
authored andcommitted
kernel: remove arch_mem_domain_destroy
The only user of arch_mem_domain_destroy was the deprecated k_mem_domain_destroy function which has now been removed. So remove arch_mem_domain_destroy as well. Signed-off-by: Kumar Gala <[email protected]>
1 parent 14f5413 commit 7d35a8c

File tree

6 files changed

+0
-52
lines changed

6 files changed

+0
-52
lines changed

arch/arm/core/aarch64/mmu/arm_mmu.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -917,20 +917,6 @@ int arch_mem_domain_init(struct k_mem_domain *domain)
917917
return 0;
918918
}
919919

920-
void arch_mem_domain_destroy(struct k_mem_domain *domain)
921-
{
922-
struct arm_mmu_ptables *domain_ptables = &domain->arch.ptables;
923-
k_spinlock_key_t key;
924-
925-
MMU_DEBUG("%s\n", __func__);
926-
927-
sys_slist_remove(&domain_list, NULL, &domain->arch.node);
928-
key = k_spin_lock(&xlat_lock);
929-
discard_table(domain_ptables->base_xlat_table, BASE_XLAT_LEVEL);
930-
domain_ptables->base_xlat_table = NULL;
931-
k_spin_unlock(&xlat_lock, key);
932-
}
933-
934920
static void private_map(struct arm_mmu_ptables *ptables, const char *name,
935921
uintptr_t phys, uintptr_t virt, size_t size, uint32_t attrs)
936922
{

arch/riscv/core/pmp/core_pmp.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -503,18 +503,6 @@ void arch_mem_domain_thread_add(struct k_thread *thread)
503503
}
504504
}
505505

506-
void arch_mem_domain_destroy(struct k_mem_domain *domain)
507-
{
508-
sys_dnode_t *node, *next_node;
509-
struct k_thread *thread;
510-
511-
SYS_DLIST_FOR_EACH_NODE_SAFE(&domain->mem_domain_q, node, next_node) {
512-
thread = CONTAINER_OF(node, struct k_thread, mem_domain_info);
513-
514-
arch_mem_domain_thread_remove(thread);
515-
}
516-
}
517-
518506
void arch_mem_domain_partition_add(struct k_mem_domain *domain,
519507
uint32_t partition_id)
520508
{

arch/x86/core/x86_mmu.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,11 +1389,6 @@ void arch_mem_domain_thread_add(struct k_thread *thread)
13891389
void arch_mem_domain_thread_remove(struct k_thread *thread)
13901390
{
13911391

1392-
}
1393-
1394-
void arch_mem_domain_destroy(struct k_mem_domain *domain)
1395-
{
1396-
13971392
}
13981393
#else
13991394
/* Memory domains each have a set of page tables assigned to them */
@@ -1621,11 +1616,6 @@ void arch_mem_domain_partition_remove(struct k_mem_domain *domain,
16211616
partition->size);
16221617
}
16231618

1624-
void arch_mem_domain_destroy(struct k_mem_domain *domain)
1625-
{
1626-
/* No-op, this is eventually getting removed in 2.5 */
1627-
}
1628-
16291619
/* Called on thread exit or when moving it to a different memory domain */
16301620
void arch_mem_domain_thread_remove(struct k_thread *thread)
16311621
{

doc/guides/porting/arch.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,6 @@ on MMU systems and uncommon on MPU systems:
824824

825825
* :c:func:`arch_mem_domain_partition_remove`
826826

827-
* :c:func:`arch_mem_domain_destroy`
828-
829827
Please see the doxygen documentation of these APIs for details.
830828

831829
In addition to implementing these APIs, there are some other tasks as well:

include/sys/arch_interface.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -609,19 +609,6 @@ void arch_mem_domain_partition_remove(struct k_mem_domain *domain,
609609
*/
610610
void arch_mem_domain_partition_add(struct k_mem_domain *domain,
611611
uint32_t partition_id);
612-
613-
/**
614-
* @brief Remove the memory domain
615-
*
616-
* Architecture-specific hook to manage internal data structures or hardware
617-
* state when a memory domain has been destroyed.
618-
*
619-
* Thread assignments to the memory domain are only cleared after this function
620-
* runs.
621-
*
622-
* @param domain The memory domain structure which needs to be deleted.
623-
*/
624-
void arch_mem_domain_destroy(struct k_mem_domain *domain);
625612
#endif /* CONFIG_ARCH_MEM_DOMAIN_SYNCHRONOUS_API */
626613

627614
/**

kernel/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ config ARCH_MEM_DOMAIN_SYNCHRONOUS_API
753753
arch_mem_domain_thread_remove
754754
arch_mem_domain_partition_remove
755755
arch_mem_domain_partition_add
756-
arch_mem_domain_destroy
757756

758757
It's important to note that although supervisor threads can be
759758
members of memory domains, they have no implications on supervisor

0 commit comments

Comments
 (0)