From: Helge Deller Date: Thu, 17 Apr 2014 11:04:05 +0000 (-0400) Subject: Add support for hppa/PA-RISC architecture X-Git-Tag: v0.9.0~97 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=13e0bc720bc9baadf0adc007f0035c180888b1f1;p=urcu.git Add support for hppa/PA-RISC architecture Add the missing architecture specific functions to provide support for the hppa/PA-RISC architecture: - the processor internal time stamp counter (Control Register CR16) is used to get high-performance/low-latency cycle counts - gcc provides the necessary built-in atomic functions on hppa (which in turn uses the light-weigth atomic locking syscall-interface of the Linux kernel) Signed-off-by: Helge Deller Signed-off-by: Mathieu Desnoyers --- diff --git a/configure.ac b/configure.ac index 86f0e2b..008336c 100644 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,7 @@ AS_CASE([$host_cpu], [aarch64], [ARCHTYPE="gcc"], [mips*], [ARCHTYPE="mips"], [tile*], [ARCHTYPE="gcc"], + [hppa*], [ARCHTYPE="hppa"], [ARCHTYPE="unknown"] ) diff --git a/urcu/arch/hppa.h b/urcu/arch/hppa.h new file mode 100644 index 0000000..b9b9494 --- /dev/null +++ b/urcu/arch/hppa.h @@ -0,0 +1,30 @@ +#ifndef _URCU_ARCH_HPPA_H +#define _URCU_ARCH_HPPA_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +typedef unsigned long cycles_t; + +static inline cycles_t caa_get_cycles(void) +{ + cycles_t cycles; + + asm volatile("mfctl 16, %0" : "=r" (cycles)); + return cycles; +} + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* _URCU_ARCH_HPPA_H */ diff --git a/urcu/uatomic/hppa.h b/urcu/uatomic/hppa.h new file mode 100644 index 0000000..2102153 --- /dev/null +++ b/urcu/uatomic/hppa.h @@ -0,0 +1,10 @@ +#ifndef _URCU_ARCH_UATOMIC_HPPA_H +#define _URCU_ARCH_UATOMIC_HPPA_H + +#include +#include + +#define UATOMIC_HAS_ATOMIC_SHORT +#include + +#endif /* _URCU_ARCH_UATOMIC_HPPA_H */