All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] lttng-ust: fix ppc build
@ 2011-02-10  7:03 Dexuan Cui
  2011-02-10  7:03 ` [PATCH 1/1] lttng-ust: fix ppc build by removing ppc specific time reading function Dexuan Cui
  2011-02-10 13:19 ` [PATCH 0/1] lttng-ust: fix ppc build Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Dexuan Cui @ 2011-02-10  7:03 UTC (permalink / raw)
  To: poky

From: Dexuan Cui <dexuan.cui@intel.com>

Here I introduced a patch from lttng mailing list to fix ppc build:
http://lists.casi.polymtl.ca/pipermail/ltt-dev/2011-February/003903.html

The patch looks good and I think it would be in next release.
At present, let's add it into SRC_URI.

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: dcui/master
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/master

Thanks,
    Dexuan Cui <dexuan.cui@intel.com>
---


Dexuan Cui (1):
  lttng-ust: fix ppc build by removing ppc specific time reading
    function

 ...remove_ppc_specific_time_reading_function.patch |   85 ++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-ust_0.11.bb        |    6 +-
 2 files changed, 89 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-ust-0.11/remove_ppc_specific_time_reading_function.patch

-- 
1.7.2



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] lttng-ust: fix ppc build by removing ppc specific time reading function
  2011-02-10  7:03 [PATCH 0/1] lttng-ust: fix ppc build Dexuan Cui
@ 2011-02-10  7:03 ` Dexuan Cui
  2011-02-10 13:19 ` [PATCH 0/1] lttng-ust: fix ppc build Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Dexuan Cui @ 2011-02-10  7:03 UTC (permalink / raw)
  To: poky

From: Dexuan Cui <dexuan.cui@intel.com>

Here I introduced a patch from lttng mailing list to fix ppc build.
See the patch for more details.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 ...remove_ppc_specific_time_reading_function.patch |   85 ++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-ust_0.11.bb        |    6 +-
 2 files changed, 89 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-ust-0.11/remove_ppc_specific_time_reading_function.patch

diff --git a/meta/recipes-kernel/lttng/lttng-ust-0.11/remove_ppc_specific_time_reading_function.patch b/meta/recipes-kernel/lttng/lttng-ust-0.11/remove_ppc_specific_time_reading_function.patch
new file mode 100644
index 0000000..c5487fd
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust-0.11/remove_ppc_specific_time_reading_function.patch
@@ -0,0 +1,85 @@
+Dexuan Cui <dexuan.cui@intel.com>: I got the following patch from lttng dev
+mailing list:
+http://lists.casi.polymtl.ca/pipermail/ltt-dev/2011-February/003903.html
+The patch looks good and I think it would be in next release. At present,
+let's add it into SRC_URI.
+
+-----------------------------------------------------------------
+The PPC version of the trace_clock_read64 was using the TB register
+which is not constant accross implementations. The currently
+measured time base on PPC was not accurate.
+So, for now, we rely on the CLOCK_MONOTONIC.
+
+This patch remove a bunch of #ifdef for x86 and PPC, since we now rely on
+the same base clock. It also fix the build on PPC that was currently broken
+
+Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
+-----------------------------------------------------------------
+
+--- a/include/ust/clock.h
++++ b/include/ust/clock.h
+@@ -39,7 +39,6 @@
+    precision and monotonicity.
+ */
+ 
+-#if __i386__ || __x86_64__
+ /* Only available for x86 arch */
+ #define CLOCK_TRACE_FREQ  14
+ #define CLOCK_TRACE  15
+@@ -47,36 +46,10 @@
+ 	struct timespec ts;
+ 	u64 lttng_ts;
+ };
+-#endif /* __i386__ || __x86_64__ */
+ 
+ extern int ust_clock_source;
+ 
+ /* Choosing correct trace clock */
+-#if __PPC__
+-static __inline__ u64 trace_clock_read64(void)
+-{
+-	unsigned long tb_l;
+-	unsigned long tb_h;
+-	unsigned long tb_h2;
+-	u64 tb;
+-
+-	__asm__ (
+-		"1:\n\t"
+-		"mftbu %[rhigh]\n\t"
+-		"mftb %[rlow]\n\t"
+-		"mftbu %[rhigh2]\n\t"
+-		"cmpw %[rhigh],%[rhigh2]\n\t"
+-		"bne 1b\n\t"
+-		: [rhigh] "=r" (tb_h), [rhigh2] "=r" (tb_h2), [rlow] "=r" (tb_l));
+-
+-	tb = tb_h;
+-	tb <<= 32;
+-	tb |= tb_l;
+-
+-	return tb;
+-}
+-
+-#else	/* !__PPC__ */
+ 
+ static __inline__ u64 trace_clock_read64(void)
+ {
+@@ -101,17 +74,17 @@
+ 	return retval;
+ }
+ 
+-#endif /* __PPC__ */
+-
+ static __inline__ u64 trace_clock_frequency(void)
+ {
+ 	struct timespec ts;
+ 	union lttng_timespec *lts = (union lttng_timespec *) &ts;
+ 
++#if __i386__ || __x86_64__
+ 	if (likely(ust_clock_source == CLOCK_TRACE)) {
+ 		clock_gettime(CLOCK_TRACE_FREQ, &ts);
+ 		return lts->lttng_ts;
+ 	}
++#endif
+ 	return 1000000000LL;
+ }
+ 
diff --git a/meta/recipes-kernel/lttng/lttng-ust_0.11.bb b/meta/recipes-kernel/lttng/lttng-ust_0.11.bb
index 575e35a..9d2063a 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_0.11.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_0.11.bb
@@ -10,9 +10,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e647752e045a8c45b6f583771bd561ef \
 
 DEPENDS = "liburcu"
 
-PR = "r0"
+PR = "r1"
 
-SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz"
+SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz \
+           file://remove_ppc_specific_time_reading_function.patch \
+           "
 
 SRC_URI[md5sum] = "0a23fa60df4da3fb5188e314001eb49c"
 SRC_URI[sha256sum] = "af8f699019ae260103bb401b6738d5e417e79732a509859b42a52e9a0f5edb35"
-- 
1.7.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] lttng-ust: fix ppc build
  2011-02-10  7:03 [PATCH 0/1] lttng-ust: fix ppc build Dexuan Cui
  2011-02-10  7:03 ` [PATCH 1/1] lttng-ust: fix ppc build by removing ppc specific time reading function Dexuan Cui
@ 2011-02-10 13:19 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2011-02-10 13:19 UTC (permalink / raw)
  To: Dexuan Cui; +Cc: poky

On Thu, 2011-02-10 at 15:03 +0800, Dexuan Cui wrote:
> From: Dexuan Cui <dexuan.cui@intel.com>
> 
> Here I introduced a patch from lttng mailing list to fix ppc build:
> http://lists.casi.polymtl.ca/pipermail/ltt-dev/2011-February/003903.html
> 
> The patch looks good and I think it would be in next release.
> At present, let's add it into SRC_URI.
> 
> Pull URL: git://git.pokylinux.org/poky-contrib.git
>   Branch: dcui/master
>   Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/master
> 
> Thanks,
>     Dexuan Cui <dexuan.cui@intel.com>

Merged to master, thanks.

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-10 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10  7:03 [PATCH 0/1] lttng-ust: fix ppc build Dexuan Cui
2011-02-10  7:03 ` [PATCH 1/1] lttng-ust: fix ppc build by removing ppc specific time reading function Dexuan Cui
2011-02-10 13:19 ` [PATCH 0/1] lttng-ust: fix ppc build Richard Purdie

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.