X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch_s390.h;h=8a33e203ecb8cee76e5f6c1a1e5b662a5395837a;hp=71717686c77f23589e8664981aa1126a4248896c;hb=5481ddb381061bda64aebc039900d21cac6a6caf;hpb=1ccf9cbe71d7392fb87e4b0046bd2eb94a75b541 diff --git a/urcu/arch_s390.h b/urcu/arch_s390.h index 7171768..8a33e20 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,42 +28,16 @@ * 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 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; @@ -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 */