Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c738ffa authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

uml: fold mmu_context_skas into mm_context



This patch folds mmu_context_skas into struct mm_context, changing all users
of these structures as needed.

Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fab95c55
Loading
Loading
Loading
Loading

arch/um/include/skas/mmu-skas.h

deleted100644 → 0
+0 −23
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
 * Licensed under the GPL
 */

#ifndef __SKAS_MMU_H
#define __SKAS_MMU_H

#include "mm_id.h"
#include "asm/ldt.h"

struct mmu_context_skas {
	struct mm_id id;
	unsigned long last_page_table;
#ifdef CONFIG_3_LEVEL_PGTABLES
	unsigned long last_pmd;
#endif
	uml_ldt_t ldt;
};

extern void __switch_mm(struct mm_id * mm_idp);

#endif
+1 −1
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ struct host_vm_op {
extern void force_flush_all(void);
extern void force_flush_all(void);
extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
                             unsigned long end_addr, int force,
                             unsigned long end_addr, int force,
			     int (*do_ops)(union mm_context *,
			     int (*do_ops)(struct mm_context *,
					   struct host_vm_op *, int, int,
					   struct host_vm_op *, int, int,
					   void **));
					   void **));
extern int flush_tlb_kernel_range_common(unsigned long start,
extern int flush_tlb_kernel_range_common(unsigned long start,
+15 −3
Original line number Original line Diff line number Diff line
@@ -7,10 +7,22 @@
#define __ARCH_UM_MMU_H
#define __ARCH_UM_MMU_H


#include "uml-config.h"
#include "uml-config.h"
#include "mmu-skas.h"
#include "mm_id.h"
#include "asm/ldt.h"


typedef union mm_context {
typedef struct mm_context {
	struct mmu_context_skas skas;
	struct mm_id id;
	unsigned long last_page_table;
#ifdef CONFIG_3_LEVEL_PGTABLES
	unsigned long last_pmd;
#endif
	struct uml_ldt ldt;
} mm_context_t;
} mm_context_t;


extern void __switch_mm(struct mm_id * mm_idp);

/* Avoid tangled inclusion with asm/ldt.h */
extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm);
extern void free_ldt(struct mm_context *mm);

#endif
#endif
+2 −2
Original line number Original line Diff line number Diff line
@@ -23,14 +23,14 @@ void flush_thread(void)


	arch_flush_thread(&current->thread.arch);
	arch_flush_thread(&current->thread.arch);


	ret = unmap(&current->mm->context.skas.id, 0, end, 1, &data);
	ret = unmap(&current->mm->context.id, 0, end, 1, &data);
	if (ret) {
	if (ret) {
		printk(KERN_ERR "flush_thread - clearing address space failed, "
		printk(KERN_ERR "flush_thread - clearing address space failed, "
		       "err = %d\n", ret);
		       "err = %d\n", ret);
		force_sig(SIGKILL, current);
		force_sig(SIGKILL, current);
	}
	}


	__switch_mm(&current->mm->context.skas.id);
	__switch_mm(&current->mm->context.id);
}
}


void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
+1 −1
Original line number Original line Diff line number Diff line
@@ -25,7 +25,7 @@ static void kill_off_processes(void)
			if(p->mm == NULL)
			if(p->mm == NULL)
				continue;
				continue;


			pid = p->mm->context.skas.id.u.pid;
			pid = p->mm->context.id.u.pid;
			os_kill_ptraced_process(pid, 1);
			os_kill_ptraced_process(pid, 1);
		}
		}
	}
	}
Loading