Skip to content

Commit d32c572

Browse files
author
CKI KWF Bot
committed
Merge: [RHEL 10.2] DMA Engine subsystem update
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1507 # Merge Request Required Information ## Summary of Changes This updates the dma engine subsystem to v6.17. For the x86 changes at the beginning, we already had a few of the leaf node changes, so I pulled in the rest of them with the DCA leaf node change. ## Approved Development Ticket(s) JIRA: https://issues.redhat.com/browse/RHEL-117902 Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com> Approved-by: Eder Zulian <ezulian@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: Eric Chanudet <echanude@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 50a890f + 4cf492f commit d32c572

File tree

43 files changed

+473
-281
lines changed

Some content is hidden

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

43 files changed

+473
-281
lines changed

arch/x86/events/intel/pt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ static int __init pt_pmu_hw_init(void)
202202
* otherwise, zero for numerator stands for "not enumerated"
203203
* as per SDM
204204
*/
205-
if (boot_cpu_data.cpuid_level >= CPUID_TSC_LEAF) {
205+
if (boot_cpu_data.cpuid_level >= CPUID_LEAF_TSC) {
206206
u32 eax, ebx, ecx, edx;
207207

208-
cpuid(CPUID_TSC_LEAF, &eax, &ebx, &ecx, &edx);
208+
cpuid(CPUID_LEAF_TSC, &eax, &ebx, &ecx, &edx);
209209

210210
pt_pmu.tsc_art_num = ebx;
211211
pt_pmu.tsc_art_den = eax;

arch/x86/include/asm/cpuid.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ enum cpuid_regs_idx {
1919
CPUID_EDX,
2020
};
2121

22-
#define CPUID_TSC_LEAF 0x15
23-
#define CPUID_MWAIT_LEAF 5
22+
#define CPUID_LEAF_MWAIT 0x5
23+
#define CPUID_LEAF_DCA 0x9
24+
#define CPUID_LEAF_XSTATE 0x0d
25+
#define CPUID_LEAF_TSC 0x15
26+
#define CPUID_LEAF_FREQ 0x16
27+
#define CPUID_LEAF_TILE 0x1d
2428

2529
#ifdef CONFIG_X86_32
2630
extern int have_cpuid_p(void);

arch/x86/include/asm/fpu/xstate.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
/* Bit 63 of XCR0 is reserved for future expansion */
1313
#define XFEATURE_MASK_EXTEND (~(XFEATURE_MASK_FPSSE | (1ULL << 63)))
1414

15-
#define XSTATE_CPUID 0x0000000d
16-
17-
#define TILE_CPUID 0x0000001d
18-
1915
#define FXSAVE_SIZE 512
2016

2117
#define XSAVE_HDR_SIZE 64

arch/x86/kernel/acpi/cstate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static long acpi_processor_ffh_cstate_probe_cpu(void *_cx)
130130
unsigned int cstate_type; /* C-state type and not ACPI C-state type */
131131
unsigned int num_cstate_subtype;
132132

133-
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
133+
cpuid(CPUID_LEAF_MWAIT, &eax, &ebx, &ecx, &edx);
134134

135135
/* Check whether this particular cx_type (in CST) is supported or not */
136136
cstate_type = (((cx->address >> MWAIT_SUBSTATE_SIZE) &
@@ -174,7 +174,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
174174
struct cpuinfo_x86 *c = &cpu_data(cpu);
175175
long retval;
176176

177-
if (!cpu_cstate_entry || c->cpuid_level < CPUID_MWAIT_LEAF)
177+
if (!cpu_cstate_entry || c->cpuid_level < CPUID_LEAF_MWAIT)
178178
return -1;
179179

180180
if (reg->bit_offset != NATIVE_CSTATE_BEYOND_HALT)

arch/x86/kernel/cpu/common.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include <asm/alternative.h>
3131
#include <asm/cmdline.h>
32+
#include <asm/cpuid.h>
3233
#include <asm/perf_event.h>
3334
#include <asm/mmu_context.h>
3435
#include <asm/doublefault.h>
@@ -637,9 +638,9 @@ struct cpuid_dependent_feature {
637638

638639
static const struct cpuid_dependent_feature
639640
cpuid_dependent_features[] = {
640-
{ X86_FEATURE_MWAIT, 0x00000005 },
641-
{ X86_FEATURE_DCA, 0x00000009 },
642-
{ X86_FEATURE_XSAVE, 0x0000000d },
641+
{ X86_FEATURE_MWAIT, CPUID_LEAF_MWAIT },
642+
{ X86_FEATURE_DCA, CPUID_LEAF_DCA },
643+
{ X86_FEATURE_XSAVE, CPUID_LEAF_XSTATE },
643644
{ 0, 0 }
644645
};
645646

arch/x86/kernel/fpu/xstate.c

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <asm/fpu/signal.h>
2121
#include <asm/fpu/xcr.h>
2222

23+
#include <asm/cpuid.h>
2324
#include <asm/tlbflush.h>
2425
#include <asm/prctl.h>
2526
#include <asm/elf.h>
@@ -232,7 +233,7 @@ static void __init setup_xstate_cache(void)
232233
xmm_space);
233234

234235
for_each_extended_xfeature(i, fpu_kernel_cfg.max_features) {
235-
cpuid_count(XSTATE_CPUID, i, &eax, &ebx, &ecx, &edx);
236+
cpuid_count(CPUID_LEAF_XSTATE, i, &eax, &ebx, &ecx, &edx);
236237

237238
xstate_sizes[i] = eax;
238239
xstate_flags[i] = ecx;
@@ -398,7 +399,7 @@ int xfeature_size(int xfeature_nr)
398399
u32 eax, ebx, ecx, edx;
399400

400401
CHECK_XFEATURE(xfeature_nr);
401-
cpuid_count(XSTATE_CPUID, xfeature_nr, &eax, &ebx, &ecx, &edx);
402+
cpuid_count(CPUID_LEAF_XSTATE, xfeature_nr, &eax, &ebx, &ecx, &edx);
402403
return eax;
403404
}
404405

@@ -441,9 +442,9 @@ static void __init __xstate_dump_leaves(void)
441442
* just in case there are some goodies up there
442443
*/
443444
for (i = 0; i < XFEATURE_MAX + 10; i++) {
444-
cpuid_count(XSTATE_CPUID, i, &eax, &ebx, &ecx, &edx);
445+
cpuid_count(CPUID_LEAF_XSTATE, i, &eax, &ebx, &ecx, &edx);
445446
pr_warn("CPUID[%02x, %02x]: eax=%08x ebx=%08x ecx=%08x edx=%08x\n",
446-
XSTATE_CPUID, i, eax, ebx, ecx, edx);
447+
CPUID_LEAF_XSTATE, i, eax, ebx, ecx, edx);
447448
}
448449
}
449450

@@ -484,7 +485,7 @@ static int __init check_xtile_data_against_struct(int size)
484485
* Check the maximum palette id:
485486
* eax: the highest numbered palette subleaf.
486487
*/
487-
cpuid_count(TILE_CPUID, 0, &max_palid, &ebx, &ecx, &edx);
488+
cpuid_count(CPUID_LEAF_TILE, 0, &max_palid, &ebx, &ecx, &edx);
488489

489490
/*
490491
* Cross-check each tile size and find the maximum number of
@@ -498,7 +499,7 @@ static int __init check_xtile_data_against_struct(int size)
498499
* eax[31:16]: bytes per title
499500
* ebx[31:16]: the max names (or max number of tiles)
500501
*/
501-
cpuid_count(TILE_CPUID, palid, &eax, &ebx, &edx, &edx);
502+
cpuid_count(CPUID_LEAF_TILE, palid, &eax, &ebx, &edx, &edx);
502503
tile_size = eax >> 16;
503504
max = ebx >> 16;
504505

@@ -633,7 +634,7 @@ static unsigned int __init get_compacted_size(void)
633634
* are no supervisor states, but XSAVEC still uses compacted
634635
* format.
635636
*/
636-
cpuid_count(XSTATE_CPUID, 1, &eax, &ebx, &ecx, &edx);
637+
cpuid_count(CPUID_LEAF_XSTATE, 1, &eax, &ebx, &ecx, &edx);
637638
return ebx;
638639
}
639640

@@ -674,7 +675,7 @@ static unsigned int __init get_xsave_size_user(void)
674675
* containing all the *user* state components
675676
* corresponding to bits currently set in XCR0.
676677
*/
677-
cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
678+
cpuid_count(CPUID_LEAF_XSTATE, 0, &eax, &ebx, &ecx, &edx);
678679
return ebx;
679680
}
680681

