Commit 7d35a8c9 authored by Kumar Gala's avatar Kumar Gala Committed by Ioannis Glaropoulos
Browse files

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: default avatarKumar Gala <kumar.gala@linaro.org>
parent 14f54132
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -917,20 +917,6 @@ int arch_mem_domain_init(struct k_mem_domain *domain)
	return 0;
}

void arch_mem_domain_destroy(struct k_mem_domain *domain)
{
	struct arm_mmu_ptables *domain_ptables = &domain->arch.ptables;
	k_spinlock_key_t key;

	MMU_DEBUG("%s\n", __func__);

	sys_slist_remove(&domain_list, NULL, &domain->arch.node);
	key = k_spin_lock(&xlat_lock);
	discard_table(domain_ptables->base_xlat_table, BASE_XLAT_LEVEL);
	domain_ptables->base_xlat_table = NULL;
	k_spin_unlock(&xlat_lock, key);
}

static void private_map(struct arm_mmu_ptables *ptables, const char *name,
			uintptr_t phys, uintptr_t virt, size_t size, uint32_t attrs)
{
+0 −12
Original line number Diff line number Diff line
@@ -503,18 +503,6 @@ void arch_mem_domain_thread_add(struct k_thread *thread)
	}
}

void arch_mem_domain_destroy(struct k_mem_domain *domain)
{
	sys_dnode_t *node, *next_node;
	struct k_thread *thread;

	SYS_DLIST_FOR_EACH_NODE_SAFE(&domain->mem_domain_q, node, next_node) {
		thread = CONTAINER_OF(node, struct k_thread, mem_domain_info);

		arch_mem_domain_thread_remove(thread);
	}
}

void arch_mem_domain_partition_add(struct k_mem_domain *domain,
				    uint32_t partition_id)
{
+0 −10
Original line number Diff line number Diff line
@@ -1389,11 +1389,6 @@ void arch_mem_domain_thread_add(struct k_thread *thread)
void arch_mem_domain_thread_remove(struct k_thread *thread)
{

}

void arch_mem_domain_destroy(struct k_mem_domain *domain)
{

}
#else
/* 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,
		     partition->size);
}

void arch_mem_domain_destroy(struct k_mem_domain *domain)
{
	/* No-op, this is eventually getting removed in 2.5 */
}

/* Called on thread exit or when moving it to a different memory domain */
void arch_mem_domain_thread_remove(struct k_thread *thread)
{
+0 −2
Original line number Diff line number Diff line
@@ -824,8 +824,6 @@ on MMU systems and uncommon on MPU systems:

* :c:func:`arch_mem_domain_partition_remove`

* :c:func:`arch_mem_domain_destroy`

Please see the doxygen documentation of these APIs for details.

In addition to implementing these APIs, there are some other tasks as well:
+0 −13
Original line number Diff line number Diff line
@@ -609,19 +609,6 @@ void arch_mem_domain_partition_remove(struct k_mem_domain *domain,
 */
void arch_mem_domain_partition_add(struct k_mem_domain *domain,
				   uint32_t partition_id);

/**
 * @brief Remove the memory domain
 *
 * Architecture-specific hook to manage internal data structures or hardware
 * state when a memory domain has been destroyed.
 *
 * Thread assignments to the memory domain are only cleared after this function
 * runs.
 *
 * @param domain The memory domain structure which needs to be deleted.
 */
void arch_mem_domain_destroy(struct k_mem_domain *domain);
#endif /* CONFIG_ARCH_MEM_DOMAIN_SYNCHRONOUS_API */

/**
Loading