Skip to content

Commit a56286f

Browse files
committed
8321269: Require platforms to define DEFAULT_CACHE_LINE_SIZE
Reviewed-by: stefank, stuefe, dholmes
1 parent 1cf7ef5 commit a56286f

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
4242
// and Operational Models for ARMv8"
4343
#define CPU_MULTI_COPY_ATOMIC
4444

45+
#define DEFAULT_CACHE_LINE_SIZE 64
46+
4547
// According to the ARMv8 ARM, "Concurrent modification and execution
4648
// of instructions can lead to the resulting instruction performing
4749
// any behavior that can be achieved by executing any sequence of

src/hotspot/cpu/arm/globalDefinitions_arm.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ const bool HaveVFP = true;
4949
// arm32 is not specified as multi-copy-atomic
5050
// So we must not #define CPU_MULTI_COPY_ATOMIC
5151

52+
#define DEFAULT_CACHE_LINE_SIZE 64
53+
5254
#define STUBROUTINES_MD_HPP "stubRoutines_arm.hpp"
5355
#define INTERP_MASM_MD_HPP "interp_masm_arm.hpp"
5456
#define TEMPLATETABLE_MD_HPP "templateTable_arm.hpp"

src/hotspot/cpu/zero/globalDefinitions_zero.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#define SUPPORTS_NATIVE_CX8
3131
#endif
3232

33+
#define DEFAULT_CACHE_LINE_SIZE 64
34+
3335
#define SUPPORT_MONITOR_COUNT
3436

3537
#include <ffi.h>

src/hotspot/share/utilities/globalDefinitions.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ const bool support_IRIW_for_not_multiple_copy_atomic_cpu = PPC64_ONLY(true) NOT_
604604

605605
// The expected size in bytes of a cache line, used to pad data structures.
606606
#ifndef DEFAULT_CACHE_LINE_SIZE
607-
#define DEFAULT_CACHE_LINE_SIZE 64
607+
#error "Platform should define DEFAULT_CACHE_LINE_SIZE"
608608
#endif
609609

610610

0 commit comments

Comments
 (0)