Skip to content

Commit d321976

Browse files
committed
Merge tag 'v6.1.151' into 6.1-main
This is the 6.1.151 stable release # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmjAW84ACgkQONu9yGCS # aT7aVw//XRgcRbZ9cY2vDXYE92H+PMWO8yzs4neXAvy2esKPwIq6Dim/wUvSUrEG # KkILajKZNfmhdRq4wp601erfjG2U7Kcxftw4MzzkUw/KVSQZWYyORvHQtSLe57Qk # DYNbQwGc5WHo2JcTi0DdsM0MBWFTJ8CHPYd94rESi217Qo7LcTBjaGP5AmWlOCVH # u4i7fUuQHFaIcqE2bGRIUhTjZm5PrGVQ8zj/bti3bzdyvqKEqT9UM7IK1OUb3tia # /RucJAbukfcz2egdsgCzR0O2TK+BTOWc5yJ9ZWEy+JU2ASX6wBWzyY0V5qQLLPAI # o9fai6N9D5/Vg5WsNsqdqYfmeQIu8iqYldCAx37M0Keyxm6mUzXueTf2v6F8ln2T # I93Xmq5L+fWkwFsX6OPpFiJwqFAnZqytlEMtFzroG+6KlTvh53daYwSNT+kz9tv8 # +HGxQ33mS77Lw9DU0S3nISgYnbw1AJJExKDHy6S3q+VksY/rgwqhX+TYtcziFTL2 # e2Zmax7C+YUXM6B0qmw/Nu1RREMD4DIUziW0XhKP21IzV5G0627prtOXjd0onjKA # 5H4hGuEVJ5Wvg+Y5zR4e8JhBis1D08WGDJAQ75PfqNLtUYg7Q6Mo62m5N1cX4TXi # JpxrPuPZjIkx83rQJ4x5glSePhP0WPDavTkWnshguvj/ww0fwgg= # =zwcc # -----END PGP SIGNATURE----- # gpg: Signature made Tue Sep 9 18:54:38 2025 CEST # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Can't check signature: No public key
2 parents 14633f5 + f97f100 commit d321976

File tree

86 files changed

+771
-557
lines changed

Some content is hidden

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

86 files changed

+771
-557
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 1
4-
SUBLEVEL = 150
4+
SUBLEVEL = 151
55
EXTRAVERSION =
66
NAME = Curry Ramen
77

arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@
508508
pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
509509
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
510510
vmmc-supply = <&reg_usdhc2_vmmc>;
511+
vqmmc-supply = <&ldo5>;
511512
bus-width = <4>;
512513
status = "okay";
513514
};

arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,7 @@
977977
reg = <0>;
978978
m25p,fast-read;
979979
spi-max-frequency = <10000000>;
980+
vcc-supply = <&vcc_3v0>;
980981
};
981982
};
982983

arch/x86/include/asm/pgtable_64_types.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ static inline bool pgtable_l5_enabled(void)
4040
#define pgtable_l5_enabled() 0
4141
#endif /* CONFIG_X86_5LEVEL */
4242

43+
#define ARCH_PAGE_TABLE_SYNC_MASK \
44+
(pgtable_l5_enabled() ? PGTBL_PGD_MODIFIED : PGTBL_P4D_MODIFIED)
45+
4346
extern unsigned int pgdir_shift;
4447
extern unsigned int ptrs_per_p4d;
4548

arch/x86/mm/init_64.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,24 @@ static void sync_global_pgds(unsigned long start, unsigned long end)
223223
sync_global_pgds_l4(start, end);
224224
}
225225

