* [PATCH 0/2] printk adjustments
@ 2015-03-20 15:04 Jan Beulich
2015-03-20 15:12 ` [PATCH 1/2] introduce gprintk() Jan Beulich
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Jan Beulich @ 2015-03-20 15:04 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan
1: introduce gprintk()
2: make {,g}dprintk() a no-op in non-debug builds
Signed-off-by: Jan Beulich <jbeulich@suse.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] introduce gprintk()
2015-03-20 15:04 [PATCH 0/2] printk adjustments Jan Beulich
@ 2015-03-20 15:12 ` Jan Beulich
2015-03-24 14:20 ` Ian Campbell
2015-03-20 15:13 ` [PATCH 2/2] make {,g}dprintk() a no‑op in non‑debug builds Jan Beulich
2015-03-25 17:26 ` [PATCH 0/2] printk adjustments Andrew Cooper
2 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2015-03-20 15:12 UTC (permalink / raw)
To: xen-devel
Cc: Ian Campbell, Andrew Cooper, Keir Fraser, Ian Jackson, Tim Deegan
[-- Attachment #1: Type: text/plain, Size: 11177 bytes --]
... and convert several gdprintk()-s to it, as the next patch will make
them no-ops in non-debug builds.
Note that as a non-debug facility this does not print file name and
line number of the origin, to people are expected to use meaningful and
easily distinguishable messages (i.e. just like with plain printk()).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Note: ARM code was not touched.
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1245,8 +1245,8 @@ static void load_segments(struct vcpu *n
put_user(uregs->es, esp-6) |
put_user(uregs->ds, esp-7) )
{
- gdprintk(XENLOG_ERR, "Error while creating compat "
- "failsafe callback frame.\n");
+ gprintk(XENLOG_ERR,
+ "error while creating compat failsafe callback frame\n");
domain_crash(n->domain);
}
@@ -1287,8 +1287,8 @@ static void load_segments(struct vcpu *n
put_user(regs->r11, rsp-10) |
put_user(regs->rcx, rsp-11) )
{
- gdprintk(XENLOG_ERR, "Error while creating failsafe "
- "callback frame.\n");
+ gprintk(XENLOG_ERR,
+ "error while creating failsafe callback frame\n");
domain_crash(n->domain);
}
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2612,17 +2612,15 @@ bool_t hvm_send_assist_req(struct hvm_io
if ( unlikely(p->state != STATE_IOREQ_NONE) )
{
- gdprintk(XENLOG_ERR,
- "Device model set bad IO state %d.\n",
- p->state);
+ gprintk(XENLOG_ERR, "device model set bad IO state %d\n",
+ p->state);
goto crash;
}
if ( unlikely(p->vp_eport != port) )
{
- gdprintk(XENLOG_ERR,
- "Device model set bad event channel %d.\n",
- p->vp_eport);
+ gprintk(XENLOG_ERR, "device model set bad event channel %d\n",
+ p->vp_eport);
goto crash;
}
@@ -2720,9 +2718,9 @@ void hvm_triple_fault(void)
struct domain *d = v->domain;
u8 reason = d->arch.hvm_domain.params[HVM_PARAM_TRIPLE_FAULT_REASON];
- gdprintk(XENLOG_INFO, "Triple fault on VCPU%d - "
- "invoking HVM shutdown action %"PRIu8".\n",
- v->vcpu_id, reason);
+ gprintk(XENLOG_INFO,
+ "Triple fault - invoking HVM shutdown action %d\n",
+ reason);
domain_shutdown(d, reason);
}
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2473,21 +2473,21 @@ static void ept_handle_violation(unsigne
/* Everything else is an error. */
mfn = get_gfn_query_unlocked(d, gfn, &p2mt);
- gdprintk(XENLOG_ERR, "EPT violation %#lx (%c%c%c/%c%c%c), "
- "gpa %#"PRIpaddr", mfn %#lx, type %i.\n",
- qualification,
- (qualification & EPT_READ_VIOLATION) ? 'r' : '-',
- (qualification & EPT_WRITE_VIOLATION) ? 'w' : '-',
- (qualification & EPT_EXEC_VIOLATION) ? 'x' : '-',
- (qualification & EPT_EFFECTIVE_READ) ? 'r' : '-',
- (qualification & EPT_EFFECTIVE_WRITE) ? 'w' : '-',
- (qualification & EPT_EFFECTIVE_EXEC) ? 'x' : '-',
- gpa, mfn_x(mfn), p2mt);
+ gprintk(XENLOG_ERR,
+ "EPT violation %#lx (%c%c%c/%c%c%c) gpa %#"PRIpaddr" mfn %#lx type %i\n",
+ qualification,
+ (qualification & EPT_READ_VIOLATION) ? 'r' : '-',
+ (qualification & EPT_WRITE_VIOLATION) ? 'w' : '-',
+ (qualification & EPT_EXEC_VIOLATION) ? 'x' : '-',
+ (qualification & EPT_EFFECTIVE_READ) ? 'r' : '-',
+ (qualification & EPT_EFFECTIVE_WRITE) ? 'w' : '-',
+ (qualification & EPT_EFFECTIVE_EXEC) ? 'x' : '-',
+ gpa, mfn_x(mfn), p2mt);
ept_walk_table(d, gfn);
if ( qualification & EPT_GLA_VALID )
- gdprintk(XENLOG_ERR, " --- GLA %#lx\n", gla);
+ gprintk(XENLOG_ERR, " --- GLA %#lx\n", gla);
domain_crash(d);
}
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1997,11 +1997,10 @@ int get_page(struct page_info *page, str
put_page(page);
if ( !paging_mode_refcounts(domain) && !domain->is_dying )
- gdprintk(XENLOG_INFO,
- "Error pfn %lx: rd=%p, od=%p, caf=%08lx, taf=%"
- PRtype_info "\n",
- page_to_mfn(page), domain, owner,
- page->count_info, page->u.inuse.type_info);
+ gprintk(XENLOG_INFO,
+ "Error pfn %lx: rd=%p, od=%p, caf=%08lx, taf=%" PRtype_info "\n",
+ page_to_mfn(page), domain, owner,
+ page->count_info, page->u.inuse.type_info);
return 0;
}
@@ -4042,9 +4041,8 @@ static int replace_grant_p2m_mapping(
if ( !p2m_is_grant(type) || mfn_x(old_mfn) != frame )
{
put_gfn(d, gfn);
- gdprintk(XENLOG_WARNING,
- "replace_grant_p2m_mapping: old mapping invalid (type %d, mfn %lx, frame %lx)\n",
- type, mfn_x(old_mfn), frame);
+ MEM_LOG("replace_grant_p2m_mapping: old mapping invalid (type %d, mfn %lx, frame %lx)",
+ type, mfn_x(old_mfn), frame);
return GNTST_general_error;
}
guest_physmap_remove_page(d, gfn, frame, PAGE_ORDER_4K);
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -912,14 +912,13 @@ void ept_walk_table(struct domain *d, un
int i;
- gdprintk(XENLOG_ERR, "Walking EPT tables for domain %d gfn %lx\n",
- d->domain_id, gfn);
+ gprintk(XENLOG_ERR, "Walking EPT tables for GFN %lx:\n", gfn);
/* This pfn is higher than the highest the p2m map currently holds */
if ( gfn > p2m->max_mapped_pfn )
{
- gdprintk(XENLOG_ERR, " gfn exceeds max_mapped_pfn %lx\n",
- p2m->max_mapped_pfn);
+ gprintk(XENLOG_ERR, " gfn exceeds max_mapped_pfn %lx\n",
+ p2m->max_mapped_pfn);
goto out;
}
@@ -932,7 +931,7 @@ void ept_walk_table(struct domain *d, un
index = gfn_remainder >> (i*EPT_TABLE_ORDER);
ept_entry = table + index;
- gdprintk(XENLOG_ERR, " epte %"PRIx64"\n", ept_entry->epte);
+ gprintk(XENLOG_ERR, " epte %"PRIx64"\n", ept_entry->epte);
if ( (i == 0) || !is_epte_present(ept_entry) ||
is_epte_superpage(ept_entry) )
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -519,9 +519,9 @@ static void do_guest_trap(
tb->flags |= TBF_INTERRUPT;
if ( unlikely(null_trap_bounce(v, tb)) )
- gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] "
- "on VCPU %d [ec=%04x]\n",
- trapstr(trapnr), trapnr, v->vcpu_id, regs->error_code);
+ gprintk(XENLOG_WARNING,
+ "Unhandled %s fault/trap [#%d, ec=%04x]\n",
+ trapstr(trapnr), trapnr, regs->error_code);
}
static void instruction_done(
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -164,7 +164,7 @@ unsigned int compat_iret(void)
return regs->_eax;
exit_and_crash:
- gdprintk(XENLOG_ERR, "Fatal error\n");
+ gprintk(XENLOG_ERR, "Fatal IRET error\n");
domain_crash(v->domain);
return 0;
}
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -291,8 +291,8 @@ unsigned long do_iret(void)
if ( unlikely(copy_from_user(&iret_saved, (void *)regs->rsp,
sizeof(iret_saved))) )
{
- gdprintk(XENLOG_ERR, "Fault while reading IRET context from "
- "guest stack\n");
+ gprintk(XENLOG_ERR,
+ "Fault while reading IRET context from guest stack\n");
goto exit_and_crash;
}
@@ -301,8 +301,8 @@ unsigned long do_iret(void)
{
if ( unlikely(pagetable_is_null(v->arch.guest_table_user)) )
{
- gdprintk(XENLOG_ERR, "Guest switching to user mode with no "
- "user page tables\n");
+ gprintk(XENLOG_ERR,
+ "Guest switching to user mode with no user page tables\n");
goto exit_and_crash;
}
toggle_guest_mode(v);
@@ -331,7 +331,6 @@ unsigned long do_iret(void)
return iret_saved.rax;
exit_and_crash:
- gdprintk(XENLOG_ERR, "Fatal error\n");
domain_crash(v->domain);
return 0;
}
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -74,9 +74,9 @@ static struct evtchn_fifo_queue *lock_ol
spin_unlock_irqrestore(&old_q->lock, *flags);
}
- gdprintk(XENLOG_WARNING,
- "domain %d, port %d lost event (too many queue changes)\n",
- d->domain_id, evtchn->port);
+ gprintk(XENLOG_WARNING,
+ "dom%d port %d lost event (too many queue changes)\n",
+ d->domain_id, evtchn->port);
return NULL;
}
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1645,9 +1645,9 @@ int assign_pages(
if ( unlikely((d->tot_pages + (1 << order)) > d->max_pages) )
{
if ( !opt_tmem || order != 0 || d->tot_pages != d->max_pages )
- gdprintk(XENLOG_INFO, "Over-allocation for domain %u: "
- "%u > %u\n", d->domain_id,
- d->tot_pages + (1 << order), d->max_pages);
+ gprintk(XENLOG_INFO, "Over-allocation for domain %u: "
+ "%u > %u\n", d->domain_id,
+ d->tot_pages + (1 << order), d->max_pages);
goto fail;
}
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1063,9 +1063,8 @@ long do_set_timer_op(s_time_t timeout)
* timeout in this case can burn a lot of CPU. We therefore go for a
* reasonable middleground of triggering a timer event in 100ms.
*/
- gdprintk(XENLOG_INFO,
- "Warning: huge timeout set by vcpu %d: %"PRIx64"\n",
- v->vcpu_id, (uint64_t)timeout);
+ gprintk(XENLOG_INFO, "Warning: huge timeout set: %"PRIx64"\n",
+ (uint64_t)timeout);
set_timer(&v->singleshot_timer, NOW() + MILLISECS(100));
}
else
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -84,6 +84,9 @@ extern long vm_assist(struct domain *, u
extern int __printk_ratelimit(int ratelimit_ms, int ratelimit_burst);
extern int printk_ratelimit(void);
+#define gprintk(lvl, fmt, args...) \
+ printk(XENLOG_GUEST lvl "%pv " fmt, current, ## args)
+
/* vsprintf.c */
#define sprintf __xen_has_no_sprintf__
#define vsprintf __xen_has_no_vsprintf__
[-- Attachment #2: gprintk.patch --]
[-- Type: text/plain, Size: 11196 bytes --]
introduce gprintk()
... and convert several gdprintk()-s to it, as the next patch will make
them no-ops in non-debug builds.
Note that as a non-debug facility this does not print file name and
line number of the origin, to people are expected to use meaningful and
easily distinguishable messages (i.e. just like with plain printk()).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Note: ARM code was not touched.
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1245,8 +1245,8 @@ static void load_segments(struct vcpu *n
put_user(uregs->es, esp-6) |
put_user(uregs->ds, esp-7) )
{
- gdprintk(XENLOG_ERR, "Error while creating compat "
- "failsafe callback frame.\n");
+ gprintk(XENLOG_ERR,
+ "error while creating compat failsafe callback frame\n");
domain_crash(n->domain);
}
@@ -1287,8 +1287,8 @@ static void load_segments(struct vcpu *n
put_user(regs->r11, rsp-10) |
put_user(regs->rcx, rsp-11) )
{
- gdprintk(XENLOG_ERR, "Error while creating failsafe "
- "callback frame.\n");
+ gprintk(XENLOG_ERR,
+ "error while creating failsafe callback frame\n");
domain_crash(n->domain);
}
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2612,17 +2612,15 @@ bool_t hvm_send_assist_req(struct hvm_io
if ( unlikely(p->state != STATE_IOREQ_NONE) )
{
- gdprintk(XENLOG_ERR,
- "Device model set bad IO state %d.\n",
- p->state);
+ gprintk(XENLOG_ERR, "device model set bad IO state %d\n",
+ p->state);
goto crash;
}
if ( unlikely(p->vp_eport != port) )
{
- gdprintk(XENLOG_ERR,
- "Device model set bad event channel %d.\n",
- p->vp_eport);
+ gprintk(XENLOG_ERR, "device model set bad event channel %d\n",
+ p->vp_eport);
goto crash;
}
@@ -2720,9 +2718,9 @@ void hvm_triple_fault(void)
struct domain *d = v->domain;
u8 reason = d->arch.hvm_domain.params[HVM_PARAM_TRIPLE_FAULT_REASON];
- gdprintk(XENLOG_INFO, "Triple fault on VCPU%d - "
- "invoking HVM shutdown action %"PRIu8".\n",
- v->vcpu_id, reason);
+ gprintk(XENLOG_INFO,
+ "Triple fault - invoking HVM shutdown action %d\n",
+ reason);
domain_shutdown(d, reason);
}
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2473,21 +2473,21 @@ static void ept_handle_violation(unsigne
/* Everything else is an error. */
mfn = get_gfn_query_unlocked(d, gfn, &p2mt);
- gdprintk(XENLOG_ERR, "EPT violation %#lx (%c%c%c/%c%c%c), "
- "gpa %#"PRIpaddr", mfn %#lx, type %i.\n",
- qualification,
- (qualification & EPT_READ_VIOLATION) ? 'r' : '-',
- (qualification & EPT_WRITE_VIOLATION) ? 'w' : '-',
- (qualification & EPT_EXEC_VIOLATION) ? 'x' : '-',
- (qualification & EPT_EFFECTIVE_READ) ? 'r' : '-',
- (qualification & EPT_EFFECTIVE_WRITE) ? 'w' : '-',
- (qualification & EPT_EFFECTIVE_EXEC) ? 'x' : '-',
- gpa, mfn_x(mfn), p2mt);
+ gprintk(XENLOG_ERR,
+ "EPT violation %#lx (%c%c%c/%c%c%c) gpa %#"PRIpaddr" mfn %#lx type %i\n",
+ qualification,
+ (qualification & EPT_READ_VIOLATION) ? 'r' : '-',
+ (qualification & EPT_WRITE_VIOLATION) ? 'w' : '-',
+ (qualification & EPT_EXEC_VIOLATION) ? 'x' : '-',
+ (qualification & EPT_EFFECTIVE_READ) ? 'r' : '-',
+ (qualification & EPT_EFFECTIVE_WRITE) ? 'w' : '-',
+ (qualification & EPT_EFFECTIVE_EXEC) ? 'x' : '-',
+ gpa, mfn_x(mfn), p2mt);
ept_walk_table(d, gfn);
if ( qualification & EPT_GLA_VALID )
- gdprintk(XENLOG_ERR, " --- GLA %#lx\n", gla);
+ gprintk(XENLOG_ERR, " --- GLA %#lx\n", gla);
domain_crash(d);
}
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1997,11 +1997,10 @@ int get_page(struct page_info *page, str
put_page(page);
if ( !paging_mode_refcounts(domain) && !domain->is_dying )
- gdprintk(XENLOG_INFO,
- "Error pfn %lx: rd=%p, od=%p, caf=%08lx, taf=%"
- PRtype_info "\n",
- page_to_mfn(page), domain, owner,
- page->count_info, page->u.inuse.type_info);
+ gprintk(XENLOG_INFO,
+ "Error pfn %lx: rd=%p, od=%p, caf=%08lx, taf=%" PRtype_info "\n",
+ page_to_mfn(page), domain, owner,
+ page->count_info, page->u.inuse.type_info);
return 0;
}
@@ -4042,9 +4041,8 @@ static int replace_grant_p2m_mapping(
if ( !p2m_is_grant(type) || mfn_x(old_mfn) != frame )
{
put_gfn(d, gfn);
- gdprintk(XENLOG_WARNING,
- "replace_grant_p2m_mapping: old mapping invalid (type %d, mfn %lx, frame %lx)\n",
- type, mfn_x(old_mfn), frame);
+ MEM_LOG("replace_grant_p2m_mapping: old mapping invalid (type %d, mfn %lx, frame %lx)",
+ type, mfn_x(old_mfn), frame);
return GNTST_general_error;
}
guest_physmap_remove_page(d, gfn, frame, PAGE_ORDER_4K);
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -912,14 +912,13 @@ void ept_walk_table(struct domain *d, un
int i;
- gdprintk(XENLOG_ERR, "Walking EPT tables for domain %d gfn %lx\n",
- d->domain_id, gfn);
+ gprintk(XENLOG_ERR, "Walking EPT tables for GFN %lx:\n", gfn);
/* This pfn is higher than the highest the p2m map currently holds */
if ( gfn > p2m->max_mapped_pfn )
{
- gdprintk(XENLOG_ERR, " gfn exceeds max_mapped_pfn %lx\n",
- p2m->max_mapped_pfn);
+ gprintk(XENLOG_ERR, " gfn exceeds max_mapped_pfn %lx\n",
+ p2m->max_mapped_pfn);
goto out;
}
@@ -932,7 +931,7 @@ void ept_walk_table(struct domain *d, un
index = gfn_remainder >> (i*EPT_TABLE_ORDER);
ept_entry = table + index;
- gdprintk(XENLOG_ERR, " epte %"PRIx64"\n", ept_entry->epte);
+ gprintk(XENLOG_ERR, " epte %"PRIx64"\n", ept_entry->epte);
if ( (i == 0) || !is_epte_present(ept_entry) ||
is_epte_superpage(ept_entry) )
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -519,9 +519,9 @@ static void do_guest_trap(
tb->flags |= TBF_INTERRUPT;
if ( unlikely(null_trap_bounce(v, tb)) )
- gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] "
- "on VCPU %d [ec=%04x]\n",
- trapstr(trapnr), trapnr, v->vcpu_id, regs->error_code);
+ gprintk(XENLOG_WARNING,
+ "Unhandled %s fault/trap [#%d, ec=%04x]\n",
+ trapstr(trapnr), trapnr, regs->error_code);
}
static void instruction_done(
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -164,7 +164,7 @@ unsigned int compat_iret(void)
return regs->_eax;
exit_and_crash:
- gdprintk(XENLOG_ERR, "Fatal error\n");
+ gprintk(XENLOG_ERR, "Fatal IRET error\n");
domain_crash(v->domain);
return 0;
}
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -291,8 +291,8 @@ unsigned long do_iret(void)
if ( unlikely(copy_from_user(&iret_saved, (void *)regs->rsp,
sizeof(iret_saved))) )
{
- gdprintk(XENLOG_ERR, "Fault while reading IRET context from "
- "guest stack\n");
+ gprintk(XENLOG_ERR,
+ "Fault while reading IRET context from guest stack\n");
goto exit_and_crash;
}
@@ -301,8 +301,8 @@ unsigned long do_iret(void)
{
if ( unlikely(pagetable_is_null(v->arch.guest_table_user)) )
{
- gdprintk(XENLOG_ERR, "Guest switching to user mode with no "
- "user page tables\n");
+ gprintk(XENLOG_ERR,
+ "Guest switching to user mode with no user page tables\n");
goto exit_and_crash;
}
toggle_guest_mode(v);
@@ -331,7 +331,6 @@ unsigned long do_iret(void)
return iret_saved.rax;
exit_and_crash:
- gdprintk(XENLOG_ERR, "Fatal error\n");
domain_crash(v->domain);
return 0;
}
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -74,9 +74,9 @@ static struct evtchn_fifo_queue *lock_ol
spin_unlock_irqrestore(&old_q->lock, *flags);
}
- gdprintk(XENLOG_WARNING,
- "domain %d, port %d lost event (too many queue changes)\n",
- d->domain_id, evtchn->port);
+ gprintk(XENLOG_WARNING,
+ "dom%d port %d lost event (too many queue changes)\n",
+ d->domain_id, evtchn->port);
return NULL;
}
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1645,9 +1645,9 @@ int assign_pages(
if ( unlikely((d->tot_pages + (1 << order)) > d->max_pages) )
{
if ( !opt_tmem || order != 0 || d->tot_pages != d->max_pages )
- gdprintk(XENLOG_INFO, "Over-allocation for domain %u: "
- "%u > %u\n", d->domain_id,
- d->tot_pages + (1 << order), d->max_pages);
+ gprintk(XENLOG_INFO, "Over-allocation for domain %u: "
+ "%u > %u\n", d->domain_id,
+ d->tot_pages + (1 << order), d->max_pages);
goto fail;
}
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1063,9 +1063,8 @@ long do_set_timer_op(s_time_t timeout)
* timeout in this case can burn a lot of CPU. We therefore go for a
* reasonable middleground of triggering a timer event in 100ms.
*/
- gdprintk(XENLOG_INFO,
- "Warning: huge timeout set by vcpu %d: %"PRIx64"\n",
- v->vcpu_id, (uint64_t)timeout);
+ gprintk(XENLOG_INFO, "Warning: huge timeout set: %"PRIx64"\n",
+ (uint64_t)timeout);
set_timer(&v->singleshot_timer, NOW() + MILLISECS(100));
}
else
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -84,6 +84,9 @@ extern long vm_assist(struct domain *, u
extern int __printk_ratelimit(int ratelimit_ms, int ratelimit_burst);
extern int printk_ratelimit(void);
+#define gprintk(lvl, fmt, args...) \
+ printk(XENLOG_GUEST lvl "%pv " fmt, current, ## args)
+
/* vsprintf.c */
#define sprintf __xen_has_no_sprintf__
#define vsprintf __xen_has_no_vsprintf__
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] make {,g}dprintk() a no‑op in non‑debug builds
2015-03-20 15:04 [PATCH 0/2] printk adjustments Jan Beulich
2015-03-20 15:12 ` [PATCH 1/2] introduce gprintk() Jan Beulich
@ 2015-03-20 15:13 ` Jan Beulich
2015-03-24 14:19 ` Ian Campbell
2015-03-25 17:26 ` [PATCH 0/2] printk adjustments Andrew Cooper
2 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2015-03-20 15:13 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan
[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]
As discussed before, code absolutely wanting to get something into the
log should use {,g}printk() instead.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -72,16 +72,6 @@
#define MB(_mb) (_AC(_mb, UL) << 20)
#define GB(_gb) (_AC(_gb, UL) << 30)
-#ifndef __ASSEMBLY__
-
-#define dprintk(_l, _f, _a...) \
- printk(_l "%s:%d: " _f, __FILE__ , __LINE__ , ## _a )
-#define gdprintk(_l, _f, _a...) \
- printk(XENLOG_GUEST _l "%s:%d:%pv " _f, __FILE__, \
- __LINE__, current, ## _a )
-
-#endif /* !__ASSEMBLY__ */
-
#define __STR(...) #__VA_ARGS__
#define STR(...) __STR(__VA_ARGS__)
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -87,6 +87,26 @@ extern int printk_ratelimit(void);
#define gprintk(lvl, fmt, args...) \
printk(XENLOG_GUEST lvl "%pv " fmt, current, ## args)
+#ifdef NDEBUG
+
+static inline void
+__attribute__ ((__format__ (__printf__, 2, 3)))
+dprintk(const char *lvl, const char *fmt, ...) {}
+
+static inline void
+__attribute__ ((__format__ (__printf__, 2, 3)))
+gdprintk(const char *lvl, const char *fmt, ...) {}
+
+#else
+
+#define dprintk(lvl, fmt, args...) \
+ printk(lvl "%s:%d: " fmt, __FILE__, __LINE__, ## args)
+#define gdprintk(lvl, fmt, args...) \
+ printk(XENLOG_GUEST lvl "%s:%d:%pv " fmt, \
+ __FILE__, __LINE__, current, ## args)
+
+#endif
+
/* vsprintf.c */
#define sprintf __xen_has_no_sprintf__
#define vsprintf __xen_has_no_vsprintf__
[-- Attachment #2: dprintk.patch --]
[-- Type: text/plain, Size: 1670 bytes --]
make {,g}dprintk() a no-op in non-debug builds
As discussed before, code absolutely wanting to get something into the
log should use {,g}printk() instead.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -72,16 +72,6 @@
#define MB(_mb) (_AC(_mb, UL) << 20)
#define GB(_gb) (_AC(_gb, UL) << 30)
-#ifndef __ASSEMBLY__
-
-#define dprintk(_l, _f, _a...) \
- printk(_l "%s:%d: " _f, __FILE__ , __LINE__ , ## _a )
-#define gdprintk(_l, _f, _a...) \
- printk(XENLOG_GUEST _l "%s:%d:%pv " _f, __FILE__, \
- __LINE__, current, ## _a )
-
-#endif /* !__ASSEMBLY__ */
-
#define __STR(...) #__VA_ARGS__
#define STR(...) __STR(__VA_ARGS__)
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -87,6 +87,26 @@ extern int printk_ratelimit(void);
#define gprintk(lvl, fmt, args...) \
printk(XENLOG_GUEST lvl "%pv " fmt, current, ## args)
+#ifdef NDEBUG
+
+static inline void
+__attribute__ ((__format__ (__printf__, 2, 3)))
+dprintk(const char *lvl, const char *fmt, ...) {}
+
+static inline void
+__attribute__ ((__format__ (__printf__, 2, 3)))
+gdprintk(const char *lvl, const char *fmt, ...) {}
+
+#else
+
+#define dprintk(lvl, fmt, args...) \
+ printk(lvl "%s:%d: " fmt, __FILE__, __LINE__, ## args)
+#define gdprintk(lvl, fmt, args...) \
+ printk(XENLOG_GUEST lvl "%s:%d:%pv " fmt, \
+ __FILE__, __LINE__, current, ## args)
+
+#endif
+
/* vsprintf.c */
#define sprintf __xen_has_no_sprintf__
#define vsprintf __xen_has_no_vsprintf__
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] make {,g}dprintk() a no‑op in non‑debug builds
2015-03-20 15:13 ` [PATCH 2/2] make {,g}dprintk() a no‑op in non‑debug builds Jan Beulich
@ 2015-03-24 14:19 ` Ian Campbell
0 siblings, 0 replies; 10+ messages in thread
From: Ian Campbell @ 2015-03-24 14:19 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Keir Fraser, Ian Jackson, Tim Deegan
On Fri, 2015-03-20 at 15:13 +0000, Jan Beulich wrote:
> As discussed before, code absolutely wanting to get something into the
> log should use {,g}printk() instead.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] introduce gprintk()
2015-03-20 15:12 ` [PATCH 1/2] introduce gprintk() Jan Beulich
@ 2015-03-24 14:20 ` Ian Campbell
2015-03-24 15:12 ` Julien Grall
0 siblings, 1 reply; 10+ messages in thread
From: Ian Campbell @ 2015-03-24 14:20 UTC (permalink / raw)
To: Jan Beulich
Cc: Keir Fraser, Stefano Stabellini, Ian Jackson, Tim Deegan,
Julien Grall, Andrew Cooper, xen-devel
On Fri, 2015-03-20 at 15:12 +0000, Jan Beulich wrote:
> ... and convert several gdprintk()-s to it, as the next patch will make
> them no-ops in non-debug builds.
>
> Note that as a non-debug facility this does not print file name and
> line number of the origin, to people are expected to use meaningful and
> easily distinguishable messages (i.e. just like with plain printk()).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> Note: ARM code was not touched.
I've done a pass, this goes after this series.
8<-----
>From 6a979279a489d60d29d12ff8639689e224e0bfdf Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Tue, 24 Mar 2015 14:17:40 +0000
Subject: [PATCH] xen: arm: use gprintk as appropriate
gdprintk is now only included with debug=y builds. Therefore:
- switch some uses to gprintk
- remove some now redundant #ifndef NDEBUG surrounding existing
gdprintk uses.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
xen/arch/arm/decode.c | 6 +++---
xen/arch/arm/traps.c | 20 +++-----------------
xen/arch/arm/vgic-v3.c | 4 ++--
xen/arch/arm/vgic.c | 10 +++++-----
xen/arch/arm/vtimer.c | 2 +-
5 files changed, 14 insertions(+), 28 deletions(-)
diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
index 9d237f8..c6f49a5 100644
--- a/xen/arch/arm/decode.c
+++ b/xen/arch/arm/decode.c
@@ -78,7 +78,7 @@ static int decode_thumb2(register_t pc, struct hsr_dabt *dabt, uint16_t hw1)
return 0;
bad_thumb2:
- gdprintk(XENLOG_ERR, "unhandled THUMB2 instruction 0x%x%x\n", hw1, hw2);
+ gprintk(XENLOG_ERR, "unhandled THUMB2 instruction 0x%x%x\n", hw1, hw2);
return 1;
}
@@ -145,7 +145,7 @@ static int decode_thumb(register_t pc, struct hsr_dabt *dabt)
return 0;
bad_thumb:
- gdprintk(XENLOG_ERR, "unhandled THUMB instruction 0x%x\n", instr);
+ gprintk(XENLOG_ERR, "unhandled THUMB instruction 0x%x\n", instr);
return 1;
}
@@ -155,7 +155,7 @@ int decode_instruction(const struct cpu_user_regs *regs, struct hsr_dabt *dabt)
return decode_thumb(regs->pc, dabt);
/* TODO: Handle ARM instruction */
- gdprintk(XENLOG_ERR, "unhandled ARM instruction\n");
+ gprintk(XENLOG_ERR, "unhandled ARM instruction\n");
return 1;
}
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 89cbde6..7216daf 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1674,14 +1674,12 @@ static void do_cp15_32(struct cpu_user_regs *regs,
break;
default:
-#ifndef NDEBUG
gdprintk(XENLOG_ERR,
"%s p15, %d, r%d, cr%d, cr%d, %d @ 0x%"PRIregister"\n",
cp32.read ? "mrc" : "mcr",
cp32.op1, cp32.reg, cp32.crn, cp32.crm, cp32.op2, regs->pc);
gdprintk(XENLOG_ERR, "unhandled 32-bit CP15 access %#x\n",
hsr.bits & HSR_CP32_REGS_MASK);
-#endif
inject_undef_exception(regs, hsr.len);
return;
}
@@ -1709,7 +1707,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
break;
default:
{
-#ifndef NDEBUG
struct hsr_cp64 cp64 = hsr.cp64;
gdprintk(XENLOG_ERR,
@@ -1718,7 +1715,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc);
gdprintk(XENLOG_ERR, "unhandled 64-bit CP15 access %#x\n",
hsr.bits & HSR_CP64_REGS_MASK);
-#endif
inject_undef_exception(regs, hsr.len);
return;
}
@@ -1780,14 +1776,12 @@ static void do_cp14_32(struct cpu_user_regs *regs, union hsr hsr)
default:
bad_cp:
-#ifndef NDEBUG
gdprintk(XENLOG_ERR,
"%s p14, %d, r%d, cr%d, cr%d, %d @ 0x%"PRIregister"\n",
cp32.read ? "mrc" : "mcr",
cp32.op1, cp32.reg, cp32.crn, cp32.crm, cp32.op2, regs->pc);
gdprintk(XENLOG_ERR, "unhandled 32-bit cp14 access %#x\n",
hsr.bits & HSR_CP32_REGS_MASK);
-#endif
inject_undef_exception(regs, hsr.len);
return;
}
@@ -1797,9 +1791,7 @@ bad_cp:
static void do_cp14_dbg(struct cpu_user_regs *regs, union hsr hsr)
{
-#ifndef NDEBUG
struct hsr_cp64 cp64 = hsr.cp64;
-#endif
if ( !check_conditional_instr(regs, hsr) )
{
@@ -1807,22 +1799,19 @@ static void do_cp14_dbg(struct cpu_user_regs *regs, union hsr hsr)
return;
}
-#ifndef NDEBUG
gdprintk(XENLOG_ERR,
"%s p14, %d, r%d, r%d, cr%d @ 0x%"PRIregister"\n",
cp64.read ? "mrrc" : "mcrr",
cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc);
gdprintk(XENLOG_ERR, "unhandled 64-bit CP14 access %#x\n",
hsr.bits & HSR_CP64_REGS_MASK);
-#endif
+
inject_undef_exception(regs, hsr.len);
}
static void do_cp(struct cpu_user_regs *regs, union hsr hsr)
{
-#ifndef NDEBUG
struct hsr_cp cp = hsr.cp;
-#endif
if ( !check_conditional_instr(regs, hsr) )
{
@@ -1830,10 +1819,8 @@ static void do_cp(struct cpu_user_regs *regs, union hsr hsr)
return;
}
-#ifndef NDEBUG
ASSERT(!cp.tas); /* We don't trap SIMD instruction */
gdprintk(XENLOG_ERR, "unhandled CP%d access\n", cp.coproc);
-#endif
inject_undef_exception(regs, hsr.len);
}
@@ -1910,7 +1897,6 @@ static void do_sysreg(struct cpu_user_regs *regs,
bad_sysreg:
{
struct hsr_sysreg sysreg = hsr.sysreg;
-#ifndef NDEBUG
gdprintk(XENLOG_ERR,
"%s %d, %d, c%d, c%d, %d %s x%d @ 0x%"PRIregister"\n",
@@ -1922,7 +1908,7 @@ static void do_sysreg(struct cpu_user_regs *regs,
sysreg.reg, regs->pc);
gdprintk(XENLOG_ERR, "unhandled 64-bit sysreg access %#x\n",
hsr.bits & HSR_SYSREG_REGS_MASK);
-#endif
+
inject_undef_exception(regs, sysreg.len);
return;
}
@@ -2035,7 +2021,7 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
rc = decode_instruction(regs, &info.dabt);
if ( rc )
{
- gdprintk(XENLOG_DEBUG, "Unable to decode instruction\n");
+ gprintk(XENLOG_DEBUG, "Unable to decode instruction\n");
goto bad_data_abort;
}
}
diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c
index ec79c2a..81fbb26 100644
--- a/xen/arch/arm/vgic-v3.c
+++ b/xen/arch/arm/vgic-v3.c
@@ -1022,7 +1022,7 @@ static int vgic_v3_to_sgi(struct vcpu *v, register_t sgir)
sgi_mode = SGI_TARGET_OTHERS;
break;
default:
- gdprintk(XENLOG_WARNING, "Wrong irq mode in SGI1R_EL1 register\n");
+ gprintk(XENLOG_WARNING, "Wrong irq mode in SGI1R_EL1 register\n");
return 0;
}
@@ -1050,7 +1050,7 @@ static int vgic_v3_emulate_sysreg(struct cpu_user_regs *regs, union hsr hsr)
return vgic_v3_to_sgi(v, *r);
else
{
- gdprintk(XENLOG_WARNING, "Reading SGI1R_EL1 - WO register\n");
+ gprintk(XENLOG_WARNING, "Reading SGI1R_EL1 - WO register\n");
return 0;
}
default:
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index c14d79d..7b27900 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -337,9 +337,9 @@ int vgic_to_sgi(struct vcpu *v, register_t sgir, enum gic_sgi_mode irqmode, int
set_bit(current->vcpu_id, &vcpu_mask);
break;
default:
- gdprintk(XENLOG_WARNING,
- "vGICD:unhandled GICD_SGIR write %"PRIregister" \
- with wrong mode\n", sgir);
+ gprintk(XENLOG_WARNING,
+ "vGICD:unhandled GICD_SGIR write %"PRIregister" \
+ with wrong mode\n", sgir);
return 0;
}
@@ -347,8 +347,8 @@ int vgic_to_sgi(struct vcpu *v, register_t sgir, enum gic_sgi_mode irqmode, int
{
if ( d->vcpu[vcpuid] != NULL && !is_vcpu_online(d->vcpu[vcpuid]) )
{
- gdprintk(XENLOG_WARNING, "VGIC: write r=%"PRIregister" \
- vcpu_mask=%lx, wrong CPUTargetList\n", sgir, vcpu_mask);
+ gprintk(XENLOG_WARNING, "VGIC: write r=%"PRIregister" \
+ vcpu_mask=%lx, wrong CPUTargetList\n", sgir, vcpu_mask);
continue;
}
vgic_vcpu_inject_irq(d->vcpu[vcpuid], virq);
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 4427ae5..287bb93 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -217,7 +217,7 @@ static int vtimer_cntpct(struct cpu_user_regs *regs, uint64_t *r, int read)
}
else
{
- gdprintk(XENLOG_DEBUG, "WRITE to R/O CNTPCT\n");
+ gprintk(XENLOG_DEBUG, "WRITE to R/O CNTPCT\n");
return 0;
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] introduce gprintk()
2015-03-24 14:20 ` Ian Campbell
@ 2015-03-24 15:12 ` Julien Grall
2015-03-24 15:31 ` Jan Beulich
2015-03-24 15:42 ` Ian Campbell
0 siblings, 2 replies; 10+ messages in thread
From: Julien Grall @ 2015-03-24 15:12 UTC (permalink / raw)
To: Ian Campbell, Jan Beulich
Cc: Keir Fraser, Stefano Stabellini, Tim Deegan, Ian Jackson,
Julien Grall, Andrew Cooper, xen-devel
Hi Ian,
On 24/03/2015 14:20, Ian Campbell wrote:
> @@ -1709,7 +1707,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
> break;
> default:
> {
> -#ifndef NDEBUG
> struct hsr_cp64 cp64 = hsr.cp64;
>
> gdprintk(XENLOG_ERR,
> @@ -1718,7 +1715,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
> cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc);
> gdprintk(XENLOG_ERR, "unhandled 64-bit CP15 access %#x\n",
> hsr.bits & HSR_CP64_REGS_MASK);
> -#endif
Did you try to build with debug=n ? I suspect that GCC will warn about
the unused cp64.
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] introduce gprintk()
2015-03-24 15:12 ` Julien Grall
@ 2015-03-24 15:31 ` Jan Beulich
2015-03-24 15:36 ` Julien Grall
2015-03-24 15:42 ` Ian Campbell
1 sibling, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2015-03-24 15:31 UTC (permalink / raw)
To: Julien Grall
Cc: Keir Fraser, Ian Campbell, Stefano Stabellini, Andrew Cooper,
Ian Jackson, Tim Deegan, Julien Grall, xen-devel
>>> On 24.03.15 at 16:12, <julien.grall@linaro.org> wrote:
> Hi Ian,
>
> On 24/03/2015 14:20, Ian Campbell wrote:
>> @@ -1709,7 +1707,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
>> break;
>> default:
>> {
>> -#ifndef NDEBUG
>> struct hsr_cp64 cp64 = hsr.cp64;
>>
>> gdprintk(XENLOG_ERR,
>> @@ -1718,7 +1715,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
>> cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc);
>> gdprintk(XENLOG_ERR, "unhandled 64-bit CP15 access %#x\n",
>> hsr.bits & HSR_CP64_REGS_MASK);
>> -#endif
>
> Did you try to build with debug=n ? I suspect that GCC will warn about
> the unused cp64.
I don't think so - gdprintk() in the NDEBUG case is specifically an
inline function instead of a macro, to avoid this very issue.
Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] introduce gprintk()
2015-03-24 15:31 ` Jan Beulich
@ 2015-03-24 15:36 ` Julien Grall
0 siblings, 0 replies; 10+ messages in thread
From: Julien Grall @ 2015-03-24 15:36 UTC (permalink / raw)
To: Jan Beulich
Cc: Keir Fraser, Ian Campbell, Stefano Stabellini, Andrew Cooper,
Ian Jackson, Tim Deegan, Julien Grall, xen-devel
Hi Jan,
On 24/03/2015 15:31, Jan Beulich wrote:
>>>> On 24.03.15 at 16:12, <julien.grall@linaro.org> wrote:
>> Hi Ian,
>>
>> On 24/03/2015 14:20, Ian Campbell wrote:
>>> @@ -1709,7 +1707,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
>>> break;
>>> default:
>>> {
>>> -#ifndef NDEBUG
>>> struct hsr_cp64 cp64 = hsr.cp64;
>>>
>>> gdprintk(XENLOG_ERR,
>>> @@ -1718,7 +1715,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
>>> cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc);
>>> gdprintk(XENLOG_ERR, "unhandled 64-bit CP15 access %#x\n",
>>> hsr.bits & HSR_CP64_REGS_MASK);
>>> -#endif
>>
>> Did you try to build with debug=n ? I suspect that GCC will warn about
>> the unused cp64.
>
> I don't think so - gdprintk() in the NDEBUG case is specifically an
> inline function instead of a macro, to avoid this very issue.
I wasn't sure about it. So
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] introduce gprintk()
2015-03-24 15:12 ` Julien Grall
2015-03-24 15:31 ` Jan Beulich
@ 2015-03-24 15:42 ` Ian Campbell
1 sibling, 0 replies; 10+ messages in thread
From: Ian Campbell @ 2015-03-24 15:42 UTC (permalink / raw)
To: Julien Grall
Cc: Keir Fraser, Stefano Stabellini, Ian Jackson, Tim Deegan,
Julien Grall, Jan Beulich, Andrew Cooper, xen-devel
On Tue, 2015-03-24 at 15:12 +0000, Julien Grall wrote:
> Hi Ian,
>
> On 24/03/2015 14:20, Ian Campbell wrote:
> > @@ -1709,7 +1707,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
> > break;
> > default:
> > {
> > -#ifndef NDEBUG
> > struct hsr_cp64 cp64 = hsr.cp64;
> >
> > gdprintk(XENLOG_ERR,
> > @@ -1718,7 +1715,6 @@ static void do_cp15_64(struct cpu_user_regs *regs,
> > cp64.op1, cp64.reg1, cp64.reg2, cp64.crm, regs->pc);
> > gdprintk(XENLOG_ERR, "unhandled 64-bit CP15 access %#x\n",
> > hsr.bits & HSR_CP64_REGS_MASK);
> > -#endif
>
> Did you try to build with debug=n ? I suspect that GCC will warn about
> the unused cp64.
I did, and it didn't.
Ian.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] printk adjustments
2015-03-20 15:04 [PATCH 0/2] printk adjustments Jan Beulich
2015-03-20 15:12 ` [PATCH 1/2] introduce gprintk() Jan Beulich
2015-03-20 15:13 ` [PATCH 2/2] make {,g}dprintk() a no‑op in non‑debug builds Jan Beulich
@ 2015-03-25 17:26 ` Andrew Cooper
2 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2015-03-25 17:26 UTC (permalink / raw)
To: xen-devel
On 20/03/15 16:04, Jan Beulich wrote:
> 1: introduce gprintk()
> 2: make {,g}dprintk() a no-op in non-debug builds
>
> Signed-off-by: Jan Beulich<jbeulich@suse.com>
Both Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
It is likely that some other shifting of messages will happen, but lets
see what this looks like as a first pass.
~Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-03-25 17:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 15:04 [PATCH 0/2] printk adjustments Jan Beulich
2015-03-20 15:12 ` [PATCH 1/2] introduce gprintk() Jan Beulich
2015-03-24 14:20 ` Ian Campbell
2015-03-24 15:12 ` Julien Grall
2015-03-24 15:31 ` Jan Beulich
2015-03-24 15:36 ` Julien Grall
2015-03-24 15:42 ` Ian Campbell
2015-03-20 15:13 ` [PATCH 2/2] make {,g}dprintk() a no‑op in non‑debug builds Jan Beulich
2015-03-24 14:19 ` Ian Campbell
2015-03-25 17:26 ` [PATCH 0/2] printk adjustments Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.