static int add_mmap(unsigned long virt, unsigned long phys, unsigned long len,
unsigned int prot, struct host_vm_op *ops, int *index,
- int last_filled, union mm_context *mmu, void **flush,
- int (*do_ops)(union mm_context *, struct host_vm_op *,
+ int last_filled, struct mm_context *mmu, void **flush,
+ int (*do_ops)(struct mm_context *, struct host_vm_op *,
int, int, void **))
{
__u64 offset;
static int add_munmap(unsigned long addr, unsigned long len,
struct host_vm_op *ops, int *index, int last_filled,
- union mm_context *mmu, void **flush,
- int (*do_ops)(union mm_context *, struct host_vm_op *,
+ struct mm_context *mmu, void **flush,
+ int (*do_ops)(struct mm_context *, struct host_vm_op *,
int, int, void **))
{
struct host_vm_op *last;
static int add_mprotect(unsigned long addr, unsigned long len,
unsigned int prot, struct host_vm_op *ops, int *index,
- int last_filled, union mm_context *mmu, void **flush,
- int (*do_ops)(union mm_context *, struct host_vm_op *,
+ int last_filled, struct mm_context *mmu, void **flush,
+ int (*do_ops)(struct mm_context *, struct host_vm_op *,
int, int, void **))
{
struct host_vm_op *last;
static inline int update_pte_range(pmd_t *pmd, unsigned long addr,
unsigned long end, struct host_vm_op *ops,
int last_op, int *op_index, int force,
- union mm_context *mmu, void **flush,
- int (*do_ops)(union mm_context *,
+ struct mm_context *mmu, void **flush,
+ int (*do_ops)(struct mm_context *,
struct host_vm_op *, int, int,
void **))
{
static inline int update_pmd_range(pud_t *pud, unsigned long addr,
unsigned long end, struct host_vm_op *ops,
int last_op, int *op_index, int force,
- union mm_context *mmu, void **flush,
- int (*do_ops)(union mm_context *,
+ struct mm_context *mmu, void **flush,
+ int (*do_ops)(struct mm_context *,
struct host_vm_op *, int, int,
void **))
{
static inline int update_pud_range(pgd_t *pgd, unsigned long addr,
unsigned long end, struct host_vm_op *ops,
int last_op, int *op_index, int force,
- union mm_context *mmu, void **flush,
- int (*do_ops)(union mm_context *,
+ struct mm_context *mmu, void **flush,
+ int (*do_ops)(struct mm_context *,
struct host_vm_op *, int, int,
void **))
{
void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
unsigned long end_addr, int force,
- int (*do_ops)(union mm_context *, struct host_vm_op *,
+ int (*do_ops)(struct mm_context *, struct host_vm_op *,
int, int, void **))
{
pgd_t *pgd;
- union mm_context *mmu = &mm->context;
+ struct mm_context *mmu = &mm->context;
struct host_vm_op ops[1];
unsigned long addr = start_addr, next;
int ret = 0, last_op = ARRAY_SIZE(ops) - 1, op_index = -1;
w = 0;
}
- mm_id = &mm->context.skas.id;
+ mm_id = &mm->context.id;
prot = ((r ? UM_PROT_READ : 0) | (w ? UM_PROT_WRITE : 0) |
(x ? UM_PROT_EXEC : 0));
if (pte_newpage(*pte)) {
flush_tlb_kernel_range_common(addr, addr + PAGE_SIZE);
}
-static int do_ops(union mm_context *mmu, struct host_vm_op *ops, int last,
+static int do_ops(struct mm_context *mmu, struct host_vm_op *ops, int last,
int finished, void **flush)
{
struct host_vm_op *op;
op = &ops[i];
switch(op->type) {
case MMAP:
- ret = map(&mmu->skas.id, op->u.mmap.addr,
- op->u.mmap.len, op->u.mmap.prot,
- op->u.mmap.fd, op->u.mmap.offset, finished,
- flush);
+ ret = map(&mmu->id, op->u.mmap.addr, op->u.mmap.len,
+ op->u.mmap.prot, op->u.mmap.fd,
+ op->u.mmap.offset, finished, flush);
break;
case MUNMAP:
- ret = unmap(&mmu->skas.id, op->u.munmap.addr,
+ ret = unmap(&mmu->id, op->u.munmap.addr,
op->u.munmap.len, finished, flush);
break;
case MPROTECT:
- ret = protect(&mmu->skas.id, op->u.mprotect.addr,
+ ret = protect(&mmu->id, op->u.mprotect.addr,
op->u.mprotect.len, op->u.mprotect.prot,
finished, flush);
break;
* Note: I'm unsure: should interrupts be disabled here?
*/
if (!current->active_mm || current->active_mm == &init_mm ||
- mm_idp != ¤t->active_mm->context.skas.id)
+ mm_idp != ¤t->active_mm->context.id)
__switch_mm(mm_idp);
}
* PTRACE_LDT possible to implement.
*/
if (current->active_mm && current->active_mm != &init_mm &&
- mm_idp != ¤t->active_mm->context.skas.id)
- __switch_mm(¤t->active_mm->context.skas.id);
+ mm_idp != ¤t->active_mm->context.id)
+ __switch_mm(¤t->active_mm->context.id);
}
return res;
{
int i, err = 0;
unsigned long size;
- uml_ldt_t * ldt = ¤t->mm->context.skas.ldt;
+ uml_ldt_t * ldt = ¤t->mm->context.ldt;
if (!ldt->entry_count)
goto out;
static int write_ldt(void __user * ptr, unsigned long bytecount, int func)
{
- uml_ldt_t * ldt = ¤t->mm->context.skas.ldt;
- struct mm_id * mm_idp = ¤t->mm->context.skas.id;
+ uml_ldt_t * ldt = ¤t->mm->context.ldt;
+ struct mm_id * mm_idp = ¤t->mm->context.id;
int i, err;
struct user_desc ldt_info;
struct ldt_entry entry0, *ldt_p;
free_pages((unsigned long)ldt, order);
}
-long init_new_ldt(struct mmu_context_skas * new_mm,
- struct mmu_context_skas * from_mm)
+long init_new_ldt(struct mm_context *new_mm, struct mm_context *from_mm)
{
struct user_desc desc;
short * num_p;
}
-void free_ldt(struct mmu_context_skas * mm)
+void free_ldt(struct mm_context *mm)
{
int i;