[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/7] x86: Replace print_symbol() with new %ps/%pS format
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Keir Fraser <keir@xxxxxxx> CC: Jan Beulich <JBeulich@xxxxxxxx> --- xen/arch/x86/irq.c | 7 ++----- xen/arch/x86/time.c | 3 +-- xen/arch/x86/traps.c | 30 ++++++++++-------------------- xen/arch/x86/x86_64/traps.c | 2 +- xen/common/timer.c | 6 +++--- 5 files changed, 17 insertions(+), 31 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index a984bda..c2e5629 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -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", _p(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, _p(direct_apic_vector[i])); dump_ioapic_irq_info(); } diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index c1bbd50..daade00 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1475,8 +1475,7 @@ 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("hpet_broadcast_setup() failed, turning to PIT broadcast\n"); return -1; } ret = 0; diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 77c200b..0e3c6e3 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -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(); } diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index 0316d7c..ae93539 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -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)); diff --git a/xen/common/timer.c b/xen/common/timer.c index 9ed74e9..eff9c26 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -511,9 +511,9 @@ s_time_t align_timer(s_time_t firsttick, uint64_t period) static void dump_timer(struct timer *t, s_time_t now) { - printk(" ex=%8"PRId64"us timer=%p cb=%p(%p)", - (t->expires - now) / 1000, t, t->function, t->data); - print_symbol(" %s\n", (unsigned long)t->function); + printk(" ex=%8"PRId64"us timer=%p cb=%p(%p) %ps()\n", + (t->expires - now) / 1000, t, t->function, t->data, + _p(t->function)); } static void dump_timerq(unsigned char key) -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |