X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch_s390.h;h=1f03c784cb32bcc3da7c4c724b5fc7eaf632c501;hp=71717686c77f23589e8664981aa1126a4248896c;hb=af7c2dbeac32c663b64ad05e4eca70e18784463b;hpb=1ccf9cbe71d7392fb87e4b0046bd2eb94a75b541 diff --git a/urcu/arch_s390.h b/urcu/arch_s390.h index 7171768..1f03c78 100644 --- a/urcu/arch_s390.h +++ b/urcu/arch_s390.h @@ -1,5 +1,5 @@ -#ifndef _ARCH_S390_H -#define _ARCH_S390_H +#ifndef _URCU_ARCH_S390_H +#define _URCU_ARCH_S390_H /* * Trivial definitions for the S390 architecture based on information from the @@ -28,46 +28,20 @@ * IN THE SOFTWARE. */ -#include +#include +#include -#define CONFIG_HAVE_MEM_COHERENCY -/* Assume SMP machine, given we don't have this information */ -#define CONFIG_SMP 1 +#ifdef __cplusplus +extern "C" { +#endif -#ifndef BITS_PER_LONG -#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) -#endif - -#define mb() __asm__ __volatile__("bcr 15,0" : : : "memory") -#define rmb() __asm__ __volatile__("bcr 15,0" : : : "memory"); -#define wmb() __asm__ __volatile__("bcr 15,0" : : : "memory"); -#define mc() barrier() -#define rmc() barrier() -#define wmc() barrier() +#define CAA_CACHE_LINE_SIZE 128 -#define smp_mb() mb() -#define smp_rmb() rmb() -#define smp_wmb() wmb() -#define smp_mc() mc() -#define smp_rmc() rmc() -#define smp_wmc() wmc() - -/* Nop everywhere except on alpha. */ -#define smp_read_barrier_depends() - -static inline void cpu_relax(void) -{ - barrier(); -} - -static inline void sync_core() -{ - __asm__ __volatile__("bcr 15,0" : : : "memory"); -} +#define cmm_mb() __asm__ __volatile__("bcr 15,0" : : : "memory") typedef unsigned long long cycles_t; -static inline cycles_t get_cycles (void) +static inline cycles_t caa_get_cycles (void) { cycles_t cycles; @@ -76,4 +50,10 @@ static inline cycles_t get_cycles (void) return cycles; } -#endif /* _ARCH_S390_H */ +#ifdef __cplusplus +} +#endif + +#include + +#endif /* _URCU_ARCH_S390_H */