summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
Commit message (Collapse)AuthorAgeFilesLines
* [MIPS] Fix double signal on trap and break instructionAtsushi Nemoto2007-02-201-0/+2
| | | | | | | This commit broke gdb, since any BREAK or TRAP instruction cause SIGSEGV. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make __declare_dbe_table static and avoid it getting optimized awayRalf Baechle2007-02-181-7/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Use conditional traps for BUG_ON on MIPS II and better.Ralf Baechle2006-11-301-4/+10
| | | | | | | This shaves of around 4kB and a few cycles for the average kernel that has CONFIG_BUG enabled. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Work around bogus gcc warnings.Ralf Baechle2006-11-301-21/+22
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fast path for rdhwr emulation for TLSAtsushi Nemoto2006-11-301-1/+14
| | | | | | | | Add special short path for emulationg RDHWR which is used to support TLS. Add an extra prologue for cpu_has_vtag_icache case. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix warning of printk format in mips_srs_init()Yoichi Yuasa2006-10-311-1/+1
| | | | | | | arch/mips/kernel/traps.c:1115: warning: int format, long unsigned int arg (arg 2) Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make sure cpu_has_fpu is used only in atomic contextAtsushi Nemoto2006-10-091-7/+9
| | | | | | | | Make sure cpu_has_fpu (which uses smp_processor_id()) is used only in atomic context. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make unwind_stack() can dig into interrupted contextAtsushi Nemoto2006-10-011-2/+1
| | | | | | | | | | If the PC was ret_from_irq or ret_from_exception, there will be no more normal stackframe. Instead of stopping the unwinding, use PC and RA saved by an exception handler to continue unwinding into the interrupted context. This also simplifies the CONFIG_STACKTRACE code. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] lockdep: Add STACKTRACE_SUPPORT and enable LOCKDEP_SUPPORTAtsushi Nemoto2006-10-011-34/+3
| | | | | | | | Implement stacktrace interface by using unwind_stack() and enable lockdep support in Kconfig. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make prepare_frametrace() not clobber v0Atsushi Nemoto2006-09-271-3/+7
| | | | | | | | | | Since lmo commit 323a380bf9e1a1679a774a2b053e3c1f2aa3f179 ("Simplify dump_stack()") made prepare_frametrace() always inlined, using $2 (v0) in __asm__ is not safe anymore. We can use $1 (at) instead. Also we should use "dla" instead of "la" for 64-bit kernel. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Improve unwind_stack()Franck Bui-Huu2006-09-271-12/+12
| | | | | | | | | | | | This patch allows unwind_stack() to return ra for leaf function. But it tries to detects cases where get_frame_info() wrongly consider nested function as a leaf one. It also pass 'unsinged long *sp' instead of 'unsigned long **sp' as second parameter. The code looks cleaner. Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Simplify dump_stack()Franck Bui-Huu2006-09-271-11/+9
| | | | | | | | | | Make dump_stack() code not depend on CONFIG_KALLSYMS. It also make prepare_frametrace() always inlined to get less false entries reported by show_raw_backtrace(). Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Miscellaneous cleanup in prologue analysis codeFranck Bui-Huu2006-09-271-19/+14
| | | | | | | | | | | We usually use backtrace term for dumping a call tree during debug. Therefore this patch renames show_frametrace() into show_backtrace() and show_trace() into show_raw_backtrace(). It also uses the new function print_ip_sym(). Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Remove unused MODULE_RANGE macro.Franck Bui-Huu2006-09-271-5/+0
| | | | | Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] dump_stack() based on prologue code analysisAtsushi Nemoto2006-09-271-12/+86
| | | | | | | | | | Instead of dump all possible address in the stack, unwind the stack frame based on prologue code analysis, as like as get_wchan() does. While the code analysis might fail for some reason, there is a new kernel option "raw_show_trace" to disable this feature. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Rearrange show_stack, show_traceAtsushi Nemoto2006-09-271-28/+23
| | | | | | | | Print call-trace in show_stack() (like on other archs). Also make show_trace() static and simplify its argument list. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Honour "panic_on_oops" sysctl.Maxime Bizon2006-09-271-0/+11
| | | | | Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Panic on fp exception in kernel mode.Chris Dearman2006-07-131-0/+2
| | | | | | | There should never be a FP exception in kernel mode. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Use KERN_DEBUG to log the SDBBP messagesChris Dearman2006-07-131-3/+3
| | | | | Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Less noise on multithreading exceptions.Chris Dearman2006-07-131-9/+7
| | | | | | | | Make the MT handler silent and output the MT exception type at debug priority. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [MIPS] Fix configuration of R2 CPU features and multithreading.Ralf Baechle2006-06-291-6/+9
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs.Atsushi Nemoto2006-06-191-5/+4
| | | | | | | | | The struct mips_fpu_soft_struct and mips_fpu_hard_struct are completely same now and the kernel fpu emulator assumes that. This patch unifies them to mips_fpu_struct and get rid of mips_fpu_union. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Print more information if we're struck by a machine check exception.Ralf Baechle2006-06-061-2/+17
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Add missing 34K processor IDsNigel Stephens2006-06-011-0/+1
| | | | | | The 34K is very much like a 24K on steroids. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make mips_srs_init static.Ralf Baechle2006-04-191-1/+1
| | | | | | Nothing outside traps.c uses it. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] FPU affinity for MT ASE.Ralf Baechle2006-04-191-0/+30
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] MT: Improved multithreading support.Ralf Baechle2006-04-191-8/+116
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] R2: Implement shadow register allocation without spinlock.Ralf Baechle2006-04-191-23/+18
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Rewrite all the assembler interrupt handlers to C.Ralf Baechle2006-04-191-0/+2
| | | | | | | | | | | | Saves like 1,600 lines of code, is way easier to debug, compilers frequently do a better job than the cut and paste type of handlers many boards had. And finally having all the stuff done in a single place also means alot of bug potencial for the MT ASE is gone. The only surviving handler in assembler is the DECstation one; I hope Maciej will rewrite it. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Some formatting fixes.Ralf Baechle2006-04-191-3/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fixup printk in mips_srs_init.Ralf Baechle2006-04-191-1/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Remove redundant initialization of sr_allocated.Ralf Baechle2006-04-191-2/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make set_vi_srs_handler static.Ralf Baechle2006-04-191-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] War on whitespace: cleanup initial spaces followed by tabs.Ralf Baechle2006-03-211-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make integer overflow exceptions in kernel mode fatal.Ralf Baechle2006-02-211-1/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Clear ST0_RE on bootup.Ralf Baechle2006-02-071-1/+1
| | | | | | | The reset state is undefined and some firmware doesn't clear this bit possibly resulting in crashes on entry into userland. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [PATCH] mips: task_thread_info()Al Viro2006-01-121-1/+1
| | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [MIPS] Generate SIGILL againDaniel Jacobowitz2005-12-011-2/+3
| | | | | | | | The rdhwr emulation accidentally swallowed the SIGILL from most other illegal instructions. Make sure to return -EFAULT by default. Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* FPU emulator garbage collection.Ralf Baechle2005-10-291-3/+3
| | | | | | First argument of fpu_emulator_cop1Handler() was unused. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Don't print file name and line in die and die_if_kernel.Ralf Baechle2005-10-291-14/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Fixup a few lose ends in explicit support for MIPS R1/R2.Ralf Baechle2005-10-291-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Virtual SMP support for the 34K.Ralf Baechle2005-10-291-0/+14
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MT bulletproofing.Ralf Baechle2005-10-291-2/+8
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Avoid SMP cacheflushes. This is a minor optimization of startup butRalf Baechle2005-10-291-0/+2
| | | | | | | will also avoid smp_call_function from doing stupid things when called from a CPU that is not yet marked online. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* More AP / SP bits for the 34K, the Malta bits and things. Still wantsRalf Baechle2005-10-291-13/+214
| | | | | | a little polishing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Rename CONFIG_CPU_MIPS{32,64} to CONFIG_CPU_MIPS{32|64}_R1.Ralf Baechle2005-10-291-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use correct names for bits in the R3k cp0.status register.Maciej W. Rozycki2005-10-291-26/+41
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Mark __die() "noreturn" for real.Maciej W. Rozycki2005-10-291-2/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Support the MIPS32 / MIPS64 DSP ASE.Ralf Baechle2005-10-291-16/+33
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
OpenPOWER on IntegriCloud