Skip to content

Commit

Permalink
Set CACHE_LINE_SIZE for s390, PPC, ARM64
Browse files Browse the repository at this point in the history
Summary: Closes #2579

Differential Revision: D5427667

Pulled By: maysamyabandeh

fbshipit-source-id: cd0b076aa0cd38d3554516f01723c548713ece61
  • Loading branch information
grooverdan authored and facebook-github-bot committed Jul 14, 2017
1 parent 67510ee commit ccf5f08
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion port/port_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@ typedef pthread_once_t OnceType;
extern void InitOnce(OnceType* once, void (*initializer)());

#ifndef CACHE_LINE_SIZE
#define CACHE_LINE_SIZE 64U
#if defined(__s390__)
#define CACHE_LINE_SIZE 256U
#elif defined(__powerpc__) || defined(__aarch64__)
#define CACHE_LINE_SIZE 128U
#else
#define CACHE_LINE_SIZE 64U
#endif
#endif

#define PREFETCH(addr, rw, locality) __builtin_prefetch(addr, rw, locality)
Expand Down

0 comments on commit ccf5f08

Please sign in to comment.