@@ -763,21 +764,16 @@ void __init fpu__init_system_xstate(unsigned int legacy_size)
763764
return;
764765
}
765766

766-
if (boot_cpu_data.cpuid_level < XSTATE_CPUID) {
767-
WARN_ON_FPU(1);
768-
return;
769-
}
770-
771767
/*
772768
* Find user xstates supported by the processor.
773769
*/
774-
cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
770+
cpuid_count(CPUID_LEAF_XSTATE, 0, &eax, &ebx, &ecx, &edx);
775771
fpu_kernel_cfg.max_features = eax + ((u64)edx << 32);
776772

777773
/*
778774
* Find supervisor xstates supported by the processor.
779775
*/
780-
cpuid_count(XSTATE_CPUID, 1, &eax, &ebx, &ecx, &edx);
776+
cpuid_count(CPUID_LEAF_XSTATE, 1, &eax, &ebx, &ecx, &edx);
781777
fpu_kernel_cfg.max_features |= ecx + ((u64)edx << 32);
782778

783779
if ((fpu_kernel_cfg.max_features & XFEATURE_MASK_FPSSE) != XFEATURE_MASK_FPSSE) {

arch/x86/kernel/hpet.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -928,10 +928,7 @@ static bool __init mwait_pc10_supported(void)
928928
if (!cpu_feature_enabled(X86_FEATURE_MWAIT))
929929
return false;
930930

931-
if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
932-
return false;
933-
934-
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);
931+
cpuid(CPUID_LEAF_MWAIT, &eax, &ebx, &ecx, &mwait_substates);
935932

