x86: Replace print_symbol() with new %ps/%pS format
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 12 Nov 2013 10:10:35 +0000 (11:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Nov 2013 10:10:35 +0000 (11:10 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/irq.c
xen/arch/x86/time.c
xen/arch/x86/traps.c
xen/arch/x86/x86_64/traps.c

index a984bdac4e2552b131a82027d12c65c48464c0bb..a47d4f640bd891c9861a3d65c567c9db2aea230e 100644 (file)
@@ -2276,7 +2276,7 @@ static void dump_irqs(unsigned char key)
             printk("\n");
         }
         else if ( desc->action )
-            print_symbol("%s\n", (unsigned long)desc->action->handler);
+            printk("%ps()\n", desc->action->handler);
         else
             printk("mapped, unbound\n");
 
@@ -2288,10 +2288,7 @@ static void dump_irqs(unsigned char key)
     printk("Direct vector information:\n");
     for ( i = FIRST_DYNAMIC_VECTOR; i < NR_VECTORS; ++i )
         if ( direct_apic_vector[i] )
-        {
-            printk("   %#02x -> ", i);
-            print_symbol("%s\n", (unsigned long)direct_apic_vector[i]);
-        }
+            printk("   %#02x -> %ps()\n", i, direct_apic_vector[i]);
 
     dump_ioapic_irq_info();
 }
index c1bbd50488fe2aef1d8dfe83f446b15f3bf2e148..21224f0ee8557b4e74345851d959b1c9e4b8184c 100644 (file)
@@ -1475,8 +1475,8 @@ static int _disable_pit_irq(void(*hpet_broadcast_setup)(void))
         {
             if ( xen_cpuidle > 0 )
             {
-                print_symbol("%s() failed, turning to PIT broadcast\n",
-                             (unsigned long)hpet_broadcast_setup);
+                printk("%ps() failed, turning to PIT broadcast\n",
+                       hpet_broadcast_setup);
                 return -1;
             }
             ret = 0;
index 77c200b86ccc4d05b265ee57c91b6bd0c06db8fb..0e3c6e3f578a203d9384898ee027b7ddc6cf535f 100644 (file)
@@ -198,19 +198,14 @@ static void show_trace(struct cpu_user_regs *regs)
 {
     unsigned long *stack = ESP_BEFORE_EXCEPTION(regs), addr;
 
-    printk("Xen call trace:\n   ");
-
-    printk("[<%p>]", _p(regs->eip));
-    print_symbol(" %s\n   ", regs->eip);
+    printk("Xen call trace:\n"
+           "   [<%p>] %pS\n", _p(regs->eip), _p(regs->eip));
 
     while ( ((long)stack & (STACK_SIZE-BYTES_PER_LONG)) != 0 )
     {
         addr = *stack++;
         if ( is_active_kernel_text(addr) )
-        {
-            printk("[<%p>]", _p(addr));
-            print_symbol(" %s\n   ", addr);
-        }
+            printk("   [<%p>] %pS\n", _p(addr), _p(addr));
     }
 
     printk("\n");
@@ -222,8 +217,6 @@ static void show_trace(struct cpu_user_regs *regs)
 {
     unsigned long *frame, next, addr, low, high;
 
-    printk("Xen call trace:\n   ");
-
     /*
      * If RIP is not pointing into hypervisor code then someone may have
      * called into oblivion. Peek to see if they left a return address at
@@ -232,8 +225,9 @@ static void show_trace(struct cpu_user_regs *regs)
     addr = is_active_kernel_text(regs->eip) ||
            !is_active_kernel_text(*ESP_BEFORE_EXCEPTION(regs)) ?
            regs->eip : *ESP_BEFORE_EXCEPTION(regs);
-    printk("[<%p>]", _p(addr));
-    print_symbol(" %s\n   ", addr);
+
+    printk("Xen call trace:\n"
+           "   [<%p>] %pS\n", _p(addr), _p(addr));
 
     /* Bounds for range of valid frame pointer. */
     low  = (unsigned long)(ESP_BEFORE_EXCEPTION(regs) - 2);
@@ -269,8 +263,7 @@ static void show_trace(struct cpu_user_regs *regs)
             addr  = frame[1];
         }
 
-        printk("[<%p>]", _p(addr));
-        print_symbol(" %s\n   ", addr);
+        printk("   [<%p>] %pS\n", _p(addr), _p(addr));
 
         low = (unsigned long)&frame[2];
     }
@@ -338,10 +331,7 @@ void show_stack_overflow(unsigned int cpu, unsigned long esp)
     {
         addr = *stack++;
         if ( is_active_kernel_text(addr) )
-        {
-            printk("%p: [<%p>]", stack, _p(addr));
-            print_symbol(" %s\n   ", addr);
-        }
+            printk("%p: [<%p>] %pS\n", stack, _p(addr), _p(addr));
     }
 
     printk("\n");
@@ -3755,8 +3745,8 @@ void asm_domain_crash_synchronous(unsigned long addr)
     if ( addr == 0 )
         addr = this_cpu(last_extable_addr);
 
-    printk("domain_crash_sync called from entry.S: fault at %p ", _p(addr));
-    print_symbol("%s\n", addr);
+    printk("domain_crash_sync called from entry.S: fault at %p %pS\n",
+           _p(addr), _p(addr));
 
     __domain_crash_synchronous();
 }
index 0316d7c4aca7ed8fe7f1c802be43d0e8253b9f34..ae935390ce58232ec30fcaf345ca0f50aa87a74f 100644 (file)
@@ -49,7 +49,7 @@ static void _show_registers(
 
     printk("RIP:    %04x:[<%016lx>]", regs->cs, regs->rip);
     if ( context == CTXT_hypervisor )
-        print_symbol(" %s", regs->rip);
+        printk(" %pS", _p(regs->rip));
     printk("\nRFLAGS: %016lx   ", regs->rflags);
     if ( (context == CTXT_pv_guest) && v && v->vcpu_info )
         printk("EM: %d   ", !!vcpu_info(v, evtchn_upcall_mask));