Skip to content

Commit e5c1f00

Browse files
author
CKI KWF Bot
committed
Merge: [RHEL-9.8] DMA Engine subsystem update
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7413 # Merge Request Required Information ## Summary of Changes This updates the dma engine subsystem to v6.17 for the drivers we support. There are 2 commits touching idxd that are not here, but will come in with the iommu updates. For the x86 commits at the beginning, we already had a few of them backported, so I backported the rest of the leaf node changes. ## Approved Development Ticket(s) JIRA: https://issues.redhat.com/browse/RHEL-114133 Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com> Approved-by: Mark Langsdorf <mlangsdo@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 adbb1c6 + cb1879b commit e5c1f00

File tree

44 files changed

+485
-277
lines changed

Some content is hidden

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

44 files changed

+485
-277
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ enum cpuid_regs_idx {
1919
CPUID_EDX,
2020
};
2121

22-
#define CPUID_TSC_LEAF 0x15
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
2328

2429
#ifdef CONFIG_X86_32
2530
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/include/asm/mwait.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#define MWAIT_HINT2SUBSTATE(hint) ((hint) & MWAIT_CSTATE_MASK)
1616
#define MWAIT_C1_SUBSTATE_MASK 0xf0
1717

18-
#define CPUID_MWAIT_LEAF 5
1918
#define CPUID5_ECX_EXTENSIONS_SUPPORTED 0x1
2019
#define CPUID5_ECX_INTERRUPT_BREAK 0x2
2120

arch/x86/kernel/acpi/cstate.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/sched.h>
1414

1515
#include <acpi/processor.h>
16+
#include <asm/cpuid.h>
1617
#include <asm/mwait.h>
1718
#include <asm/special_insns.h>
1819
#include <asm/smp.h>
@@ -129,7 +130,7 @@ static long acpi_processor_ffh_cstate_probe_cpu(void *_cx)
129130
unsigned int cstate_type; /* C-state type and not ACPI C-state type */
130131
unsigned int num_cstate_subtype;
131132

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

134135
/* Check whether this particular cx_type (in CST) is supported or not */
135136
cstate_type = (((cx->address >> MWAIT_SUBSTATE_SIZE) &
@@ -173,7 +174,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
173174
struct cpuinfo_x86 *c = &cpu_data(cpu);
174175
long retval;
175176

176-
if (!cpu_cstate_entry || c->cpuid_level < CPUID_MWAIT_LEAF)
177+
if (!cpu_cstate_entry || c->cpuid_level < CPUID_LEAF_MWAIT)
177178
return -1;
178179

179180
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>
@@ -681,9 +682,9 @@ struct cpuid_dependent_feature {
681682

682683
static const struct cpuid_dependent_feature
683684
cpuid_dependent_features[] = {
684-
{ X86_FEATURE_MWAIT, 0x00000005 },
685-
{ X86_FEATURE_DCA, 0x00000009 },
686-
{ X86_FEATURE_XSAVE, 0x0000000d },
685+
{ X86_FEATURE_MWAIT, CPUID_LEAF_MWAIT },
686+
{ X86_FEATURE_DCA, CPUID_LEAF_DCA },
687+
{ X86_FEATURE_XSAVE, CPUID_LEAF_XSTATE },
687688
{ 0, 0 }
688689
};
689690

arch/x86/kernel/fpu/xstate.c

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

22+
#include <asm/cpuid.h>
2223
#include <asm/tlbflush.h>
2324
#include <asm/prctl.h>
2425
#include <asm/elf.h>
@@ -229,7 +230,7 @@ static void __init setup_xstate_cache(void)
229230
xmm_space);
230231

231232
for_each_extended_xfeature(i, fpu_kernel_cfg.max_features) {
232-
cpuid_count(XSTATE_CPUID, i, &eax, &ebx, &ecx, &edx);
233+
cpuid_count(CPUID_LEAF_XSTATE, i, &eax, &ebx, &ecx, &edx);
233234

234235
xstate_sizes[i] = eax;
235236
xstate_flags[i] = ecx;
@@ -395,7 +396,7 @@ int xfeature_size(int xfeature_nr)
395396
u32 eax, ebx, ecx, edx;
396397

397398
CHECK_XFEATURE(xfeature_nr);
398-
cpuid_count(XSTATE_CPUID, xfeature_nr, &eax, &ebx, &ecx, &edx);
399+
cpuid_count(CPUID_LEAF_XSTATE, xfeature_nr, &eax, &ebx, &ecx, &edx);
399400
return eax;
400401
}
401402

@@ -438,9 +439,9 @@ static void __init __xstate_dump_leaves(void)
438439
* just in case there are some goodies up there
439440
*/
440441
for (i = 0; i < XFEATURE_MAX + 10; i++) {
441-
cpuid_count(XSTATE_CPUID, i, &eax, &ebx, &ecx, &edx);
442+
cpuid_count(CPUID_LEAF_XSTATE, i, &eax, &ebx, &ecx, &edx);
442443
pr_warn("CPUID[%02x, %02x]: eax=%08x ebx=%08x ecx=%08x edx=%08x\n",
443-
XSTATE_CPUID, i, eax, ebx, ecx, edx);
444+
CPUID_LEAF_XSTATE, i, eax, ebx, ecx, edx);
444445
}
445446
}
446447

