~ubuntu-branches/ubuntu/saucy/linux-ti-omap4/saucy-proposed

« back to all changes in this revision

Viewing changes to arch/tile/kernel/traps.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Stefan Bader, Upstream Kernel Changes
  • Date: 2012-08-15 17:17:43 UTC
  • Revision ID: package-import@ubuntu.com-20120815171743-h5wnuf51xe7pvdid
Tags: 3.5.0-207.13
[ Paolo Pisati ]

* Start new release

[ Stefan Bader ]

* (config) Enable getabis to use local package copies

[ Upstream Kernel Changes ]

* fixup: gargabe collect iva_seq[0|1] init
* [Config] enable all SND_OMAP_SOC_*s
* fixup: cm2xxx_3xxx.o is needed for omap2_cm_read|write_reg
* fixup: add some snd_soc_dai* helper functions
* fixup: s/snd_soc_dpcm_params/snd_soc_dpcm/g
* fixup: typo, no_host_mode and useless SDP4430 init
* fixup: enable again aess hwmod

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
        return 1;
196
196
}
197
197
 
 
198
static const char *const int_name[] = {
 
199
        [INT_MEM_ERROR] = "Memory error",
 
200
        [INT_ILL] = "Illegal instruction",
 
201
        [INT_GPV] = "General protection violation",
 
202
        [INT_UDN_ACCESS] = "UDN access",
 
203
        [INT_IDN_ACCESS] = "IDN access",
 
204
#if CHIP_HAS_SN()
 
205
        [INT_SN_ACCESS] = "SN access",
 
206
#endif
 
207
        [INT_SWINT_3] = "Software interrupt 3",
 
208
        [INT_SWINT_2] = "Software interrupt 2",
 
209
        [INT_SWINT_0] = "Software interrupt 0",
 
210
        [INT_UNALIGN_DATA] = "Unaligned data",
 
211
        [INT_DOUBLE_FAULT] = "Double fault",
 
212
#ifdef __tilegx__
 
213
        [INT_ILL_TRANS] = "Illegal virtual address",
 
214
#endif
 
215
};
 
216
 
198
217
void __kprobes do_trap(struct pt_regs *regs, int fault_num,
199
218
                       unsigned long reason)
200
219
{
211
230
         * current process and hope for the best.
212
231
         */
213
232
        if (!user_mode(regs)) {
 
233
                const char *name;
214
234
                if (fixup_exception(regs))  /* only UNALIGN_DATA in practice */
215
235
                        return;
216
 
                pr_alert("Kernel took bad trap %d at PC %#lx\n",
217
 
                       fault_num, regs->pc);
 
236
                if (fault_num >= 0 &&
 
237
                    fault_num < sizeof(int_name)/sizeof(int_name[0]) &&
 
238
                    int_name[fault_num] != NULL)
 
239
                        name = int_name[fault_num];
 
240
                else
 
241
                        name = "Unknown interrupt";
 
242
                pr_alert("Kernel took bad trap %d (%s) at PC %#lx\n",
 
243
                         fault_num, name, regs->pc);
218
244
                if (fault_num == INT_GPV)
219
245
                        pr_alert("GPV_REASON is %#lx\n", reason);
220
246
                show_regs(regs);