| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2005 Intel Corporation |
|---|
| 3 | 4 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> |
|---|
| .. | .. |
|---|
| 51 | 52 | if (c->x86_vendor == X86_VENDOR_INTEL && |
|---|
| 52 | 53 | (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 0x0f))) |
|---|
| 53 | 54 | flags->bm_control = 0; |
|---|
| 55 | + /* |
|---|
| 56 | + * For all recent Centaur CPUs, the ucode will make sure that each |
|---|
| 57 | + * core can keep cache coherence with each other while entering C3 |
|---|
| 58 | + * type state. So, set bm_check to 1 to indicate that the kernel |
|---|
| 59 | + * doesn't need to execute a cache flush operation (WBINVD) when |
|---|
| 60 | + * entering C3 type state. |
|---|
| 61 | + */ |
|---|
| 62 | + if (c->x86_vendor == X86_VENDOR_CENTAUR) { |
|---|
| 63 | + if (c->x86 > 6 || (c->x86 == 6 && c->x86_model == 0x0f && |
|---|
| 64 | + c->x86_stepping >= 0x0e)) |
|---|
| 65 | + flags->bm_check = 1; |
|---|
| 66 | + } |
|---|
| 67 | + |
|---|
| 68 | + if (c->x86_vendor == X86_VENDOR_ZHAOXIN) { |
|---|
| 69 | + /* |
|---|
| 70 | + * All Zhaoxin CPUs that support C3 share cache. |
|---|
| 71 | + * And caches should not be flushed by software while |
|---|
| 72 | + * entering C3 type state. |
|---|
| 73 | + */ |
|---|
| 74 | + flags->bm_check = 1; |
|---|
| 75 | + /* |
|---|
| 76 | + * On all recent Zhaoxin platforms, ARB_DISABLE is a nop. |
|---|
| 77 | + * So, set bm_control to zero to indicate that ARB_DISABLE |
|---|
| 78 | + * is not required while entering C3 type state. |
|---|
| 79 | + */ |
|---|
| 80 | + flags->bm_control = 0; |
|---|
| 81 | + } |
|---|
| 54 | 82 | } |
|---|
| 55 | 83 | EXPORT_SYMBOL(acpi_processor_power_init_bm_check); |
|---|
| 56 | 84 | |
|---|