summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/uaccess.h
Commit message (Collapse)AuthorAgeFilesLines
* MIPS: Unify memcpy.S and memcpy-inatomic.SDavid Daney2012-07-231-3/+3
| | | | | | | | | | | | We can save the 451 lines of code that comprise memcpy-inatomic.S at the expense of a single instruction in the memcpy prolog. We also use an additional register (t6), so this may cause increased register pressure in some places as well. But I think the reduced maintenance burden, of not having two nearly identical implementations, makes it worth it. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: Make TASK_SIZE reflect proper size for both 32 and 64 bit processes.David Daney2010-10-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TASK_SIZE macro should reflect the size of a user process virtual address space. Previously for 64-bit kernels, this was not the case. The immediate cause of pain was in hugetlbfs/inode.c:hugetlb_get_unmapped_area() where 32-bit processes trying to mmap a huge page would be served a page with an address outside of the 32-bit address range. But there are other uses of TASK_SIZE in the kernel as well that would like an accurate value. The new definition is nice because it now makes TASK_SIZE and TASK_SIZE_OF() yield the same value for any given process. For 32-bit kernels there should be no change, although I did factor out some code in asm/processor.h that became identical for the 32-bit and 64-bit cases. __UA_LIMIT is now set to ~((1 << SEGBITS) - 1) for 64-bit kernels. This should eliminate the possibility of getting a AddressErrorException in the kernel for addresses that pass the access_ok() test. With the patch applied, I can still run o32, n32 and n64 processes, and have an o32 shell fork/exec both n32 and n64 processes. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1701/
* MIPS: Fix sparse warning in incompatiable argument type of clear_user.Wu Zhangjin2009-05-221-1/+1
| | | | | | | | | The type of the second argument of access_ok should be (void __user *). The unnecessary conversion of the clear_user address argument was causing sparse to emit warnings on the __chk_user_ptr check. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: uaccess: Switch lock annotations to might_fault().Ralf Baechle2009-05-141-16/+21
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: Make uaccess.h slightly more sparse friendly.Ralf Baechle2009-05-141-12/+27
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: Make access_ok() sideeffect proof.Ralf Baechle2009-05-141-3/+13
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: Replace use of <asm-generic/uaccess.h> with native implementations.Ralf Baechle2008-10-111-1/+263
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: Move headfiles to new location below arch/mips/includeRalf Baechle2008-10-111-0/+852
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>