Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189264
b: refs/heads/master
c: 40db083
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Apr 1, 2010
1 parent a4359b6 commit b2a93cb
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4009819cf90c26e3ec7b0ed949d5ff37c568e197
refs/heads/master: 40db0834337ef0cde586feeb5588e45f0349098b
1 change: 0 additions & 1 deletion trunk/arch/microblaze/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <asm/ptrace.h>
#include <asm/setup.h>
#include <asm/registers.h>
#include <asm/segment.h>
#include <asm/entry.h>
#include <asm/current.h>

Expand Down
49 changes: 0 additions & 49 deletions trunk/arch/microblaze/include/asm/segment.h

This file was deleted.

5 changes: 4 additions & 1 deletion trunk/arch/microblaze/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#ifndef __ASSEMBLY__
# include <linux/types.h>
# include <asm/processor.h>
# include <asm/segment.h>

/*
* low level task data that entry.S needs immediate access to
Expand Down Expand Up @@ -60,6 +59,10 @@ struct cpu_context {
__u32 fsr;
};

typedef struct {
unsigned long seg;
} mm_segment_t;

struct thread_info {
struct task_struct *task; /* main task structure */
struct exec_domain *exec_domain; /* execution domain */
Expand Down
30 changes: 29 additions & 1 deletion trunk/arch/microblaze/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/microblaze/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/bitops.h>
#include <asm/system.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h> /* for USER_DS macros */
#include <asm/cacheflush.h>

void show_regs(struct pt_regs *regs)
Expand Down

0 comments on commit b2a93cb

Please sign in to comment.