From: Paul M. <le...@us...> - 2006-08-28 03:58:09
|
Update of /cvsroot/linuxsh/linux/arch/sh/mm In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25403/arch/sh/mm Modified Files: Kconfig init.c tlb-flush.c Log Message: Initial configurable vsyscall page support, only used for the signal trampoline return code at the moment.. Index: Kconfig =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/Kconfig,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Kconfig 9 Aug 2006 07:08:47 -0000 1.17 +++ Kconfig 28 Aug 2006 03:58:06 -0000 1.18 @@ -223,6 +223,19 @@ 32-bits through the SH-4A PMB. If this is not set, legacy 29-bit physical addressing will be used. +config VSYSCALL + bool "Support vsyscall page" + depends on MMU + default y + help + This will enable support for the kernel mapping a vDSO page + in process space, and subsequently handing down the entry point + to the libc through the ELF auxiliary vector. + + From the kernel side this is used for the signal trampoline. + For systems with an MMU that can afford to give up a page, + (the default value) say Y. + choice prompt "HugeTLB page size" depends on HUGETLB_PAGE && CPU_SH4 && MMU Index: init.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/init.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- init.c 8 Aug 2006 06:40:50 -0000 1.30 +++ init.c 28 Aug 2006 03:58:06 -0000 1.31 @@ -287,6 +287,9 @@ initsize >> 10); p3_cache_init(); + + /* Initialize the vDSO */ + vsyscall_init(); } void free_initmem(void) Index: tlb-flush.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/tlb-flush.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tlb-flush.c 31 Dec 2005 11:30:47 -0000 1.1 +++ tlb-flush.c 28 Aug 2006 03:58:06 -0000 1.2 @@ -14,12 +14,12 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) { - if (vma->vm_mm && vma->vm_mm->context != NO_CONTEXT) { + if (vma->vm_mm && vma->vm_mm->context.id != NO_CONTEXT) { unsigned long flags; unsigned long asid; unsigned long saved_asid = MMU_NO_ASID; - asid = vma->vm_mm->context & MMU_CONTEXT_ASID_MASK; + asid = vma->vm_mm->context.id & MMU_CONTEXT_ASID_MASK; page &= PAGE_MASK; local_irq_save(flags); @@ -39,20 +39,21 @@ { struct mm_struct *mm = vma->vm_mm; - if (mm->context != NO_CONTEXT) { + if (mm->context.id != NO_CONTEXT) { unsigned long flags; int size; local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; if (size > (MMU_NTLB_ENTRIES/4)) { /* Too many TLB to flush */ - mm->context = NO_CONTEXT; + mm->context.id = NO_CONTEXT; if (mm == current->mm) activate_context(mm); } else { - unsigned long asid = mm->context&MMU_CONTEXT_ASID_MASK; + unsigned long asid; unsigned long saved_asid = MMU_NO_ASID; + asid = mm->context.id & MMU_CONTEXT_ASID_MASK; start &= PAGE_MASK; end += (PAGE_SIZE - 1); end &= PAGE_MASK; @@ -81,9 +82,10 @@ if (size > (MMU_NTLB_ENTRIES/4)) { /* Too many TLB to flush */ flush_tlb_all(); } else { - unsigned long asid = init_mm.context&MMU_CONTEXT_ASID_MASK; + unsigned long asid; unsigned long saved_asid = get_asid(); + asid = init_mm.context.id & MMU_CONTEXT_ASID_MASK; start &= PAGE_MASK; end += (PAGE_SIZE - 1); end &= PAGE_MASK; @@ -101,11 +103,11 @@ { /* Invalidate all TLB of this process. */ /* Instead of invalidating each TLB, we get new MMU context. */ - if (mm->context != NO_CONTEXT) { + if (mm->context.id != NO_CONTEXT) { unsigned long flags; local_irq_save(flags); - mm->context = NO_CONTEXT; + mm->context.id = NO_CONTEXT; if (mm == current->mm) activate_context(mm); local_irq_restore(flags); |