Skip to content

Commit c9e6c5e

Browse files
mwilczyrafaeljw
authored andcommitted
ACPI: processor: Rename ACPI_PDC symbols
The prefix in the names of the ACPI_PDC symbols suggests that they are only relevant for _PDC, but in fact they can also be used in the _OSC. Change that prefix to a more generic ACPI_PROC_CAP that will better reflect the purpose of those symbols as they represent bits in a general processor capabilities buffer. Rename pdc_intel.h to proc_cap_intel.h to follow the change of the symbol name prefix. No intentional functional impact. Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent c5e4d05 commit c9e6c5e

File tree

6 files changed

+52
-48
lines changed

6 files changed

+52
-48
lines changed

arch/ia64/include/asm/acpi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#ifdef __KERNEL__
1313

14-
#include <acpi/pdc_intel.h>
14+
#include <acpi/proc_cap_intel.h>
1515

1616
#include <linux/init.h>
1717
#include <linux/numa.h>
@@ -71,7 +71,7 @@ extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
7171
static inline bool arch_has_acpi_pdc(void) { return true; }
7272
static inline void arch_acpi_set_proc_cap_bits(u32 *cap)
7373
{
74-
*cap |= ACPI_PDC_EST_CAPABILITY_SMP;
74+
*cap |= ACPI_PROC_CAP_EST_CAPABILITY_SMP;
7575
}
7676

7777
#ifdef CONFIG_ACPI_NUMA

arch/x86/include/asm/acpi.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
77
* Copyright (C) 2001 Patrick Mochel <mochel@osdl.org>
88
*/
9-
#include <acpi/pdc_intel.h>
9+
#include <acpi/proc_cap_intel.h>
1010

1111
#include <asm/numa.h>
1212
#include <asm/fixmap.h>
@@ -104,19 +104,20 @@ static inline void arch_acpi_set_proc_cap_bits(u32 *cap)
104104
{
105105
struct cpuinfo_x86 *c = &cpu_data(0);
106106

107-
*cap |= ACPI_PDC_C_CAPABILITY_SMP;
107+
*cap |= ACPI_PROC_CAP_C_CAPABILITY_SMP;
108108

109109
if (cpu_has(c, X86_FEATURE_EST))
110-
*cap |= ACPI_PDC_EST_CAPABILITY_SWSMP;
110+
*cap |= ACPI_PROC_CAP_EST_CAPABILITY_SWSMP;
111111

112112
if (cpu_has(c, X86_FEATURE_ACPI))
113-
*cap |= ACPI_PDC_T_FFH;
113+
*cap |= ACPI_PROC_CAP_T_FFH;
114114

115115
/*
116116
* If mwait/monitor is unsupported, C2/C3_FFH will be disabled
117117
*/
118118
if (!cpu_has(c, X86_FEATURE_MWAIT))
119-
*cap &= ~(ACPI_PDC_C_C2C3_FFH);
119+
*cap &= ~(ACPI_PROC_CAP_C_C2C3_FFH);
120+
120121
}
121122

122123
static inline bool acpi_has_cpu_in_madt(void)

arch/x86/xen/enlighten_pv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#ifdef CONFIG_ACPI
8080
#include <linux/acpi.h>
8181
#include <asm/acpi.h>
82-
#include <acpi/pdc_intel.h>
82+
#include <acpi/proc_cap_intel.h>
8383
#include <acpi/processor.h>
8484
#include <xen/interface/platform.h>
8585
#endif
@@ -288,17 +288,17 @@ static bool __init xen_check_mwait(void)
288288

289289
native_cpuid(&ax, &bx, &cx, &dx);
290290

291-
/* Ask the Hypervisor whether to clear ACPI_PDC_C_C2C3_FFH. If so,
291+
/* Ask the Hypervisor whether to clear ACPI_PROC_CAP_C_C2C3_FFH. If so,
292292
* don't expose MWAIT_LEAF and let ACPI pick the IOPORT version of C3.
293293
*/
294294
buf[0] = ACPI_PDC_REVISION_ID;
295295
buf[1] = 1;
296-
buf[2] = (ACPI_PDC_C_CAPABILITY_SMP | ACPI_PDC_EST_CAPABILITY_SWSMP);
296+
buf[2] = (ACPI_PROC_CAP_C_CAPABILITY_SMP | ACPI_PROC_CAP_EST_CAPABILITY_SWSMP);
297297

298298
set_xen_guest_handle(op.u.set_pminfo.pdc, buf);
299299

300300
if ((HYPERVISOR_platform_op(&op) == 0) &&
301-
(buf[2] & (ACPI_PDC_C_C1_FFH | ACPI_PDC_C_C2C3_FFH))) {
301+
(buf[2] & (ACPI_PROC_CAP_C_C1_FFH | ACPI_PROC_CAP_C_C2C3_FFH))) {
302302
cpuid_leaf5_ecx_val = cx;
303303
cpuid_leaf5_edx_val = dx;
304304
}

drivers/acpi/processor_pdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static void acpi_set_pdc_bits(u32 *buf)
2121
buf[1] = 1;
2222

2323
/* Enable coordination with firmware's _TSD info */
24-
buf[2] = ACPI_PDC_SMP_T_SWCOORD;
24+
buf[2] = ACPI_PROC_CAP_SMP_T_SWCOORD;
2525

2626
/* Twiddle arch-specific bits needed for _PDC */
2727
arch_acpi_set_proc_cap_bits(&buf[2]);

include/acpi/pdc_intel.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

include/acpi/proc_cap_intel.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
/* Vendor specific processor capabilities bit definition
4+
* for Intel processors. Those bits are used to convey OSPM
5+
* power management capabilities to the platform.
6+
*/
7+
8+
#ifndef __PROC_CAP_INTEL_H__
9+
#define __PROC_CAP_INTEL_H__
10+
11+
#define ACPI_PROC_CAP_P_FFH (0x0001)
12+
#define ACPI_PROC_CAP_C_C1_HALT (0x0002)
13+
#define ACPI_PROC_CAP_T_FFH (0x0004)
14+
#define ACPI_PROC_CAP_SMP_C1PT (0x0008)
15+
#define ACPI_PROC_CAP_SMP_C2C3 (0x0010)
16+
#define ACPI_PROC_CAP_SMP_P_SWCOORD (0x0020)
17+
#define ACPI_PROC_CAP_SMP_C_SWCOORD (0x0040)
18+
#define ACPI_PROC_CAP_SMP_T_SWCOORD (0x0080)
19+
#define ACPI_PROC_CAP_C_C1_FFH (0x0100)
20+
#define ACPI_PROC_CAP_C_C2C3_FFH (0x0200)
21+
#define ACPI_PROC_CAP_SMP_P_HWCOORD (0x0800)
22+
23+
#define ACPI_PROC_CAP_EST_CAPABILITY_SMP (ACPI_PROC_CAP_SMP_C1PT | \
24+
ACPI_PROC_CAP_C_C1_HALT | \
25+
ACPI_PROC_CAP_P_FFH)
26+
27+
#define ACPI_PROC_CAP_EST_CAPABILITY_SWSMP (ACPI_PROC_CAP_SMP_C1PT | \
28+
ACPI_PROC_CAP_C_C1_HALT | \
29+
ACPI_PROC_CAP_SMP_P_SWCOORD | \
30+
ACPI_PROC_CAP_SMP_P_HWCOORD | \
31+
ACPI_PROC_CAP_P_FFH)
32+
33+
#define ACPI_PROC_CAP_C_CAPABILITY_SMP (ACPI_PROC_CAP_SMP_C2C3 | \
34+
ACPI_PROC_CAP_SMP_C1PT | \
35+
ACPI_PROC_CAP_C_C1_HALT | \
36+
ACPI_PROC_CAP_C_C1_FFH | \
37+
ACPI_PROC_CAP_C_C2C3_FFH)
38+
39+
#endif /* __PROC_CAP_INTEL_H__ */

0 commit comments

Comments
 (0)