Address space creation/deletion implemented

- Proper releasing of user pmd and pgds when a space is not used.
- Proper releasing of task, space ids.

- At occasions a starting thread gets bogus SPSR, this needs investigating.
- At a very rare occasion arch_setup_new_thread() had a kernel data abort during
  register copying from one task to another. Needs investigating.
This commit is contained in:
Bahadir Balban
2009-05-11 12:10:12 +03:00
parent 7415546410
commit 1b04037034
7 changed files with 95 additions and 55 deletions

View File

@@ -138,6 +138,7 @@ void add_section_mapping_init(unsigned int paddr, unsigned int vaddr,
unsigned int size, unsigned int flags);
struct address_space;
int delete_page_tables(struct address_space *space);
int copy_user_tables(struct address_space *new, struct address_space *orig);
pgd_table_t *copy_page_tables(pgd_table_t *from);
void remap_as_pages(void *vstart, void *vend);

View File

@@ -56,8 +56,8 @@ struct ktcb {
/* Thread information */
l4id_t tid; /* Global thread id */
l4id_t spid; /* Global space id */
l4id_t tgid; /* Global thread group id */
/* See space for space id */
/* Flags to indicate various task status */
unsigned int flags;
@@ -120,7 +120,6 @@ union ktcb_union {
static inline void set_task_ids(struct ktcb *task, struct task_ids *ids)
{
task->tid = ids->tid;
task->spid = ids->spid;
task->tgid = ids->tgid;
}
@@ -134,6 +133,7 @@ extern struct id_pool *space_id_pool;
extern struct id_pool *tgroup_id_pool;
struct ktcb *tcb_find(l4id_t tid);
struct ktcb *tcb_find_by_space(l4id_t tid);
void tcb_add(struct ktcb *tcb);
void tcb_remove(struct ktcb *tcb);