226+
/*
227+
* Make kernel mappings visible in all page tables in the system.
228+
* This is necessary except when the init task populates kernel mappings
229+
* during the boot process. In that case, all processes originating from
230+
* the init task copies the kernel mappings, so there is no issue.
231+
* Otherwise, missing synchronization could lead to kernel crashes due
232+
* to missing page table entries for certain kernel mappings.
233+
*
234+
* Synchronization is performed at the top level, which is the PGD in
235+
* 5-level paging systems. But in 4-level paging systems, however,
236+
* pgd_populate() is a no-op, so synchronization is done at the P4D level.
237+
* sync_global_pgds() handles this difference between paging levels.
238+
*/
239+
void arch_sync_kernel_mappings(unsigned long start, unsigned long end)
240+
{
241+
sync_global_pgds(start, end);
242+
}
243+
226244
/*
227245
* NOTE: This function is marked __ref because it calls __init function
228246
* (alloc_bootmem_pages). It's safe to do it ONLY when after_bootmem == 0.

drivers/acpi/arm64/iort.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,8 +928,10 @@ static u32 *iort_rmr_alloc_sids(u32 *sids, u32 count, u32 id_start,
928928

929929
new_sids = krealloc_array(sids, count + new_count,
930930
sizeof(*new_sids), GFP_KERNEL);
931-
if (!new_sids)
931+
if (!new_sids) {
932+
kfree(sids);
932933
return NULL;
934+
}
933935

934936
for (i = count; i < total_count; i++)
935937
new_sids[i] = id_start++;

drivers/cpufreq/intel_pstate.c

Lines changed: 44 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ struct vid_data {
172172
* based on the MSR_IA32_MISC_ENABLE value and whether or
173173
* not the maximum reported turbo P-state is different from
174174
* the maximum reported non-turbo one.
175-
* @turbo_disabled_mf: The @turbo_disabled value reflected by cpuinfo.max_freq.
176175
* @min_perf_pct: Minimum capacity limit in percent of the maximum turbo
177176
* P-state capacity.
178177
* @max_perf_pct: Maximum capacity limit in percent of the maximum turbo
@@ -181,7 +180,6 @@ struct vid_data {
181180
struct global_params {
182181
bool no_turbo;
183182
bool turbo_disabled;
184-
bool turbo_disabled_mf;
185183
int max_perf_pct;
186184
int min_perf_pct;
187185
};
@@ -559,16 +557,16 @@ static void intel_pstate_hybrid_hwp_adjust(struct cpudata *cpu)
559557
cpu->pstate.min_pstate = intel_pstate_freq_to_hwp(cpu, freq);
560558
}
561559

562-
static inline void update_turbo_state(void)
560+
static bool turbo_is_disabled(void)
563561
{
564562
u64 misc_en;
565-
struct cpudata *cpu;
566563

567-
cpu = all_cpu_data[0];
564+
if (!cpu_feature_enabled(X86_FEATURE_IDA))
565+
return true;
566+
568567
rdmsrl(MSR_IA32_MISC_ENABLE, misc_en);
569-
global.turbo_disabled =
570-
(misc_en & MSR_IA32_MISC_ENABLE_TURBO_DISABLE ||
571-
cpu->pstate.max_pstate == cpu->pstate.turbo_pstate);
568+
569+
return !!(misc_en & MSR_IA32_MISC_ENABLE_TURBO_DISABLE);
572570
}
573571

574572
static int min_perf_pct_min(void)
@@ -1123,40 +1121,16 @@ static void intel_pstate_update_policies(void)
11231121
static void __intel_pstate_update_max_freq(struct cpudata *cpudata,
11241122
struct cpufreq_policy *policy)
11251123
{
1126-
policy->cpuinfo.max_freq = global.turbo_disabled_mf ?
1124+
policy->cpuinfo.max_freq = global.turbo_disabled ?
11271125
cpudata->pstate.max_freq : cpudata->pstate.turbo_freq;
11281126
refresh_frequency_limits(policy);
11291127
}
11301128

1131-
static void intel_pstate_update_max_freq(unsigned int cpu)
1132-
{
1133-
struct cpufreq_policy *policy = cpufreq_cpu_acquire(cpu);
1134-
1135-
if (!policy)
1136-
return;
1137-
1138-
__intel_pstate_update_max_freq(all_cpu_data[cpu], policy);
1139-
1140-
cpufreq_cpu_release(policy);
1141-
}
1142-
11431129
static void intel_pstate_update_limits(unsigned int cpu)
11441130
{
11451131
mutex_lock(&intel_pstate_driver_lock);
11461132

1147-
update_turbo_state();
1148-
/*
1149-
* If turbo has been turned on or off globally, policy limits for
1150-
* all CPUs need to be updated to reflect that.
1151-
*/
1152-
if (global.turbo_disabled_mf != global.turbo_disabled) {
1153-
global.turbo_disabled_mf = global.turbo_disabled;
1154-
arch_set_max_freq_ratio(global.turbo_disabled);
1155-
for_each_possible_cpu(cpu)
1156-
intel_pstate_update_max_freq(cpu);
1157-
} else {
1158-
cpufreq_update_policy(cpu);
1159-
}
1133+
cpufreq_update_policy(cpu);
11601134

