Pull cpuidle into release branch
[pandora-kernel.git] / arch / ia64 / kernel / kprobes.c
index 72e593e..5fd65d8 100644 (file)
@@ -40,6 +40,8 @@ extern void jprobe_inst_return(void);
 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
 DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
 
+struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}};
+
 enum instruction_type {A, I, M, F, B, L, X, u};
 static enum instruction_type bundle_encoding[32][3] = {
   { M, I, I },                         /* 00 */
@@ -151,12 +153,12 @@ static uint __kprobes is_cmp_ctype_unc_inst(uint template, uint slot,
 
        cmp_inst.l = kprobe_inst;
        if ((cmp_inst.f.x2 == 0) || (cmp_inst.f.x2 == 1)) {
-               /* Integere compare - Register Register (A6 type)*/
+               /* Integer compare - Register Register (A6 type)*/
                if ((cmp_inst.f.tb == 0) && (cmp_inst.f.ta == 0)
                                &&(cmp_inst.f.c == 1))
                        ctype_unc = 1;
        } else if ((cmp_inst.f.x2 == 2)||(cmp_inst.f.x2 == 3)) {
-               /* Integere compare - Immediate Register (A8 type)*/
+               /* Integer compare - Immediate Register (A8 type)*/
                if ((cmp_inst.f.ta == 0) &&(cmp_inst.f.c == 1))
                        ctype_unc = 1;
        }
@@ -820,7 +822,7 @@ out:
        return 1;
 }
 
-static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)
+int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)
 {
        struct kprobe *cur = kprobe_running();
        struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
@@ -904,13 +906,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
                        if (post_kprobes_handler(args->regs))
                                ret = NOTIFY_STOP;
                break;
-       case DIE_PAGE_FAULT:
-               /* kprobe_running() needs smp_processor_id() */
-               preempt_disable();
-               if (kprobe_running() &&
-                       kprobes_fault_handler(args->regs, args->trapnr))
-                       ret = NOTIFY_STOP;
-               preempt_enable();
        default:
                break;
        }
@@ -943,10 +938,15 @@ static void ia64_get_bsp_cfm(struct unw_frame_info *info, void *arg)
        return;
 }
 
+unsigned long arch_deref_entry_point(void *entry)
+{
+       return ((struct fnptr *)entry)->ip;
+}
+
 int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
 {
        struct jprobe *jp = container_of(p, struct jprobe, kp);
-       unsigned long addr = ((struct fnptr *)(jp->entry))->ip;
+       unsigned long addr = arch_deref_entry_point(jp->entry);
        struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
        struct param_bsp_cfm pa;
        int bytes;
@@ -954,7 +954,7 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
        /*
         * Callee owns the argument space and could overwrite it, eg
         * tail call optimization. So to be absolutely safe
-        * we save the argument space before transfering the control
+        * we save the argument space before transferring the control
         * to instrumented jprobe function which runs in
         * the process context
         */