936933
return (ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) &&
937934
(ecx & CPUID5_ECX_INTERRUPT_BREAK) &&

arch/x86/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ static __init bool prefer_mwait_c1_over_halt(void)
878878
if (boot_cpu_has_bug(X86_BUG_MONITOR) || boot_cpu_has_bug(X86_BUG_AMD_APIC_C1E))
879879
return false;
880880

881-
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
881+
cpuid(CPUID_LEAF_MWAIT, &eax, &ebx, &ecx, &edx);
882882

883883
/*
884884
* If MWAIT extensions are not available, it is safe to use MWAIT

arch/x86/kernel/smpboot.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,10 +1319,8 @@ static inline void mwait_play_dead_cpuid_hint(void)
13191319
return;
13201320
if (!this_cpu_has(X86_FEATURE_CLFLUSH))
13211321
return;
1322-
if (__this_cpu_read(cpu_info.cpuid_level) < CPUID_MWAIT_LEAF)
1323-
return;
13241322

1325-
eax = CPUID_MWAIT_LEAF;
1323+
eax = CPUID_LEAF_MWAIT;
13261324
ecx = 0;
13271325
native_cpuid(&eax, &ebx, &ecx, &edx);
13281326

arch/x86/kernel/tsc.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -665,13 +665,13 @@ unsigned long native_calibrate_tsc(void)
665665
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
666666
return 0;
667667

668-
if (boot_cpu_data.cpuid_level < CPUID_TSC_LEAF)
668+
if (boot_cpu_data.cpuid_level < CPUID_LEAF_TSC)
669669
return 0;
670670

671671
eax_denominator = ebx_numerator = ecx_hz = edx = 0;
672672

673673
/* CPUID 15H TSC/Crystal ratio, plus optionally Crystal Hz */
674-
cpuid(CPUID_TSC_LEAF, &eax_denominator, &ebx_numerator, &ecx_hz, &edx);
674+
cpuid(CPUID_LEAF_TSC, &eax_denominator, &ebx_numerator, &ecx_hz, &edx);
675675