11611135
mutex_unlock(&intel_pstate_driver_lock);
11621136
}
@@ -1256,11 +1230,7 @@ static ssize_t show_no_turbo(struct kobject *kobj,
12561230
return -EAGAIN;
12571231
}
12581232

1259-
update_turbo_state();
1260-
if (global.turbo_disabled)
1261-
ret = sprintf(buf, "%u\n", global.turbo_disabled);
1262-
else
1263-
ret = sprintf(buf, "%u\n", global.no_turbo);
1233+
ret = sprintf(buf, "%u\n", global.no_turbo);
12641234

12651235
mutex_unlock(&intel_pstate_driver_lock);
12661236

@@ -1271,32 +1241,39 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
12711241
const char *buf, size_t count)
12721242
{
12731243
unsigned int input;
1274-
int ret;
1244+
bool no_turbo;
12751245

1276-
ret = sscanf(buf, "%u", &input);
1277-
if (ret != 1)
1246+
if (sscanf(buf, "%u", &input) != 1)
12781247
return -EINVAL;
12791248

12801249
mutex_lock(&intel_pstate_driver_lock);
12811250

12821251
if (!intel_pstate_driver) {
1283-
mutex_unlock(&intel_pstate_driver_lock);
1284-
return -EAGAIN;
1252+
count = -EAGAIN;
1253+
goto unlock_driver;
12851254
}
12861255

1287-
mutex_lock(&intel_pstate_limits_lock);
1256+
no_turbo = !!clamp_t(int, input, 0, 1);
12881257

1289-
update_turbo_state();
1290-
if (global.turbo_disabled) {
1291-
pr_notice_once("Turbo disabled by BIOS or unavailable on processor\n");
1292-
mutex_unlock(&intel_pstate_limits_lock);
1293-
mutex_unlock(&intel_pstate_driver_lock);
1294-
return -EPERM;
1258+
WRITE_ONCE(global.turbo_disabled, turbo_is_disabled());
1259+
if (global.turbo_disabled && !no_turbo) {
1260+
pr_notice("Turbo disabled by BIOS or unavailable on processor\n");
1261+
count = -EPERM;
1262+
if (global.no_turbo)
1263+
goto unlock_driver;
1264+
else
1265+
no_turbo = 1;
12951266
}
12961267

1297-
global.no_turbo = clamp_t(int, input, 0, 1);
1268+
if (no_turbo == global.no_turbo) {
1269+
goto unlock_driver;
1270+
}
12981271

1299-
if (global.no_turbo) {
1272+
WRITE_ONCE(global.no_turbo, no_turbo);
1273+
1274+
mutex_lock(&intel_pstate_limits_lock);
1275+
1276+
if (no_turbo) {
13001277
struct cpudata *cpu = all_cpu_data[0];
13011278
int pct = cpu->pstate.max_pstate * 100 / cpu->pstate.turbo_pstate;
13021279

@@ -1308,8 +1285,9 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
13081285
mutex_unlock(&intel_pstate_limits_lock);
13091286

13101287
intel_pstate_update_policies();
1311-
arch_set_max_freq_ratio(global.no_turbo);
1288+
arch_set_max_freq_ratio(no_turbo);
13121289

1290+
unlock_driver:
13131291
mutex_unlock(&intel_pstate_driver_lock);
13141292

13151293
return count;
@@ -1757,7 +1735,7 @@ static u64 atom_get_val(struct cpudata *cpudata, int pstate)
17571735
u32 vid;
17581736

17591737
val = (u64)pstate << 8;
1760-
if (global.no_turbo && !global.turbo_disabled)
1738+
if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled))
17611739
val |= (u64)1 << 32;
17621740

17631741
vid_fp = cpudata->vid.min + mul_fp(
@@ -1927,7 +1905,7 @@ static u64 core_get_val(struct cpudata *cpudata, int pstate)
19271905
u64 val;
19281906

19291907
val = (u64)pstate << 8;
1930-
if (global.no_turbo && !global.turbo_disabled)
1908+
if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled))
19311909
val |= (u64)1 << 32;
19321910

19331911
return val;
@@ -1988,14 +1966,6 @@ static void intel_pstate_set_min_pstate(struct cpudata *cpu)
19881966
intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate);
19891967
}
19901968

