microblaze: Remove segment.h
I would like to use asm-generic uaccess.h where are segment macros defined. This is just first step. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
4009819cf9
commit
40db083433
5 changed files with 34 additions and 52 deletions
|
@ -22,12 +22,40 @@
|
|||
#include <asm/mmu.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/segment.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#define VERIFY_READ 0
|
||||
#define VERIFY_WRITE 1
|
||||
|
||||
/*
|
||||
* On Microblaze the fs value is actually the top of the corresponding
|
||||
* address space.
|
||||
*
|
||||
* The fs value determines whether argument validity checking should be
|
||||
* performed or not. If get_fs() == USER_DS, checking is performed, with
|
||||
* get_fs() == KERNEL_DS, checking is bypassed.
|
||||
*
|
||||
* For historical reasons, these macros are grossly misnamed.
|
||||
*
|
||||
* For non-MMU arch like Microblaze, KERNEL_DS and USER_DS is equal.
|
||||
*/
|
||||
# define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
|
||||
|
||||
# ifndef CONFIG_MMU
|
||||
# define KERNEL_DS MAKE_MM_SEG(0)
|
||||
# define USER_DS KERNEL_DS
|
||||
# else
|
||||
# define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
|
||||
# define USER_DS MAKE_MM_SEG(TASK_SIZE - 1)
|
||||
# endif
|
||||
|
||||
# define get_ds() (KERNEL_DS)
|
||||
# define get_fs() (current_thread_info()->addr_limit)
|
||||
# define set_fs(val) (current_thread_info()->addr_limit = (val))
|
||||
|
||||
# define segment_eq(a, b) ((a).seg == (b).seg)
|
||||
|
||||
|
||||
#define __clear_user(addr, n) (memset((void *)(addr), 0, (n)), 0)
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue