~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/sh/kernel/traps_32.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <linux/sysfs.h>
28
28
#include <linux/uaccess.h>
29
29
#include <linux/perf_event.h>
30
 
#include <trace/trap.h>
31
30
#include <asm/system.h>
32
31
#include <asm/alignment.h>
33
32
#include <asm/fpu.h>
48
47
#define TRAP_ILLEGAL_SLOT_INST  13
49
48
#endif
50
49
 
51
 
DEFINE_TRACE(trap_entry);
52
 
DEFINE_TRACE(trap_exit);
53
 
 
54
50
static void dump_mem(const char *str, unsigned long bottom, unsigned long top)
55
51
{
56
52
        unsigned long p;
91
87
        bust_spinlocks(1);
92
88
 
93
89
        printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
94
 
        sysfs_printk_last_file();
95
90
        print_modules();
96
91
        show_regs(regs);
97
92
 
549
544
        error_code = lookup_exception_vector();
550
545
#endif
551
546
 
552
 
        trace_trap_entry(regs, error_code >> 5);
553
 
 
554
547
        oldfs = get_fs();
555
548
 
556
549
        if (user_mode(regs)) {
595
588
                                              address);
596
589
                set_fs(oldfs);
597
590
 
598
 
                if (!tmp) {
599
 
                        trace_trap_exit();
 
591
                if (tmp == 0)
600
592
                        return; /* sorted */
601
 
                }
602
593
uspace_segv:
603
594
                printk(KERN_NOTICE "Sending SIGBUS to \"%s\" due to unaligned "
604
595
                       "access (PC %lx PR %lx)\n", current->comm, regs->pc,
631
622
                                        0, address);
632
623
                set_fs(oldfs);
633
624
        }
634
 
        trace_trap_exit();
635
625
}
636
626
 
637
627
#ifdef CONFIG_SH_DSP