1991-
static void intel_pstate_max_within_limits(struct cpudata *cpu)
1992-
{
1993-
int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio);
1994-
1995-
update_turbo_state();
1996-
intel_pstate_set_pstate(cpu, pstate);
1997-
}
1998-
19991969
static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
20001970
{
20011971
int perf_ctl_max_phys = pstate_funcs.get_max_physical(cpu->cpu);
@@ -2221,7 +2191,7 @@ static inline int32_t get_target_pstate(struct cpudata *cpu)
22212191

22222192
sample->busy_scaled = busy_frac * 100;
22232193

2224-
target = global.no_turbo || global.turbo_disabled ?
2194+
target = READ_ONCE(global.no_turbo) ?
22252195
cpu->pstate.max_pstate : cpu->pstate.turbo_pstate;
22262196
target += target >> 2;
22272197
target = mul_fp(target, busy_frac);
@@ -2265,8 +2235,6 @@ static void intel_pstate_adjust_pstate(struct cpudata *cpu)
22652235
struct sample *sample;
22662236
int target_pstate;
22672237

2268-
update_turbo_state();
2269-
22702238
target_pstate = get_target_pstate(cpu);
22712239
target_pstate = intel_pstate_prepare_request(cpu, target_pstate);
22722240
trace_cpu_frequency(target_pstate * cpu->pstate.scaling, cpu->cpu);
@@ -2492,7 +2460,7 @@ static void intel_pstate_clear_update_util_hook(unsigned int cpu)
24922460

24932461
static int intel_pstate_get_max_freq(struct cpudata *cpu)
24942462
{
2495-
return global.turbo_disabled || global.no_turbo ?
2463+
return READ_ONCE(global.no_turbo) ?
24962464
cpu->pstate.max_freq : cpu->pstate.turbo_freq;
24972465
}
24982466

@@ -2577,12 +2545,14 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
25772545
intel_pstate_update_perf_limits(cpu, policy->min, policy->max);
25782546

25792547
if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE) {
2548+
int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio);
2549+
25802550
/*
25812551
* NOHZ_FULL CPUs need this as the governor callback may not
25822552
* be invoked on them.
25832553
*/
25842554
intel_pstate_clear_update_util_hook(policy->cpu);
2585-
intel_pstate_max_within_limits(cpu);
2555+
intel_pstate_set_pstate(cpu, pstate);
25862556
} else {
25872557
intel_pstate_set_update_util_hook(policy->cpu);
25882558
}
@@ -2625,10 +2595,9 @@ static void intel_pstate_verify_cpu_policy(struct cpudata *cpu,
26252595
{
26262596
int max_freq;
26272597

2628-
update_turbo_state();
26292598
if (hwp_active) {
26302599
intel_pstate_get_hwp_cap(cpu);
2631-
max_freq = global.no_turbo || global.turbo_disabled ?
2600+
max_freq = READ_ONCE(global.no_turbo) ?
26322601
cpu->pstate.max_freq : cpu->pstate.turbo_freq;
26332602
} else {
26342603
max_freq = intel_pstate_get_max_freq(cpu);
@@ -2722,8 +2691,6 @@ static int __intel_pstate_cpu_init(struct cpufreq_policy *policy)
27222691

27232692
/* cpuinfo and default policy values */
27242693
policy->cpuinfo.min_freq = cpu->pstate.min_freq;
2725-
update_turbo_state();
2726-
global.turbo_disabled_mf = global.turbo_disabled;
27272694
policy->cpuinfo.max_freq = global.turbo_disabled ?
27282695
cpu->pstate.max_freq : cpu->pstate.turbo_freq;
27292696

@@ -2889,8 +2856,6 @@ static int intel_cpufreq_target(struct cpufreq_policy *policy,
28892856
struct cpufreq_freqs freqs;
28902857
int target_pstate;
28912858

2892-
update_turbo_state();
2893-
28942859
freqs.old = policy->cur;
28952860
freqs.new = target_freq;
28962861

@@ -2912,8 +2877,6 @@ static unsigned int intel_cpufreq_fast_switch(struct cpufreq_policy *policy,
29122877
struct cpudata *cpu = all_cpu_data[policy->cpu];
29132878
int target_pstate;
29142879

2915-
update_turbo_state();
2916-
29172880
target_pstate = intel_pstate_freq_to_hwp(cpu, target_freq);
29182881

29192882
target_pstate = intel_cpufreq_update_pstate(policy, target_pstate, true);
@@ -2931,7 +2894,6 @@ static void intel_cpufreq_adjust_perf(unsigned int cpunum,
29312894
int old_pstate = cpu->pstate.current_pstate;
29322895
int cap_pstate, min_pstate, max_pstate, target_pstate;
29332896

2934-
update_turbo_state();
29352897
cap_pstate = global.turbo_disabled ? HWP_GUARANTEED_PERF(hwp_cap) :
29362898
HWP_HIGHEST_PERF(hwp_cap);
29372899

@@ -3121,6 +3083,10 @@ static int intel_pstate_register_driver(struct cpufreq_driver *driver)
31213083

31223084
memset(&global, 0, sizeof(global));
31233085
global.max_perf_pct = 100;
3086+
global.turbo_disabled = turbo_is_disabled();
3087+
global.no_turbo = global.turbo_disabled;
3088+
3089+
arch_set_max_freq_ratio(global.turbo_disabled);
31243090

31253091
intel_pstate_driver = driver;
31263092
ret = cpufreq_register_driver(intel_pstate_driver);

drivers/dma/mediatek/mtk-cqdma.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,11 @@ static struct virt_dma_desc *mtk_cqdma_find_active_desc(struct dma_chan *c,
421421
{
422422
struct mtk_cqdma_vchan *cvc = to_cqdma_vchan(c);
423423
struct virt_dma_desc *vd;
424-
unsigned long flags;
425424

426-
spin_lock_irqsave(&cvc->pc->lock, flags);
427425
list_for_each_entry(vd, &cvc->pc->queue, node)
428426
if (vd->tx.cookie == cookie) {
429-
spin_unlock_irqrestore(&cvc->pc->lock, flags);
430427
return vd;
431428
}
432-
spin_unlock_irqrestore(&cvc->pc->lock, flags);
433429

434430
list_for_each_entry(vd, &cvc->vc.desc_issued, node)
435431
if (vd->tx.cookie == cookie)
@@ -453,9 +449,11 @@ static enum dma_status mtk_cqdma_tx_status(struct dma_chan *c,
453449
if (ret == DMA_COMPLETE || !txstate)
454450
return ret;
455451

456-
spin_lock_irqsave(&cvc->vc.lock, flags);
452+
spin_lock_irqsave(&cvc->pc->lock, flags);
453+
spin_lock(&cvc->vc.lock);
457454
vd = mtk_cqdma_find_active_desc(c, cookie);
458-
spin_unlock_irqrestore(&cvc->vc.lock, flags);
455+
spin_unlock(&cvc->vc.lock);
456+
spin_unlock_irqrestore(&cvc->pc->lock, flags);
459457

460458
if (vd) {
461459
cvd = to_cqdma_vdesc(vd);

0 commit comments

Comments
 (0)