From: Paul M. <le...@us...> - 2006-08-28 03:58:10
|
Update of /cvsroot/linuxsh/linux/include/asm-sh In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25403/include/asm-sh Modified Files: elf.h mmu.h mmu_context.h page.h processor.h Added Files: auxvec.h Log Message: Initial configurable vsyscall page support, only used for the signal trampoline return code at the moment.. --- NEW FILE: auxvec.h --- #ifndef __ASM_SH_AUXVEC_H #define __ASM_SH_AUXVEC_H /* * Architecture-neutral AT_ values in 0-17, leave some room * for more of them. */ #ifdef CONFIG_VSYSCALL /* * Only define this in the vsyscall case, the entry point to * the vsyscall page gets placed here. The kernel will attempt * to build a gate VMA we don't care about otherwise.. */ #define AT_SYSINFO_EHDR 33 #endif #endif /* __ASM_SH_AUXVEC_H */ Index: elf.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/elf.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- elf.h 9 Aug 2006 03:53:04 -0000 1.6 +++ elf.h 28 Aug 2006 03:58:07 -0000 1.7 @@ -121,4 +121,24 @@ #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) #endif +#ifdef CONFIG_VSYSCALL +/* vDSO has arch_setup_additional_pages */ +#define ARCH_HAS_SETUP_ADDITIONAL_PAGES +struct linux_binprm; +extern int arch_setup_additional_pages(struct linux_binprm *bprm, + int executable_stack); + +extern unsigned int vdso_enabled; +extern void __kernel_vsyscall; + +#define VDSO_BASE ((unsigned long)current->mm->context.vdso) +#define VDSO_SYM(x) (VDSO_BASE + (unsigned long)(x)) + +#define ARCH_DLINFO \ +do { \ + if (vdso_enabled) \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ +} while (0) +#endif /* CONFIG_VSYSCALL */ + #endif /* __ASM_SH_ELF_H */ Index: mmu.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/mmu.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mmu.h 19 Jul 2006 14:50:21 -0000 1.5 +++ mmu.h 28 Aug 2006 03:58:07 -0000 1.6 @@ -11,7 +11,12 @@ #else /* Default "unsigned long" context */ -typedef unsigned long mm_context_t; +typedef unsigned long mm_context_id_t; + +typedef struct { + mm_context_id_t id; + void *vdso; +} mm_context_t; #endif /* CONFIG_MMU */ Index: mmu_context.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/mmu_context.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- mmu_context.h 20 Oct 2005 22:48:05 -0000 1.12 +++ mmu_context.h 28 Aug 2006 03:58:07 -0000 1.13 @@ -49,7 +49,7 @@ unsigned long mc = mmu_context_cache; /* Check if we have old version of context. */ - if (((mm->context ^ mc) & MMU_CONTEXT_VERSION_MASK) == 0) + if (((mm->context.id ^ mc) & MMU_CONTEXT_VERSION_MASK) == 0) /* It's up to date, do nothing */ return; @@ -68,7 +68,7 @@ if (!mc) mmu_context_cache = mc = MMU_CONTEXT_FIRST_VERSION; } - mm->context = mc; + mm->context.id = mc; } /* @@ -78,7 +78,7 @@ static __inline__ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { - mm->context = NO_CONTEXT; + mm->context.id = NO_CONTEXT; return 0; } @@ -123,7 +123,7 @@ static __inline__ void activate_context(struct mm_struct *mm) { get_mmu_context(mm); - set_asid(mm->context & MMU_CONTEXT_ASID_MASK); + set_asid(mm->context.id & MMU_CONTEXT_ASID_MASK); } /* MMU_TTB can be used for optimizing the fault handling. Index: page.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/page.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- page.h 23 Aug 2006 05:13:54 -0000 1.19 +++ page.h 28 Aug 2006 03:58:07 -0000 1.20 @@ -120,4 +120,9 @@ #include <asm-generic/memory_model.h> #include <asm-generic/page.h> +/* vDSO support */ +#ifdef CONFIG_VSYSCALL +#define __HAVE_ARCH_GATE_AREA +#endif + #endif /* __ASM_SH_PAGE_H */ Index: processor.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/processor.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- processor.h 10 Aug 2006 09:58:50 -0000 1.42 +++ processor.h 28 Aug 2006 03:58:07 -0000 1.43 @@ -276,5 +276,11 @@ #define prefetchw(x) prefetch(x) #endif +#ifdef CONFIG_VSYSCALL +extern int vsyscall_init(void); +#else +#define vsyscall_init() do { } while (0) +#endif + #endif /* __KERNEL__ */ #endif /* __ASM_SH_PROCESSOR_H */ |