Skip to content

Commit 0fe7e5a

Browse files
committed
Merge: update ACPI to Linux v6.7
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3794 JIRA: https://issues.redhat.com/browse/RHEL-26871 Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> Approved-by: John W. Linville <linville@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Jerry Snitselaar <jsnitsel@redhat.com> Approved-by: Rafael Aquini <aquini@redhat.com> Approved-by: Wander Lairson Costa <wander@redhat.com> Approved-by: Myron Stowe <mstowe@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents 93c928f + b9a8162 commit 0fe7e5a

File tree

326 files changed

+3917
-2886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+3917
-2886
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6158,10 +6158,6 @@
61586158
-1: disable all critical trip points in all thermal zones
61596159
<degrees C>: override all critical trip points
61606160

6161-
thermal.nocrt= [HW,ACPI]
6162-
Set to disable actions on ACPI thermal zone
6163-
critical and hot trip points.
6164-
61656161
thermal.off= [HW,ACPI]
61666162
1: disable ACPI thermal control
61676163

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ F: drivers/pnp/pnpacpi/
351351
F: include/acpi/
352352
F: include/linux/acpi.h
353353
F: include/linux/fwnode.h
354+
F: include/linux/fw_table.h
355+
F: lib/fw_table.c
354356
F: tools/power/acpi/
355357

356358
ACPI APEI

arch/arm64/include/asm/acpi.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef _ASM_ACPI_H
1010
#define _ASM_ACPI_H
1111

12+
#include <linux/cpuidle.h>
1213
#include <linux/efi.h>
1314
#include <linux/memblock.h>
1415
#include <linux/psci.h>
@@ -42,6 +43,25 @@
4243
#define ACPI_MADT_GICC_SPE (offsetof(struct acpi_madt_generic_interrupt, \
4344
spe_interrupt) + sizeof(u16))
4445

46+
/*
47+
* Arm® Functional Fixed Hardware Specification Version 1.2.
48+
* Table 2: Arm Architecture context loss flags
49+
*/
50+
#define CPUIDLE_CORE_CTXT BIT(0) /* Core context Lost */
51+
52+
static inline unsigned int arch_get_idle_state_flags(u32 arch_flags)
53+
{
54+
if (arch_flags & CPUIDLE_CORE_CTXT)
55+
return CPUIDLE_FLAG_TIMER_STOP;
56+
57+
return 0;
58+
}
59+
#define arch_get_idle_state_flags arch_get_idle_state_flags
60+
61+
#define CPUIDLE_TRACE_CTXT BIT(1) /* Trace context loss */
62+
#define CPUIDLE_GICR_CTXT BIT(2) /* GICR */
63+
#define CPUIDLE_GICD_CTXT BIT(3) /* GICD */
64+
4565
/* Basic configuration for ACPI */
4666
#ifdef CONFIG_ACPI
4767
pgprot_t __acpi_get_mem_attribute(phys_addr_t addr);

arch/arm64/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
520520
{
521521
u64 hwid = processor->arm_mpidr;
522522

523-
if (!(processor->flags & ACPI_MADT_ENABLED)) {
523+
if (!acpi_gicc_is_usable(processor)) {
524524
pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
525525
return;
526526
}

arch/ia64/include/asm/acpi.h

Lines changed: 3 additions & 3 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>
@@ -69,9 +69,9 @@ extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
6969
#endif
7070

7171
static inline bool arch_has_acpi_pdc(void) { return true; }
72-
static inline void arch_acpi_set_pdc_bits(u32 *buf)
72+
static inline void arch_acpi_set_proc_cap_bits(u32 *cap)
7373
{
74-
buf[2] |= 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: 16 additions & 8 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>
@@ -102,23 +102,31 @@ static inline bool arch_has_acpi_pdc(void)
102102
c->x86_vendor == X86_VENDOR_CENTAUR);
103103
}
104104

105-
static inline void arch_acpi_set_pdc_bits(u32 *buf)
105+
static inline void arch_acpi_set_proc_cap_bits(u32 *cap)
106106
{
107107
struct cpuinfo_x86 *c = &cpu_data(0);
108108

109-
buf[2] |= ACPI_PDC_C_CAPABILITY_SMP;
109+
*cap |= ACPI_PROC_CAP_C_CAPABILITY_SMP;
110+
111+
/* Enable coordination with firmware's _TSD info */
112+
*cap |= ACPI_PROC_CAP_SMP_T_SWCOORD;
110113

111114
if (cpu_has(c, X86_FEATURE_EST))
112-
buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP;
115+
*cap |= ACPI_PROC_CAP_EST_CAPABILITY_SWSMP;
113116

114117
if (cpu_has(c, X86_FEATURE_ACPI))
115-
buf[2] |= ACPI_PDC_T_FFH;
118+
*cap |= ACPI_PROC_CAP_T_FFH;
119+
120+
if (cpu_has(c, X86_FEATURE_HWP))
121+
*cap |= ACPI_PROC_CAP_COLLAB_PROC_PERF;
116122

117123
/*
118-
* If mwait/monitor is unsupported, C2/C3_FFH will be disabled
124+
* If mwait/monitor is unsupported, C_C1_FFH and
125+
* C2/C3_FFH will be disabled.
119126
*/
120-
if (!cpu_has(c, X86_FEATURE_MWAIT))
121-
buf[2] &= ~(ACPI_PDC_C_C2C3_FFH);
127+
if (!cpu_has(c, X86_FEATURE_MWAIT) ||
128+
boot_option_idle_override == IDLE_NOMWAIT)
129+
*cap &= ~(ACPI_PROC_CAP_C_C1_FFH | ACPI_PROC_CAP_C_C2C3_FFH);
122130
}
123131

124132
static inline bool acpi_has_cpu_in_madt(void)

arch/x86/mm/numa.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ static int __init cmp_memblk(const void *a, const void *b)
964964
const struct numa_memblk *ma = *(const struct numa_memblk **)a;
965965
const struct numa_memblk *mb = *(const struct numa_memblk **)b;
966966

967-
return ma->start - mb->start;
967+
return (ma->start > mb->start) - (ma->start < mb->start);
968968
}
969969

