]> Pileus Git - ~andy/linux/blobdiff - arch/tile/kernel/single_step.c
Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux
[~andy/linux] / arch / tile / kernel / single_step.c
index 84a729e06ec44b448110ddf78cef5852ef87fa23..4032ca8e51b613b894bee171f1afa8468ffddb1d 100644 (file)
@@ -186,6 +186,8 @@ static tile_bundle_bits rewrite_load_store_unaligned(
                        .si_code = SEGV_MAPERR,
                        .si_addr = addr
                };
+               trace_unhandled_signal("segfault", regs,
+                                      (unsigned long)addr, SIGSEGV);
                force_sig_info(info.si_signo, &info, current);
                return (tile_bundle_bits) 0;
        }
@@ -196,6 +198,8 @@ static tile_bundle_bits rewrite_load_store_unaligned(
                        .si_code = BUS_ADRALN,
                        .si_addr = addr
                };
+               trace_unhandled_signal("unaligned trap", regs,
+                                      (unsigned long)addr, SIGBUS);
                force_sig_info(info.si_signo, &info, current);
                return (tile_bundle_bits) 0;
        }
@@ -318,6 +322,14 @@ void single_step_once(struct pt_regs *regs)
 "    .popsection\n"
        );
 
+       /*
+        * Enable interrupts here to allow touching userspace and the like.
+        * The callers expect this: do_trap() already has interrupts
+        * enabled, and do_work_pending() handles functions that enable
+        * interrupts internally.
+        */
+       local_irq_enable();
+
        if (state == NULL) {
                /* allocate a page of writable, executable memory */
                state = kmalloc(sizeof(struct single_step_state), GFP_KERNEL);