summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/entry.S
Commit message (Collapse)AuthorAgeFilesLines
...
* microblaze: Move BIP setup to the end of ret_from_trap/ret_from_excMichal Simek2010-08-041-6/+6
| | | | | | | | We don't need to protect by BIP whole ret_from_trap/ret_from_exc code. Only restoring from user/hw exception should be covered. If BIP is setup, IRQ can't occur. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Remove PER_CPU(KM) variableMichal Simek2010-08-041-23/+20
| | | | | | | | | There is a way howto remove Kernel Mode variable. It is easier to parse UMS bit in MSR to find out if I come from kernel or user space. Loading MSR content should be in one cycle and loading PER_CPU variable depends on memory state. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Optimize clear_vms_ums macroMichal Simek2010-08-041-3/+1
| | | | | | | We can save two instruction when MSR_VMS and MSR_UMS are setup in one instruction. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Save and restore r3/r4 in SAVE/RESTORE_REGS macrosMichal Simek2010-08-041-40/+8
| | | | | | | | | | | Save and restore R3/R4 registers in macros. This change help to cleanup entry.S. In ret_from_trap function we are saving returning value from syscall to pt_regs on stack that's why we don't need to save and restore these values before kernel functions (schedule, do_signal). Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Fix VM_ON and VM_OFF macrosMichal Simek2010-08-041-4/+6
| | | | | | Jump behind macro. We don't want to execute nop instruction again. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Add stack unwinderSteven J. Magnani2010-08-041-0/+27
| | | | | | | | | | | | | | | | | | Implement intelligent backtracing by searching for stack frame creation, and emitting only return addresses. Use print_hex_dump() to display the entire binary kernel stack. Limitation: MMU kernels are not currently able to trace beyond a system trap (interrupt, syscall, etc.). It is the intent of this patch to provide infrastructure that can be extended to add this capability later. Changes from V1: * Removed checks in find_frame_creation() that prevented location of the frame creation instruction in heavily optimized code * Various formatting/commenting/file location tweaks per review comments * Dropped Kconfig option to enable STACKTRACE as something logically separate Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
* microblaze: Fix sys_clone syscallMichal Simek2010-08-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | sys_clone syscall ignored args which this patch mapped to args which are passing from glibc. Here is the origin problem description. "I ran the static libgcc tests (very few of them are there, they are mostly dynamically linked) and some of them fail with an assertion in fork() system call (tid != pid), I looked at the microblaze/entry.S file and it looks suspicious (ignores arguments 3-5)" Arg mapping should be: glibc ARCH_FORK(...) -> do_fork(...) r5 -> r5 (clone_flags) r6 -> r6 (stack_start, use parent->stack if NULL) pt_regs -> r7 (pt_regs) r7 -> r8 (stack_size) r8 -> r9 (parent_tidptr) r9 -> r10 (child_tidptr) Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: entry.S use delay slot for return handlersMichal Simek2010-03-111-6/+3
| | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Save current task directlyMichal Simek2010-03-111-8/+4
| | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Simplify entry.S - save/restore r3/r4 - ret_from_trapMichal Simek2010-03-111-48/+30
| | | | | | | There is possible to save r3/r4 at the beggining of user part before calling handlers and at the end restore it. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Add support from PREEMPTMichal Simek2010-03-111-1/+24
| | | | | | | | | This patch add core PREEMPT support for Microblaze. I tried to trace it via tracers and I was able to see any output. I also added low level debug functions to see if that code is called. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Remove rt_sigsuspend wrapperMichal Simek2009-12-141-11/+0
| | | | | | Generic rt_sigsuspend syscalls doesn't need any asm wrapper. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Do not count system calls in defaultMichal Simek2009-12-141-0/+4
| | | | | | | There is not necessary to count system calls that's why I added DEBUG macro Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Remove saving and restoring before calling signal codeMichal Simek2009-12-141-4/+0
| | | | | | | | | | Saving is done in SAVE_STATE macros that's why another save discard previous saved value. This change has no effect to normal programs because they ends in any exception and they are killed. On the other side has effect on debugging. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Clear sticky FSR register after saving it to func parametrMichal Simek2009-10-051-0/+2
| | | | | | | | | Previous patch d63678d607d0e37ec7abe5ceb545d7e8aab956a4 clear it for noMMU kernel. This one do it for MMU. Correct noMMU version Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Support ptrace syscall tracing.Michal Simek2009-09-221-12/+60
| | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: use generic syscalls.hArnd Bergmann2009-07-061-6/+5
| | | | | | | | | The prototypes in syscalls.h all make sense for microblaze, but for some of them, the actual implementation in sys_microblaze.c needs to be adapted. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: clean up signal handlingArnd Bergmann2009-07-061-23/+0
| | | | | | | | | | | | | | | When legacy signal handling is disabled, the arch/microblaze/kernel/signal.c implementation can be much simpler, as most of it is handled generically from kernel/signal.c. This is also a prerequisite for using the generic asm/unistd.h, which does not provide __NR_sigreturn, because this macro is referenced by the current signal.c implementation. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze_mmu_v2: entry.S, entry.hMichal Simek2009-05-261-0/+1116
Signed-off-by: Michal Simek <monstr@monstr.eu>
OpenPOWER on IntegriCloud