970970
static struct numa_memblk *numa_memblk_list[NR_NODE_MEMBLKS] __initdata;
@@ -974,14 +974,12 @@ static struct numa_memblk *numa_memblk_list[NR_NODE_MEMBLKS] __initdata;
974974
* @start: address to begin fill
975975
* @end: address to end fill
976976
*
977-
* Find and extend numa_meminfo memblks to cover the @start-@end
978-
* physical address range, such that the first memblk includes
979-
* @start, the last memblk includes @end, and any gaps in between
980-
* are filled.
977+
* Find and extend numa_meminfo memblks to cover the physical
978+
* address range @start-@end
981979
*
982980
* RETURNS:
983981
* 0 : Success
984-
* NUMA_NO_MEMBLK : No memblk exists in @start-@end range
982+
* NUMA_NO_MEMBLK : No memblks exist in address range @start-@end
985983
*/
986984

987985
int __init numa_fill_memblks(u64 start, u64 end)
@@ -993,17 +991,14 @@ int __init numa_fill_memblks(u64 start, u64 end)
993991

994992
/*
995993
* Create a list of pointers to numa_meminfo memblks that
996-
* overlap start, end. Exclude (start == bi->end) since
997-
* end addresses in both a CFMWS range and a memblk range
998-
* are exclusive.
999-
*
1000-
* This list of pointers is used to make in-place changes
1001-
* that fill out the numa_meminfo memblks.
994+
* overlap start, end. The list is used to make in-place
995+
* changes that fill out the numa_meminfo memblks.
1002996
*/
1003997
for (int i = 0; i < mi->nr_blks; i++) {
1004998
struct numa_memblk *bi = &mi->blk[i];
1005999

1006-
if (start < bi->end && end >= bi->start) {
1000+
if (memblock_addrs_overlap(start, end - start, bi->start,
1001+
bi->end - bi->start)) {
10071002
blk[count] = &mi->blk[i];
10081003
count++;
10091004
}

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
@@ -299,17 +299,17 @@ static bool __init xen_check_mwait(void)
299299

300300
native_cpuid(&ax, &bx, &cx, &dx);
301301

302-
/* Ask the Hypervisor whether to clear ACPI_PDC_C_C2C3_FFH. If so,
302+
/* Ask the Hypervisor whether to clear ACPI_PROC_CAP_C_C2C3_FFH. If so,
303303
* don't expose MWAIT_LEAF and let ACPI pick the IOPORT version of C3.
304304
*/
305305
buf[0] = ACPI_PDC_REVISION_ID;
306306
buf[1] = 1;
307-
buf[2] = (ACPI_PDC_C_CAPABILITY_SMP | ACPI_PDC_EST_CAPABILITY_SWSMP);
307+
buf[2] = (ACPI_PROC_CAP_C_CAPABILITY_SMP | ACPI_PROC_CAP_EST_CAPABILITY_SWSMP);
308308

309309
set_xen_guest_handle(op.u.set_pminfo.pdc, buf);
310310

311311
if ((HYPERVISOR_platform_op(&op) == 0) &&
312-
(buf[2] & (ACPI_PDC_C_C1_FFH | ACPI_PDC_C_C2C3_FFH))) {
312+
(buf[2] & (ACPI_PROC_CAP_C_C1_FFH | ACPI_PROC_CAP_C_C2C3_FFH))) {
313313
cpuid_leaf5_ecx_val = cx;
314314
cpuid_leaf5_edx_val = dx;
315315
}

drivers/acpi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ menuconfig ACPI
1212
select PNP
1313
select NLS
1414
select CRC32
15+
select FIRMWARE_TABLE
1516
default y if X86
1617
help
1718
Advanced Configuration and Power Interface (ACPI) support for

drivers/acpi/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ acpi-$(CONFIG_PCI) += acpi_lpss.o
5050
acpi-y += acpi_apd.o
5151
acpi-y += acpi_platform.o
5252
acpi-y += acpi_pnp.o
53-
acpi-$(CONFIG_ARM_AMBA) += acpi_amba.o
5453
acpi-y += power.o
5554
acpi-y += event.o
5655
acpi-y += evged.o

0 commit comments

Comments
 (0)