From: Jean Guyader Date: Fri, 26 Jun 2009 08:17:59 +0000 (+0100) Subject: Fix OProfile escape code collision between Xenoprof's X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=97b1e293bee58f2cffa45260a51f349b2516de05;p=xenclient%2Flinux-2.6.27-pq.git Fix OProfile escape code collision between Xenoprof's DOMAIN_SWITCH_CODE (in use on x86 and ia64) and Cell's SPU_PROFILING_CODE(in use with Power) Signed-off-by: Jose Renato Santos --- diff --git a/master/fix_domain_switch_code b/master/fix_domain_switch_code new file mode 100644 index 0000000..4d19b91 --- /dev/null +++ b/master/fix_domain_switch_code @@ -0,0 +1,23 @@ +diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h +index bb8a349..44a2138 100644 +--- a/include/linux/oprofile.h ++++ b/include/linux/oprofile.h +@@ -37,9 +37,18 @@ + #define TRACE_BEGIN_CODE 8 + #define TRACE_END_CODE 9 + #define XEN_ENTER_SWITCH_CODE 10 ++/* ++ * Ugly work-around for the unfortunate collision between Xenoprof's ++ * DOMAIN_SWITCH_CODE (in use on x86 and ia64) and Cell's SPU_PROFILING_CODE ++ * (in use with Power): ++ */ ++#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_IA64) ++#define DOMAIN_SWITCH_CODE 11 ++#else + #define SPU_PROFILING_CODE 11 + #define SPU_CTX_SWITCH_CODE 12 + #define DOMAIN_SWITCH_CODE 13 ++#endif + + struct super_block; + struct dentry; diff --git a/master/series b/master/series index b01e0af..e170447 100644 --- a/master/series +++ b/master/series @@ -251,6 +251,7 @@ dom0-swap-extra-debugging oom-debugging oom-debug-me-harder sysrq-loglevel +fix_domain_switch_code # # XenClient