Skip to content

Commit 434a291

Browse files
srikumarbCommit bot
authored andcommitted
Make FlushICache NOP for Nvidia Denver 1.0 only
FlushICache should be NOP for Denver with part numbers 0x0, 0x1 and 0x2 only. Instruction cache needs to flushed for future versions of denver. Review URL: https://codereview.chromium.org/1287173004 Cr-Commit-Position: refs/heads/master@{#30262}
1 parent 06f75cc commit 434a291

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/arm/assembler-arm.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
126126
if (FLAG_enable_32dregs && cpu.has_vfp3_d32()) supported_ |= 1u << VFP32DREGS;
127127

128128
if (cpu.implementer() == base::CPU::NVIDIA &&
129-
cpu.variant() == base::CPU::NVIDIA_DENVER) {
129+
cpu.variant() == base::CPU::NVIDIA_DENVER &&
130+
cpu.part() <= base::CPU::NVIDIA_DENVER_V10) {
130131
supported_ |= 1u << COHERENT_CACHE;
131132
}
132133
#endif

src/arm64/assembler-arm64.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
5252
// Probe for runtime features
5353
base::CPU cpu;
5454
if (cpu.implementer() == base::CPU::NVIDIA &&
55-
cpu.variant() == base::CPU::NVIDIA_DENVER) {
55+
cpu.variant() == base::CPU::NVIDIA_DENVER &&
56+
cpu.part() <= base::CPU::NVIDIA_DENVER_V10) {
5657
supported_ |= 1u << COHERENT_CACHE;
5758
}
5859
}

src/base/cpu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class CPU final {
5959
static const int ARM_CORTEX_A12 = 0xc0c;
6060
static const int ARM_CORTEX_A15 = 0xc0f;
6161

62+
// Denver-specific part code
63+
static const int NVIDIA_DENVER_V10 = 0x002;
64+
6265
// PPC-specific part codes
6366
enum {
6467
PPC_POWER5,

0 commit comments

Comments
 (0)