Skip to content

Commit 39c1079

Browse files
author
CKI KWF Bot
committed
Merge: update the ACPI subsystem to Linux v6.17 for RHEL-9.8
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7359 JIRA: https://issues.redhat.com/browse/RHEL-82671 JIRA: https://issues.redhat.com/browse/RHEL-114091 Resolves: 82671 Resolves: 114091 Omitted-fix: 0674188 "ACPI: EC: Enable EC support on LoongArch by default" Fix applies to LoongArch, which is not supported. Omitted-fix: 058de16 "platform/x86: dell-ddv: Implement the battery matching algorithm" This isn't a fix, this is a new feature that changes how some Dell laptop batteries are handled. It needs more time to be tested upstream. Omitted-fix: d4e8378 "platform/x86: dell-ddv: Fix taking the psy->extensions_sem lock twice" This is a fix for the previous commit, which is not being added at this time. Update the ACPI subsystem from Linux v6.12 to Linux v6.17. The extensive v6.14 commits to drivers/acpi/platform_profile.c and drivers/acpi/acpi_platform.c are deeply intertwined with updates to drivers/platform/x86 and are excluded for now. They may be added in a separate JIRA and MR. various updates for GCC-15 dealing with -Wunterminated-string-initialization and -Wflex-array-member were skipped as unnecessary at this time. various updates to constify various function arguments were skipped as RHEL-9.8 doesn't have the necessary infrastruture. Updates to APEI-EINJ that depend of the faux bus were skipped to minimize merge conflicts with MR !7309. Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> Approved-by: Ivan Vecera <ivecera@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Lenny Szubowicz <lszubowi@redhat.com> Approved-by: Audra Mitchell <aubaker@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents b1edc43 + 1dd6c64 commit 39c1079

File tree

300 files changed

+2841
-1581
lines changed

Some content is hidden

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

300 files changed

+2841
-1581
lines changed

Documentation/ABI/testing/sysfs-firmware-acpi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ Description:
108108
number of a "General Purpose Events" (GPE).
109109

110110
A GPE vectors to a specified handler in AML, which
111-
can do a anything the BIOS writer wants from
111+
can do anything the BIOS writer wants from
112112
OS context. GPE 0x12, for example, would vector
113113
to a level or edge handler called _L12 or _E12.
114114
The handler may do its business and return.
115-
Or the handler may send send a Notify event
115+
Or the handler may send a Notify event
116116
to a Linux device driver registered on an ACPI device,
117117
such as a battery, or a processor.
118118

119-
To figure out where all the SCI's are coming from,
119+
To figure out where all the SCIs are coming from,
120120
/sys/firmware/acpi/interrupts contains a file listing
121121
every possible source, and the count of how many
122122
times it has triggered::

Documentation/firmware-guide/acpi/gpio-properties.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ Up Low as high, assuming non-active
7979
Up High as high, assuming active
8080
========= ============= ==============
8181

82-
That said, for our above example the both GPIOs, since the bias setting
83-
is explicit and _DSD is present, will be treated as active with a high
82+
That said, for our above example, since the bias setting is explicit and
83+
_DSD is present, both GPIOs will be treated as active with a high
8484
polarity and Linux will configure the pins in this state until a driver
8585
reprograms them differently.
8686

arch/powerpc/platforms/cell/axon_msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static void axon_msi_cascade(struct irq_desc *desc)
111111
pr_devel("axon_msi: woff %x roff %x msi %x\n",
112112
write_offset, msic->read_offset, msi);
113113

