]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/hexagon/kernel/traps.c
Merge tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / arch / hexagon / kernel / traps.c
index d59ee62f772de844d13de60a38da6afcfd105f39..7858663352b9ec1662959ad759a62ca07e3b639c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Kernel traps/events for Hexagon processor
  *
- * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -65,6 +65,10 @@ static const char *ex_name(int ex)
                return "Write protection fault";
        case HVM_GE_C_XMAL:
                return "Misaligned instruction";
+       case HVM_GE_C_WREG:
+               return "Multiple writes to same register in packet";
+       case HVM_GE_C_PCAL:
+               return "Program counter values that are not properly aligned";
        case HVM_GE_C_RMAL:
                return "Misaligned data load";
        case HVM_GE_C_WMAL:
@@ -191,14 +195,6 @@ void show_stack(struct task_struct *task, unsigned long *fp)
        do_show_stack(task, fp, 0);
 }
 
-void dump_stack(void)
-{
-       unsigned long *fp;
-       asm("%0 = r30" : "=r" (fp));
-       show_stack(current, fp);
-}
-EXPORT_SYMBOL(dump_stack);
-
 int die(const char *str, struct pt_regs *regs, long err)
 {
        static struct {
@@ -324,6 +320,12 @@ void do_genex(struct pt_regs *regs)
        case HVM_GE_C_XMAL:
                misaligned_instruction(regs);
                break;
+       case HVM_GE_C_WREG:
+               illegal_instruction(regs);
+               break;
+       case HVM_GE_C_PCAL:
+               misaligned_instruction(regs);
+               break;
        case HVM_GE_C_RMAL:
                misaligned_data_load(regs);
                break;
@@ -441,3 +443,14 @@ void do_machcheck(struct pt_regs *regs)
        /* Halt and catch fire */
        __vmstop();
 }
+
+/*
+ * Treat this like the old 0xdb trap.
+ */
+
+void do_debug_exception(struct pt_regs *regs)
+{
+       regs->hvmer.vmest &= ~HVM_VMEST_CAUSE_MSK;
+       regs->hvmer.vmest |= (TRAP_DEBUG << HVM_VMEST_CAUSE_SFT);
+       do_trap0(regs);
+}