x86: Remove x86_get_ip_hw()
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 1 Feb 2016 16:08:10 +0000 (11:08 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 2 Feb 2016 22:43:52 +0000 (17:43 -0500)
We have another function that does the same thing: get_hwtf_pc().

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/trap.c
kern/arch/x86/trap64.h

index 42af600..b149ba8 100644 (file)
@@ -342,8 +342,9 @@ static void trap_dispatch(struct hw_trapframe *hw_tf)
                                print_trapframe(hw_tf);
                                backtrace_hwtf(hw_tf);
                        }
-                       char *fn_name = get_fn_name(x86_get_ip_hw(hw_tf));
-                       printk("Core %d is at %p (%s)\n", core_id(), x86_get_ip_hw(hw_tf),
+                       char *fn_name = get_fn_name(get_hwtf_pc(hw_tf));
+
+                       printk("Core %d is at %p (%s)\n", core_id(), get_hwtf_pc(hw_tf),
                               fn_name);
                        kfree(fn_name);
                        print_kmsgs(core_id());
@@ -357,7 +358,7 @@ static void trap_dispatch(struct hw_trapframe *hw_tf)
                case T_ILLOP:
                {
                        /* TODO: this can PF if there is a concurrent unmap/PM removal. */
-                       uintptr_t ip = x86_get_ip_hw(hw_tf);
+                       uintptr_t ip = get_hwtf_pc(hw_tf);
                        pcpui = &per_cpu_info[core_id()];
                        pcpui->__lock_checking_enabled--;               /* for print debugging */
                        /* We will muck with the actual TF.  If we're dealing with
index c11d630..555d8e6 100644 (file)
@@ -48,11 +48,6 @@ static inline uintptr_t get_vmtf_fp(struct vm_trapframe *vm_tf)
        return vm_tf->tf_rbp;
 }
 
-static inline uintptr_t x86_get_ip_hw(struct hw_trapframe *hw_tf)
-{
-       return hw_tf->tf_rip;
-}
-
 static inline void x86_advance_ip(struct hw_trapframe *hw_tf, size_t bytes)
 {
        hw_tf->tf_rip += bytes;