114-
if (msi < nr_irqs && irq_get_chip_data(msi) == msic) {
114+
if (msi < irq_get_nr_irqs() && irq_get_chip_data(msi) == msic) {
115115
generic_handle_irq(msi);
116116
msic->fifo_virt[idx] = cpu_to_le32(0xffffffff);
117117
} else {

arch/s390/kernel/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ int show_interrupts(struct seq_file *p, void *v)
253253
seq_putc(p, '\n');
254254
goto out;
255255
}
256-
if (index < nr_irqs) {
256+
if (index < irq_get_nr_irqs()) {
257257
show_msi_interrupt(p, index);
258258
goto out;
259259
}

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ config X86_64
3636
select SWIOTLB
3737
select ARCH_HAS_ELFCORE_COMPAT
3838
select ZONE_DMA32
39+
select ACPI_MRMM if ACPI
3940

4041
config FORCE_DYNAMIC_FTRACE
4142
def_bool y

arch/x86/kernel/acpi/boot.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,8 @@ static int __init acpi_parse_madt_ioapic_entries(void)
11711171
}
11721172

11731173
count = acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE,
1174-
acpi_parse_int_src_ovr, nr_irqs);
1174+
acpi_parse_int_src_ovr,
1175+
irq_get_nr_irqs());
11751176
if (count < 0) {
11761177
pr_err("Error parsing interrupt source overrides entry\n");
11771178
/* TBD: Cleanup to allow fallback to MPS */
@@ -1191,7 +1192,8 @@ static int __init acpi_parse_madt_ioapic_entries(void)
11911192
mp_config_acpi_legacy_irqs();
11921193

11931194
count = acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE,
1194-
acpi_parse_nmi_src, nr_irqs);
1195+
acpi_parse_nmi_src,
1196+
irq_get_nr_irqs());
11951197
if (count < 0) {
11961198
pr_err("Error parsing NMI SRC entry\n");
11971199
/* TBD: Cleanup to allow fallback to MPS */

arch/x86/kernel/acpi/cppc.c

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,29 +88,24 @@ static void amd_set_max_freq_ratio(void)
8888

8989
rc = cppc_get_perf_caps(0, &perf_caps);
9090
if (rc) {
91-
pr_debug("Could not retrieve perf counters (%d)\n", rc);
91+
pr_warn("Could not retrieve perf counters (%d)\n", rc);
9292
return;
9393
}
9494

9595
rc = amd_get_boost_ratio_numerator(0, &numerator);
9696
if (rc) {
97-
pr_debug("Could not retrieve highest performance (%d)\n", rc);
97+
pr_warn("Could not retrieve highest performance (%d)\n", rc);
9898
return;
9999
}
100100
nominal_perf = perf_caps.nominal_perf;
101101

102102
if (!nominal_perf) {
103-
pr_debug("Could not retrieve nominal performance\n");
103+
pr_warn("Could not retrieve nominal performance\n");
104104
return;
105105
}
106106

107-
perf_ratio = div_u64(numerator * SCHED_CAPACITY_SCALE, nominal_perf);
108107
/* midpoint between max_boost and max_P */
109-
perf_ratio = (perf_ratio + SCHED_CAPACITY_SCALE) >> 1;
110-
if (!perf_ratio) {
111-
pr_debug("Non-zero highest/nominal perf values led to a 0 ratio\n");
112-
return;
113-
}
108+
perf_ratio = (div_u64(numerator * SCHED_CAPACITY_SCALE, nominal_perf) + SCHED_CAPACITY_SCALE) >> 1;
114109

115110
freq_invariance_set_perf_ratio(perf_ratio, false);
116111
}
@@ -246,8 +241,10 @@ EXPORT_SYMBOL_GPL(amd_detect_prefcore);
246241
*/
247242
int amd_get_boost_ratio_numerator(unsigned int cpu, u64 *numerator)
248243
{
244+
enum x86_topology_cpu_type core_type = get_topology_cpu_type(&cpu_data(cpu));
249245
bool prefcore;
250246
int ret;
247+
u32 tmp;
251248

252249
ret = amd_detect_prefcore(&prefcore);
253250
if (ret)
@@ -273,6 +270,27 @@ int amd_get_boost_ratio_numerator(unsigned int cpu, u64 *numerator)
273270
break;
274271
}
275272
}
273+
274+
/* detect if running on heterogeneous design */
275+
if (cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES)) {
276+
switch (core_type) {
277+
case TOPO_CPU_TYPE_UNKNOWN:
278+
pr_warn("Undefined core type found for cpu %d\n", cpu);
279+
break;
280+
case TOPO_CPU_TYPE_PERFORMANCE:
281+
/* use the max scale for performance cores */
282+
*numerator = CPPC_HIGHEST_PERF_PERFORMANCE;
283+
return 0;
284+
case TOPO_CPU_TYPE_EFFICIENCY:
285+
/* use the highest perf value for efficiency cores */
286+
ret = amd_get_highest_perf(cpu, &tmp);
287+
if (ret)
288+
return ret;
289+
*numerator = tmp;
290+
return 0;
291+
}
292+
}
293+
276294
*numerator = CPPC_HIGHEST_PERF_PREFCORE;
277295

