aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
Commit message (Collapse)AuthorAgeFilesLines
* [MIPS] Define and use vi_handler_t for vectored interrupt handlers.Ralf Baechle2007-05-111-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix do_default_vi to use get_irq_regs to get the irq register ptr.Ralf Baechle2007-05-111-2/+2
| | | | | | | Harmless bug because this function is only called in case of another kernel bug anyway which is also why this was missed for so long. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make do_default_vi staticRalf Baechle2007-05-111-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-081-1/+0
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [MIPS] Fix BUG(), BUG_ON() handlingAtsushi Nemoto2007-04-201-2/+2
| | | | | | | | | | With commit 63dc68a8cf60cb110b147dab1704d990808b39e2, kernel can not handle BUG() and BUG_ON() properly since get_user() returns false for kernel code. Use __get_user() to skip unnecessary access_ok(). This patch also make BRK_BUG code encoded in the TNE instruction. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Disallow CpU exception in kernel again.Atsushi Nemoto2007-04-201-18/+3
| | | | | | | | | The commit 4d40bff7110e9e1a97ff8c01bdd6350e9867cc10 ("Allow CpU exception in kernel partially") was broken. The commit was to fix theoretical problem but broke usual case. Revert it for now. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] FPU ownership management & preemption fixesAtsushi Nemoto2007-03-171-47/+37
| | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Add basic SMARTMIPS ASE supportFranck Bui-Huu2007-02-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds trivial support for SMARTMIPS extension. This extension is currently implemented by 4KS[CD] CPUs. Basically it saves/restores ACX register, which is part of the SMARTMIPS ASE, when needed. This patch does *not* add any support for Smartmips MMU features. Futhermore this patch does not add explicit support for 4KS[CD] CPUs since they are respectively mips32 and mips32r2 compliant. So with the current processor configuration, a platform that has such CPUs needs to select both configs: CPU_HAS_SMARTMIPS SYS_HAS_CPU_MIPS32_R[12] This is due to the processor configuration which is mixing up all the architecture variants and the processor types. The drawback of this, is that we currently pass '-march=mips32' option to gcc when building a kernel instead of '-march=4ksc' for 4KSC case. This can lead to a kernel image a little bit bigger than required. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [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>