676676
if (ebx_numerator == 0 || eax_denominator == 0)
677677
return 0;
@@ -680,8 +680,8 @@ unsigned long native_calibrate_tsc(void)
680680

681681
/*
682682
* Denverton SoCs don't report crystal clock, and also don't support
683-
* CPUID.0x16 for the calculation below, so hardcode the 25MHz crystal
684-
* clock.
683+
* CPUID_LEAF_FREQ for the calculation below, so hardcode the 25MHz
684+
* crystal clock.
685685
*/
686686
if (crystal_khz == 0 &&
687687
boot_cpu_data.x86_vfm == INTEL_ATOM_GOLDMONT_D)
@@ -700,10 +700,10 @@ unsigned long native_calibrate_tsc(void)
700700
* clock, but we can easily calculate it to a high degree of accuracy
701701
* by considering the crystal ratio and the CPU speed.
702702
*/
703-
if (crystal_khz == 0 && boot_cpu_data.cpuid_level >= 0x16) {
703+
if (crystal_khz == 0 && boot_cpu_data.cpuid_level >= CPUID_LEAF_FREQ) {
704704
unsigned int eax_base_mhz, ebx, ecx, edx;
705705

706-
cpuid(0x16, &eax_base_mhz, &ebx, &ecx, &edx);
706+
cpuid(CPUID_LEAF_FREQ, &eax_base_mhz, &ebx, &ecx, &edx);
707707
crystal_khz = eax_base_mhz * 1000 *
708708
eax_denominator / ebx_numerator;
709709
}
@@ -738,12 +738,12 @@ static unsigned long cpu_khz_from_cpuid(void)
738738
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
739739
return 0;
740740

741-
if (boot_cpu_data.cpuid_level < 0x16)
741+
if (boot_cpu_data.cpuid_level < CPUID_LEAF_FREQ)
742742
return 0;
743743

744744
eax_base_mhz = ebx_max_mhz = ecx_bus_mhz = edx = 0;
745745

746-
cpuid(0x16, &eax_base_mhz, &ebx_max_mhz, &ecx_bus_mhz, &edx);
746+
cpuid(CPUID_LEAF_FREQ, &eax_base_mhz, &ebx_max_mhz, &ecx_bus_mhz, &edx);
747747

748748
return eax_base_mhz * 1000;
749749
}
@@ -1076,7 +1076,7 @@ static void __init detect_art(void)
10761076
{
10771077
unsigned int unused;
10781078

1079-
if (boot_cpu_data.cpuid_level < CPUID_TSC_LEAF)
1079+
if (boot_cpu_data.cpuid_level < CPUID_LEAF_TSC)
10801080
return;
10811081

10821082
/*
@@ -1089,7 +1089,7 @@ static void __init detect_art(void)
10891089
tsc_async_resets)
10901090
return;
10911091

1092-
cpuid(CPUID_TSC_LEAF, &art_base_clk.denominator,
1092+
cpuid(CPUID_LEAF_TSC, &art_base_clk.denominator,
10931093
&art_base_clk.numerator, &art_base_clk.freq_khz, &unused);
10941094

10951095
art_base_clk.freq_khz /= KHZ;

0 commit comments

Comments
 (0)