* [PATCH 1 of 2] xenoprof: Use uint64_t explicitly for internal calls
[not found] <patchbomb.1327421382@elijah>
@ 2012-01-24 16:09 ` George Dunlap
2012-01-24 16:09 ` [PATCH 2 of 2] xenoprof: Make the escape code consistent across 32 and 64-bit xen George Dunlap
2012-01-24 16:13 ` [PATCH 0 of 2] xenoprof: Fix 32-on-64 bit (supplemental) George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2012-01-24 16:09 UTC (permalink / raw)
To: xen-devel; +Cc: george.dunlap
A recent changeset to make XENOPROF_ESCAPE_CODE consistent across
32- and 64-bit builds caused a build failure, because values were
passed through functions as "unsigned long". Replace these with
uint64_t explicitly.
Also remove redundant function prototype from perfmon.c, now that
it's in a header file.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
diff -r 370924e204dc -r dc346270f1aa xen/arch/ia64/xen/oprofile/perfmon.c
--- a/xen/arch/ia64/xen/oprofile/perfmon.c Mon Jan 23 15:10:43 2012 +0000
+++ b/xen/arch/ia64/xen/oprofile/perfmon.c Tue Jan 24 16:09:14 2012 +0000
@@ -38,8 +38,6 @@
#include <asm/vmx.h> /* for vmx_user_mode() */
// XXX move them to an appropriate header file
-extern void xenoprof_log_event(struct vcpu *vcpu, struct pt_regs * regs,
- unsigned long eip, int mode, int event);
extern int is_active(struct domain *d);
static int allow_virq;
diff -r 370924e204dc -r dc346270f1aa xen/common/xenoprof.c
--- a/xen/common/xenoprof.c Mon Jan 23 15:10:43 2012 +0000
+++ b/xen/common/xenoprof.c Tue Jan 24 16:09:14 2012 +0000
@@ -475,7 +475,7 @@ static int xenoprof_buf_space(struct dom
/* Check for space and add a sample. Return 1 if successful, 0 otherwise. */
static int xenoprof_add_sample(struct domain *d, xenoprof_buf_t *buf,
- unsigned long eip, int mode, int event)
+ uint64_t eip, int mode, int event)
{
int head, tail, size;
@@ -512,7 +512,7 @@ static int xenoprof_add_sample(struct do
}
int xenoprof_add_trace(struct domain *d, struct vcpu *vcpu,
- unsigned long eip, int mode)
+ uint64_t eip, int mode)
{
xenoprof_buf_t *buf = d->xenoprof->vcpu[vcpu->vcpu_id].buffer;
@@ -527,7 +527,7 @@ int xenoprof_add_trace(struct domain *d,
}
void xenoprof_log_event(struct vcpu *vcpu,
- struct cpu_user_regs * regs, unsigned long eip,
+ struct cpu_user_regs * regs, uint64_t eip,
int mode, int event)
{
struct domain *d = vcpu->domain;
diff -r 370924e204dc -r dc346270f1aa xen/include/xen/xenoprof.h
--- a/xen/include/xen/xenoprof.h Mon Jan 23 15:10:43 2012 +0000
+++ b/xen/include/xen/xenoprof.h Tue Jan 24 16:09:14 2012 +0000
@@ -69,7 +69,7 @@ int is_passive(struct domain *d);
void free_xenoprof_pages(struct domain *d);
int xenoprof_add_trace(struct domain *d, struct vcpu *v,
- unsigned long eip, int mode);
+ uint64_t eip, int mode);
#define PMU_OWNER_NONE 0
#define PMU_OWNER_XENOPROF 1
@@ -78,7 +78,7 @@ int acquire_pmu_ownship(int pmu_ownershi
void release_pmu_ownship(int pmu_ownership);
void xenoprof_log_event(struct vcpu *vcpu,
- struct cpu_user_regs * regs, unsigned long eip,
+ struct cpu_user_regs * regs, uint64_t eip,
int mode, int event);
#endif /* __XEN__XENOPROF_H__ */
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2 of 2] xenoprof: Make the escape code consistent across 32 and 64-bit xen
[not found] <patchbomb.1327421382@elijah>
2012-01-24 16:09 ` [PATCH 1 of 2] xenoprof: Use uint64_t explicitly for internal calls George Dunlap
@ 2012-01-24 16:09 ` George Dunlap
2012-01-24 16:13 ` [PATCH 0 of 2] xenoprof: Fix 32-on-64 bit (supplemental) George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2012-01-24 16:09 UTC (permalink / raw)
To: xen-devel; +Cc: george.dunlap
At the moment, the xenoprof escape code is defined as "~0UL".
Unfortunately, this expands to 0xffffffff on 32-bit systems
and 0xffffffffffffffff on 64-bit systems; with the result that
while 32-on-32 and 64-in-64 work fine, 32-on-64 (also known as
"compat mode") is broken.
This patch makes the definition consistent across architectures.
In so doing, it will break old-32-bit-on-new-Xen, and vice versa;
but this was seen as an acceptable thing to do.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
diff -r dc346270f1aa -r c6111aec665a xen/include/public/xenoprof.h
--- a/xen/include/public/xenoprof.h Tue Jan 24 16:09:14 2012 +0000
+++ b/xen/include/public/xenoprof.h Tue Jan 24 16:09:15 2012 +0000
@@ -68,7 +68,7 @@ struct event_log {
};
/* PC value that indicates a special code */
-#define XENOPROF_ESCAPE_CODE ~0UL
+#define XENOPROF_ESCAPE_CODE (~0ULL)
/* Transient events for the xenoprof->oprofile cpu buf */
#define XENOPROF_TRACE_BEGIN 1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0 of 2] xenoprof: Fix 32-on-64 bit (supplemental)
[not found] <patchbomb.1327421382@elijah>
2012-01-24 16:09 ` [PATCH 1 of 2] xenoprof: Use uint64_t explicitly for internal calls George Dunlap
2012-01-24 16:09 ` [PATCH 2 of 2] xenoprof: Make the escape code consistent across 32 and 64-bit xen George Dunlap
@ 2012-01-24 16:13 ` George Dunlap
2012-01-24 16:17 ` George Dunlap
2 siblings, 1 reply; 4+ messages in thread
From: George Dunlap @ 2012-01-24 16:13 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
Actually, please hold off on applying these for a minute -- I meant to
cancel the send pending a final build check (both 32- and 64-bit), but
it didn't work. I'll send an ACK when they're ready.
-George
On Tue, 2012-01-24 at 16:09 +0000, George Dunlap wrote:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0 of 2] xenoprof: Fix 32-on-64 bit (supplemental)
2012-01-24 16:13 ` [PATCH 0 of 2] xenoprof: Fix 32-on-64 bit (supplemental) George Dunlap
@ 2012-01-24 16:17 ` George Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2012-01-24 16:17 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
On Tue, 2012-01-24 at 16:13 +0000, George Dunlap wrote:
> Actually, please hold off on applying these for a minute -- I meant to
> cancel the send pending a final build check (both 32- and 64-bit), but
> it didn't work. I'll send an ACK when they're ready.
OK, I think things are all good.
ACKed-by: George Dunlap <george.dunlap@eu.citrix.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-24 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <patchbomb.1327421382@elijah>
2012-01-24 16:09 ` [PATCH 1 of 2] xenoprof: Use uint64_t explicitly for internal calls George Dunlap
2012-01-24 16:09 ` [PATCH 2 of 2] xenoprof: Make the escape code consistent across 32 and 64-bit xen George Dunlap
2012-01-24 16:13 ` [PATCH 0 of 2] xenoprof: Fix 32-on-64 bit (supplemental) George Dunlap
2012-01-24 16:17 ` George Dunlap
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).