@@ -481,7 +482,7 @@ static int __init check_xtile_data_against_struct(int size)
481482
* Check the maximum palette id:
482483
* eax: the highest numbered palette subleaf.
483484
*/
484-
cpuid_count(TILE_CPUID, 0, &max_palid, &ebx, &ecx, &edx);
485+
cpuid_count(CPUID_LEAF_TILE, 0, &max_palid, &ebx, &ecx, &edx);
485486

486487
/*
487488
* Cross-check each tile size and find the maximum number of
@@ -495,7 +496,7 @@ static int __init check_xtile_data_against_struct(int size)
495496
* eax[31:16]: bytes per title
496497
* ebx[31:16]: the max names (or max number of tiles)
497498
*/
498-
cpuid_count(TILE_CPUID, palid, &eax, &ebx, &edx, &edx);
499+
cpuid_count(CPUID_LEAF_TILE, palid, &eax, &ebx, &edx, &edx);
499500
tile_size = eax >> 16;
500501
max = ebx >> 16;
501502

@@ -630,7 +631,7 @@ static unsigned int __init get_compacted_size(void)
630631
* are no supervisor states, but XSAVEC still uses compacted
631632
* format.
632633
*/
633-
cpuid_count(XSTATE_CPUID, 1, &eax, &ebx, &ecx, &edx);
634+
cpuid_count(CPUID_LEAF_XSTATE, 1, &eax, &ebx, &ecx, &edx);
634635
return ebx;
635636
}
636637

@@ -671,7 +672,7 @@ static unsigned int __init get_xsave_size_user(void)
671672
* containing all the *user* state components
672673
* corresponding to bits currently set in XCR0.
673674
*/
674-
cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
675+
cpuid_count(CPUID_LEAF_XSTATE, 0, &eax, &ebx, &ecx, &edx);
675676
return ebx;
676677
}
677678

@@ -760,21 +761,16 @@ void __init fpu__init_system_xstate(unsigned int legacy_size)
760761
return;
761762
}
762763

763-
if (boot_cpu_data.cpuid_level < XSTATE_CPUID) {
764-
WARN_ON_FPU(1);
765-
return;
766-
}
767-
768764
/*
769765
* Find user xstates supported by the processor.
770766
*/
771-
cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
767+
cpuid_count(CPUID_LEAF_XSTATE, 0, &eax, &ebx, &ecx, &edx);
772768
fpu_kernel_cfg.max_features = eax + ((u64)edx << 32);
773769

774770
/*
775771
* Find supervisor xstates supported by the processor.
776772
*/
777-
cpuid_count(XSTATE_CPUID, 1, &eax, &ebx, &ecx, &edx);
773+
cpuid_count(CPUID_LEAF_XSTATE, 1, &eax, &ebx, &ecx, &edx);
778774
fpu_kernel_cfg.max_features |= ecx + ((u64)edx << 32);
779775

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

arch/x86/kernel/hpet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/cpu.h>
88
#include <linux/irq.h>
99

10+
#include <asm/cpuid.h>
1011
#include <asm/irq_remapping.h>
1112
#include <asm/hpet.h>
1213
#include <asm/time.h>
@@ -927,7 +928,7 @@ static bool __init mwait_pc10_supported(void)
927928
if (!cpu_feature_enabled(X86_FEATURE_MWAIT))
928929
return false;
929930

930-
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);
931+
cpuid(CPUID_LEAF_MWAIT, &eax, &ebx, &ecx, &mwait_substates);
931932

932933
return (ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) &&
933934
(ecx & CPUID5_ECX_INTERRUPT_BREAK) &&

arch/x86/kernel/process.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <trace/events/power.h>
2929
#include <linux/hw_breakpoint.h>
3030
#include <asm/cpu.h>
31+
#include <asm/cpuid.h>
3132
#include <asm/apic.h>
3233
#include <linux/uaccess.h>
3334
#include <asm/mwait.h>
@@ -874,7 +875,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
874875
if (boot_cpu_has_bug(X86_BUG_MONITOR))
875876
return 0;
876877

877-
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
878+
cpuid(CPUID_LEAF_MWAIT, &eax, &ebx, &ecx, &edx);
878879

879880
/*
880881
* If MWAIT extensions are not available, it is safe to use MWAIT

arch/x86/kernel/smpboot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363

6464
#include <asm/acpi.h>
6565
#include <asm/cacheinfo.h>
66+
#include <asm/cpuid.h>
6667
#include <asm/desc.h>
6768
#include <asm/nmi.h>
6869
#include <asm/irq.h>
@@ -1333,7 +1334,7 @@ static inline void mwait_play_dead_cpuid_hint(void)
13331334
if (!this_cpu_has(X86_FEATURE_CLFLUSH))
13341335
return;
13351336

1336-
eax = CPUID_MWAIT_LEAF;
1337+
eax = CPUID_LEAF_MWAIT;
13371338
ecx = 0;
13381339
native_cpuid(&eax, &ebx, &ecx, &edx);
13391340

0 commit comments

Comments
 (0)