| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * (c) 2003-2012 Advanced Micro Devices, Inc. |
|---|
| 3 | | - * Your use of this code is subject to the terms and conditions of the |
|---|
| 4 | | - * GNU general public license version 2. See "COPYING" or |
|---|
| 5 | | - * http://www.gnu.org/licenses/gpl.html |
|---|
| 6 | 4 | * |
|---|
| 7 | 5 | * Maintainer: |
|---|
| 8 | 6 | * Andreas Herrmann <herrmann.der.user@googlemail.com> |
|---|
| .. | .. |
|---|
| 11 | 9 | * (C) 2003 Dave Jones on behalf of SuSE Labs |
|---|
| 12 | 10 | * (C) 2004 Dominik Brodowski <linux@brodo.de> |
|---|
| 13 | 11 | * (C) 2004 Pavel Machek <pavel@ucw.cz> |
|---|
| 14 | | - * Licensed under the terms of the GNU GPL License version 2. |
|---|
| 15 | 12 | * Based upon datasheets & sample CPUs kindly provided by AMD. |
|---|
| 16 | 13 | * |
|---|
| 17 | 14 | * Valuable input gratefully received from Dave Jones, Pavel Machek, |
|---|
| .. | .. |
|---|
| 89 | 86 | */ |
|---|
| 90 | 87 | static int pending_bit_stuck(void) |
|---|
| 91 | 88 | { |
|---|
| 92 | | - u32 lo, hi; |
|---|
| 89 | + u32 lo, hi __always_unused; |
|---|
| 93 | 90 | |
|---|
| 94 | 91 | rdmsr(MSR_FIDVID_STATUS, lo, hi); |
|---|
| 95 | 92 | return lo & MSR_S_LO_CHANGE_PENDING ? 1 : 0; |
|---|
| .. | .. |
|---|
| 285 | 282 | { |
|---|
| 286 | 283 | u32 rvosteps = data->rvo; |
|---|
| 287 | 284 | u32 savefid = data->currfid; |
|---|
| 288 | | - u32 maxvid, lo, rvomult = 1; |
|---|
| 285 | + u32 maxvid, lo __always_unused, rvomult = 1; |
|---|
| 289 | 286 | |
|---|
| 290 | 287 | pr_debug("ph1 (cpu%d): start, currfid 0x%x, currvid 0x%x, reqvid 0x%x, rvo 0x%x\n", |
|---|
| 291 | 288 | smp_processor_id(), |
|---|
| .. | .. |
|---|
| 455 | 452 | |
|---|
| 456 | 453 | static const struct x86_cpu_id powernow_k8_ids[] = { |
|---|
| 457 | 454 | /* IO based frequency switching */ |
|---|
| 458 | | - { X86_VENDOR_AMD, 0xf }, |
|---|
| 455 | + X86_MATCH_VENDOR_FAM(AMD, 0xf, NULL), |
|---|
| 459 | 456 | {} |
|---|
| 460 | 457 | }; |
|---|
| 461 | 458 | MODULE_DEVICE_TABLE(x86cpu, powernow_k8_ids); |
|---|
| .. | .. |
|---|
| 1104 | 1101 | |
|---|
| 1105 | 1102 | kfree(data->powernow_table); |
|---|
| 1106 | 1103 | kfree(data); |
|---|
| 1107 | | - for_each_cpu(cpu, pol->cpus) |
|---|
| 1104 | + /* pol->cpus will be empty here, use related_cpus instead. */ |
|---|
| 1105 | + for_each_cpu(cpu, pol->related_cpus) |
|---|
| 1108 | 1106 | per_cpu(powernow_data, cpu) = NULL; |
|---|
| 1109 | 1107 | |
|---|
| 1110 | 1108 | return 0; |
|---|
| .. | .. |
|---|
| 1175 | 1173 | unsigned int i, supported_cpus = 0; |
|---|
| 1176 | 1174 | int ret; |
|---|
| 1177 | 1175 | |
|---|
| 1178 | | - if (static_cpu_has(X86_FEATURE_HW_PSTATE)) { |
|---|
| 1176 | + if (boot_cpu_has(X86_FEATURE_HW_PSTATE)) { |
|---|
| 1179 | 1177 | __request_acpi_cpufreq(); |
|---|
| 1180 | 1178 | return -ENODEV; |
|---|
| 1181 | 1179 | } |
|---|