278296
return 0;

arch/x86/kernel/apic/vector.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,8 @@ int __init arch_probe_nr_irqs(void)
712712
{
713713
int nr;
714714

715-
if (nr_irqs > (NR_VECTORS * nr_cpu_ids))
716-
nr_irqs = NR_VECTORS * nr_cpu_ids;
715+
if (irq_get_nr_irqs() > NR_VECTORS * nr_cpu_ids)
716+
irq_set_nr_irqs(NR_VECTORS * nr_cpu_ids);
717717

718718
nr = (gsi_top + nr_legacy_irqs()) + 8 * nr_cpu_ids;
719719
#if defined(CONFIG_PCI_MSI)
@@ -725,8 +725,8 @@ int __init arch_probe_nr_irqs(void)
725725
else
726726
nr += gsi_top * 16;
727727
#endif
728-
if (nr < nr_irqs)
729-
nr_irqs = nr;
728+
if (nr < irq_get_nr_irqs())
729+
irq_set_nr_irqs(nr);
730730

731731
/*
732732
* We don't know if PIC is present at this point so we need to do

arch/x86/kernel/cpu/aperfmperf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static void freq_invariance_enable(void)
306306
WARN_ON_ONCE(1);
307307
return;
308308
}
309-
static_branch_enable(&arch_scale_freq_key);
309+
static_branch_enable_cpuslocked(&arch_scale_freq_key);
310310
register_freq_invariance_syscore_ops();
311311
pr_info("Estimated ratio of average max frequency by base frequency (times 1024): %llu\n", arch_max_freq_ratio);
312312
}
@@ -323,8 +323,10 @@ static void __init bp_init_freq_invariance(void)
323323
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
324324
return;
325325

326-
if (intel_set_max_freq_ratio())
326+
if (intel_set_max_freq_ratio()) {
327+
guard(cpus_read_lock)();
327328
freq_invariance_enable();
329+
}
328330
}
329331

330332
static void disable_freq_invariance_workfn(struct work_struct *work)

arch/x86/kernel/setup.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ static void __init relocate_initrd(void)
259259
u64 ramdisk_image = get_ramdisk_image();
260260
u64 ramdisk_size = get_ramdisk_size();
261261
u64 area_size = PAGE_ALIGN(ramdisk_size);
262+
int ret = 0;
262263

263264
/* We need to move the initrd down into directly mapped mem */
264265
u64 relocated_ramdisk = memblock_phys_alloc_range(area_size, PAGE_SIZE, 0,
@@ -272,7 +273,9 @@ static void __init relocate_initrd(void)
272273
printk(KERN_INFO "Allocated new RAMDISK: [mem %#010llx-%#010llx]\n",
273274
relocated_ramdisk, relocated_ramdisk + ramdisk_size - 1);
274275

275-
copy_from_early_mem((void *)initrd_start, ramdisk_image, ramdisk_size);
276+
ret = copy_from_early_mem((void *)initrd_start, ramdisk_image, ramdisk_size);
277+
if (ret)
278+
panic("Copy RAMDISK failed\n");
276279

277280
printk(KERN_INFO "Move RAMDISK from [mem %#010llx-%#010llx] to"
278281
" [mem %#010llx-%#010llx]\n",

0 commit comments

Comments
 (0)