From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Dario Faggioli <dfaggioli@suse.com>
Subject: [PATCH] xen/ARM+sched: Don't opencode %pv in printk()'s
Date: Thu, 30 Aug 2018 13:50:42 +0100 [thread overview]
Message-ID: <1535633442-26045-1-git-send-email-andrew.cooper3@citrix.com> (raw)
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien.grall@arm.com>
CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Dario Faggioli <dfaggioli@suse.com>
---
xen/arch/arm/gic-vgic.c | 12 ++++++------
xen/common/sched_null.c | 15 ++++++---------
2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c
index fd63906..990399c 100644
--- a/xen/arch/arm/gic-vgic.c
+++ b/xen/arch/arm/gic-vgic.c
@@ -94,8 +94,8 @@ void gic_raise_inflight_irq(struct vcpu *v, unsigned int virtual_irq)
}
#ifdef GIC_DEBUG
else
- gdprintk(XENLOG_DEBUG, "trying to inject irq=%u into d%dv%d, when it is still lr_pending\n",
- virtual_irq, v->domain->domain_id, v->vcpu_id);
+ gdprintk(XENLOG_DEBUG, "trying to inject irq=%u into %pv, when it is still lr_pending\n",
+ virtual_irq, v);
#endif
}
@@ -201,8 +201,8 @@ static void gic_update_one_lr(struct vcpu *v, int i)
gic_hw_ops->write_lr(i, &lr_val);
}
else
- gdprintk(XENLOG_WARNING, "unable to inject hw irq=%d into d%dv%d: already active in LR%d\n",
- irq, v->domain->domain_id, v->vcpu_id, i);
+ gdprintk(XENLOG_WARNING, "unable to inject hw irq=%d into %pv: already active in LR%d\n",
+ irq, v, i);
}
}
else if ( lr_val.pending )
@@ -210,8 +210,8 @@ static void gic_update_one_lr(struct vcpu *v, int i)
int q __attribute__ ((unused)) = test_and_clear_bit(GIC_IRQ_GUEST_QUEUED, &p->status);
#ifdef GIC_DEBUG
if ( q )
- gdprintk(XENLOG_DEBUG, "trying to inject irq=%d into d%dv%d, when it is already pending in LR%d\n",
- irq, v->domain->domain_id, v->vcpu_id, i);
+ gdprintk(XENLOG_DEBUG, "trying to inject irq=%d into %pv, when it is already pending in LR%d\n",
+ irq, v, i);
#endif
}
else
diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c
index 784db71..7b039b7 100644
--- a/xen/common/sched_null.c
+++ b/xen/common/sched_null.c
@@ -344,7 +344,7 @@ static void vcpu_assign(struct null_private *prv, struct vcpu *v,
v->processor = cpu;
cpumask_clear_cpu(cpu, &prv->cpus_free);
- dprintk(XENLOG_G_INFO, "%d <-- d%dv%d\n", cpu, v->domain->domain_id, v->vcpu_id);
+ dprintk(XENLOG_G_INFO, "%d <-- %pv\n", cpu, v);
if ( unlikely(tb_init_done) )
{
@@ -365,7 +365,7 @@ static void vcpu_deassign(struct null_private *prv, struct vcpu *v,
per_cpu(npc, cpu).vcpu = NULL;
cpumask_set_cpu(cpu, &prv->cpus_free);
- dprintk(XENLOG_G_INFO, "%d <-- NULL (d%dv%d)\n", cpu, v->domain->domain_id, v->vcpu_id);
+ dprintk(XENLOG_G_INFO, "%d <-- NULL (%pv)\n", cpu, v);
if ( unlikely(tb_init_done) )
{
@@ -460,8 +460,7 @@ static void null_vcpu_insert(const struct scheduler *ops, struct vcpu *v)
*/
spin_lock(&prv->waitq_lock);
list_add_tail(&nvc->waitq_elem, &prv->waitq);
- dprintk(XENLOG_G_WARNING, "WARNING: d%dv%d not assigned to any CPU!\n",
- v->domain->domain_id, v->vcpu_id);
+ dprintk(XENLOG_G_WARNING, "WARNING: %pv not assigned to any CPU!\n", v);
spin_unlock(&prv->waitq_lock);
}
spin_unlock_irq(lock);
@@ -649,8 +648,7 @@ static void null_vcpu_migrate(const struct scheduler *ops, struct vcpu *v,
if ( list_empty(&nvc->waitq_elem) )
{
list_add_tail(&nvc->waitq_elem, &prv->waitq);
- dprintk(XENLOG_G_WARNING, "WARNING: d%dv%d not assigned to any CPU!\n",
- v->domain->domain_id, v->vcpu_id);
+ dprintk(XENLOG_G_WARNING, "WARNING: %pv not assigned to any CPU!\n", v);
}
spin_unlock(&prv->waitq_lock);
}
@@ -804,8 +802,7 @@ static void null_dump_pcpu(const struct scheduler *ops, int cpu)
cpumask_scnprintf(cpustr, sizeof(cpustr), per_cpu(cpu_core_mask, cpu));
printk("core=%s", cpustr);
if ( per_cpu(npc, cpu).vcpu != NULL )
- printk(", vcpu=d%dv%d", per_cpu(npc, cpu).vcpu->domain->domain_id,
- per_cpu(npc, cpu).vcpu->vcpu_id);
+ printk(", vcpu=%pv", per_cpu(npc, cpu).vcpu);
printk("\n");
/* current VCPU (nothing to say if that's the idle vcpu) */
@@ -870,7 +867,7 @@ static void null_dump(const struct scheduler *ops)
printk(", ");
if ( loop % 24 == 0 )
printk("\n\t");
- printk("d%dv%d", nvc->vcpu->domain->domain_id, nvc->vcpu->vcpu_id);
+ printk("%pv", nvc->vcpu);
}
printk("\n");
spin_unlock(&prv->waitq_lock);
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-08-30 12:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 12:50 Andrew Cooper [this message]
2018-08-30 19:06 ` [PATCH] xen/ARM+sched: Don't opencode %pv in printk()'s Stefano Stabellini
2018-09-06 15:54 ` George Dunlap
2018-09-10 11:34 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1535633442-26045-1-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=dfaggioli@suse.com \
--cc=george.dunlap@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).