forked from Minki/linux
35c9646062
Hide details of maximum user address calculation in a new asm/uaccess.h interface named user_addr_max(). Provide little-endian implementation in find_zero(), which should work but can probably be improved. Abstrace alignment check behind IS_UNALIGNED() macro. Kill double-semicolon, noticed by David Howells. Signed-off-by: David S. Miller <davem@davemloft.net>
15 lines
344 B
C
15 lines
344 B
C
#ifndef ___ASM_SPARC_UACCESS_H
|
|
#define ___ASM_SPARC_UACCESS_H
|
|
#if defined(__sparc__) && defined(__arch64__)
|
|
#include <asm/uaccess_64.h>
|
|
#else
|
|
#include <asm/uaccess_32.h>
|
|
#endif
|
|
|
|
#define user_addr_max() \
|
|
(segment_eq(get_fs(), USER_DS) ? STACK_TOP : ~0UL)
|
|
|
|
extern long strncpy_from_user(char *dest, const char __user *src, long count);
|
|
|
|
#endif
|