mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-05-17 15:28:31 +00:00
[PATCH] uml: move headers to arch/um/include
The serial UML OS-abstraction layer patch (um/kernel dir). This moves skas headers to arch/um/include. Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
2c332a2513
commit
4abfbf4034
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __MM_ID_H
|
||||
#define __MM_ID_H
|
||||
|
||||
struct mm_id {
|
||||
union {
|
||||
int mm_fd;
|
||||
int pid;
|
||||
} u;
|
||||
unsigned long stack;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __SKAS_MMU_H
|
||||
#define __SKAS_MMU_H
|
||||
|
||||
#include "linux/config.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_skas(struct mm_id * mm_idp);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Overrides for Emacs so that we follow Linus's tabbing style.
|
||||
* Emacs will notice this stuff at the end of the file and automatically
|
||||
* adjust the settings for this buffer only. This must remain at the end
|
||||
* of the file.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Local variables:
|
||||
* c-file-style: "linux"
|
||||
* End:
|
||||
*/
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __MODE_SKAS_H__
|
||||
#define __MODE_SKAS_H__
|
||||
|
||||
#include <sysdep/ptrace.h>
|
||||
|
||||
extern unsigned long exec_regs[];
|
||||
extern unsigned long exec_fp_regs[];
|
||||
extern unsigned long exec_fpx_regs[];
|
||||
extern int have_fpx_regs;
|
||||
|
||||
extern void sig_handler_common_skas(int sig, void *sc_ptr);
|
||||
extern void halt_skas(void);
|
||||
extern void reboot_skas(void);
|
||||
extern void kill_off_processes_skas(void);
|
||||
extern int is_skas_winch(int pid, int fd, void *data);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Overrides for Emacs so that we follow Linus's tabbing style.
|
||||
* Emacs will notice this stuff at the end of the file and automatically
|
||||
* adjust the settings for this buffer only. This must remain at the end
|
||||
* of the file.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Local variables:
|
||||
* c-file-style: "linux"
|
||||
* End:
|
||||
*/
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __SKAS_MODE_KERN_H__
|
||||
#define __SKAS_MODE_KERN_H__
|
||||
|
||||
#include "linux/sched.h"
|
||||
#include "asm/page.h"
|
||||
#include "asm/ptrace.h"
|
||||
|
||||
extern void flush_thread_skas(void);
|
||||
extern void switch_to_skas(void *prev, void *next);
|
||||
extern void start_thread_skas(struct pt_regs *regs, unsigned long eip,
|
||||
unsigned long esp);
|
||||
extern int copy_thread_skas(int nr, unsigned long clone_flags,
|
||||
unsigned long sp, unsigned long stack_top,
|
||||
struct task_struct *p, struct pt_regs *regs);
|
||||
extern void release_thread_skas(struct task_struct *task);
|
||||
extern void initial_thread_cb_skas(void (*proc)(void *), void *arg);
|
||||
extern void init_idle_skas(void);
|
||||
extern void flush_tlb_kernel_range_skas(unsigned long start,
|
||||
unsigned long end);
|
||||
extern void flush_tlb_kernel_vm_skas(void);
|
||||
extern void __flush_tlb_one_skas(unsigned long addr);
|
||||
extern void flush_tlb_range_skas(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
extern void flush_tlb_mm_skas(struct mm_struct *mm);
|
||||
extern void force_flush_all_skas(void);
|
||||
extern long execute_syscall_skas(void *r);
|
||||
extern void before_mem_skas(unsigned long unused);
|
||||
extern unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out,
|
||||
unsigned long *task_size_out);
|
||||
extern int start_uml_skas(void);
|
||||
extern int external_pid_skas(struct task_struct *task);
|
||||
extern int thread_pid_skas(struct task_struct *task);
|
||||
|
||||
#define kmem_end_skas (host_task_size - 1024 * 1024)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Overrides for Emacs so that we follow Linus's tabbing style.
|
||||
* Emacs will notice this stuff at the end of the file and automatically
|
||||
* adjust the settings for this buffer only. This must remain at the end
|
||||
* of the file.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Local variables:
|
||||
* c-file-style: "linux"
|
||||
* End:
|
||||
*/
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __SKAS_PROC_MM_H
|
||||
#define __SKAS_PROC_MM_H
|
||||
|
||||
#define MM_MMAP 54
|
||||
#define MM_MUNMAP 55
|
||||
#define MM_MPROTECT 56
|
||||
#define MM_COPY_SEGMENTS 57
|
||||
|
||||
struct mm_mmap {
|
||||
unsigned long addr;
|
||||
unsigned long len;
|
||||
unsigned long prot;
|
||||
unsigned long flags;
|
||||
unsigned long fd;
|
||||
unsigned long offset;
|
||||
};
|
||||
|
||||
struct mm_munmap {
|
||||
unsigned long addr;
|
||||
unsigned long len;
|
||||
};
|
||||
|
||||
struct mm_mprotect {
|
||||
unsigned long addr;
|
||||
unsigned long len;
|
||||
unsigned int prot;
|
||||
};
|
||||
|
||||
struct proc_mm_op {
|
||||
int op;
|
||||
union {
|
||||
struct mm_mmap mmap;
|
||||
struct mm_munmap munmap;
|
||||
struct mm_mprotect mprotect;
|
||||
int copy_segments;
|
||||
} u;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Overrides for Emacs so that we follow Linus's tabbing style.
|
||||
* Emacs will notice this stuff at the end of the file and automatically
|
||||
* adjust the settings for this buffer only. This must remain at the end
|
||||
* of the file.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Local variables:
|
||||
* c-file-style: "linux"
|
||||
* End:
|
||||
*/
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __SKAS_H
|
||||
#define __SKAS_H
|
||||
|
||||
#include "mm_id.h"
|
||||
#include "sysdep/ptrace.h"
|
||||
|
||||
extern int userspace_pid[];
|
||||
extern int proc_mm, ptrace_faultinfo, ptrace_ldt;
|
||||
extern int skas_needs_stub;
|
||||
|
||||
extern void switch_threads(void *me, void *next);
|
||||
extern void thread_wait(void *sw, void *fb);
|
||||
extern void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr,
|
||||
void (*handler)(int));
|
||||
extern int start_idle_thread(void *stack, void *switch_buf_ptr,
|
||||
void **fork_buf_ptr);
|
||||
extern int user_thread(unsigned long stack, int flags);
|
||||
extern void userspace(union uml_pt_regs *regs);
|
||||
extern void new_thread_proc(void *stack, void (*handler)(int sig));
|
||||
extern void new_thread_handler(int sig);
|
||||
extern void handle_syscall(union uml_pt_regs *regs);
|
||||
extern int map(struct mm_id * mm_idp, unsigned long virt,
|
||||
unsigned long len, int r, int w, int x, int phys_fd,
|
||||
unsigned long long offset, int done, void **data);
|
||||
extern int unmap(struct mm_id * mm_idp, void *addr, unsigned long len,
|
||||
int done, void **data);
|
||||
extern int protect(struct mm_id * mm_idp, unsigned long addr,
|
||||
unsigned long len, int r, int w, int x, int done,
|
||||
void **data);
|
||||
extern void user_signal(int sig, union uml_pt_regs *regs, int pid);
|
||||
extern int new_mm(unsigned long stack);
|
||||
extern int start_userspace(unsigned long stub_stack);
|
||||
extern int copy_context_skas0(unsigned long stack, int pid);
|
||||
extern void get_skas_faultinfo(int pid, struct faultinfo * fi);
|
||||
extern long execute_syscall_skas(void *r);
|
||||
extern unsigned long current_stub_stack(void);
|
||||
extern long run_syscall_stub(struct mm_id * mm_idp,
|
||||
int syscall, unsigned long *args, long expected,
|
||||
void **addr, int done);
|
||||
extern long syscall_stub_data(struct mm_id * mm_idp,
|
||||
unsigned long *data, int data_count,
|
||||
void **addr, void **stub_addr);
|
||||
|
||||
#endif
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __STUB_DATA_H
|
||||
#define __STUB_DATA_H
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
struct stub_data {
|
||||
long offset;
|
||||
int fd;
|
||||
struct itimerval timer;
|
||||
long err;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __SKAS_UACCESS_H
|
||||
#define __SKAS_UACCESS_H
|
||||
|
||||
#include "asm/errno.h"
|
||||
|
||||
/* No SKAS-specific checking. */
|
||||
#define access_ok_skas(type, addr, size) 0
|
||||
|
||||
extern int copy_from_user_skas(void *to, const void __user *from, int n);
|
||||
extern int copy_to_user_skas(void __user *to, const void *from, int n);
|
||||
extern int strncpy_from_user_skas(char *dst, const char __user *src, int count);
|
||||
extern int __clear_user_skas(void __user *mem, int len);
|
||||
extern int clear_user_skas(void __user *mem, int len);
|
||||
extern int strnlen_user_skas(const void __user *str, int len);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Overrides for Emacs so that we follow Linus's tabbing style.
|
||||
* Emacs will notice this stuff at the end of the file and automatically
|
||||
* adjust the settings for this buffer only. This must remain at the end
|
||||
* of the file.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Local variables:
|
||||
* c-file-style: "linux"
|
||||
* End:
|
||||
*/
|
||||
Reference in New Issue
Block a user