Skip to content

Commit

Permalink
microblaze: Remove r0_ram pointer and PTO alignment
Browse files Browse the repository at this point in the history
r0_ram pool was used for saving/restoring register
content if hw exception happen. This poll was replaced by
pt_pool_space with PT_SIZE size.
Based on this change SAVE_STATE_ARG_SPACE was removed which
caused that PTO offset is zero that's why is also removed.

r0_ram space was used as scratchpad by v850. In early
Microblaze Linux developing phase was this part of code
blindly copied.

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Mar 9, 2011
1 parent d8748e7 commit 6e83557
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 200 deletions.
36 changes: 0 additions & 36 deletions arch/microblaze/include/asm/entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,4 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
# endif /* __ASSEMBLY__ */

#ifndef CONFIG_MMU

/* noMMU hasn't any space for args */
# define STATE_SAVE_ARG_SPACE (0)

#else /* CONFIG_MMU */

/* If true, system calls save and restore all registers (except result
* registers, of course). If false, then `call clobbered' registers
* will not be preserved, on the theory that system calls are basically
* function calls anyway, and the caller should be able to deal with it.
* This is a security risk, of course, as `internal' values may leak out
* after a system call, but that certainly doesn't matter very much for
* a processor with no MMU protection! For a protected-mode kernel, it
* would be faster to just zero those registers before returning.
*
* I can not rely on the glibc implementation. If you turn it off make
* sure that r11/r12 is saved in user-space. --KAA
*
* These are special variables using by the kernel trap/interrupt code
* to save registers in, at a time when there are no spare registers we
* can use to do so, and we can't depend on the value of the stack
* pointer. This means that they must be within a signed 16-bit
* displacement of 0x00000000.
*/

/* A `state save frame' is a struct pt_regs preceded by some extra space
* suitable for a function call stack frame. */

/* Amount of room on the stack reserved for arguments and to satisfy the
* C calling conventions, in addition to the space used by the struct
* pt_regs that actually holds saved values. */
#define STATE_SAVE_ARG_SPACE (6*4) /* Up to six arguments */

#endif /* CONFIG_MMU */

#endif /* _ASM_MICROBLAZE_ENTRY_H */
2 changes: 1 addition & 1 deletion arch/microblaze/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ unsigned long get_wchan(struct task_struct *p);
# define task_regs(task) ((struct pt_regs *)task_tos(task) - 1)

# define task_pt_regs_plus_args(tsk) \
(((void *)task_pt_regs(tsk)) - STATE_SAVE_ARG_SPACE)
((void *)task_pt_regs(tsk))

# define task_sp(task) (task_regs(task)->r1)
# define task_pc(task) (task_regs(task)->pc)
Expand Down
Loading

0 comments on commit 6e83557

Please sign in to comment.