Skip to content

Commit 431319d

Browse files
committed
Merge remote-tracking branch 'stable/linux-6.1.y' into rpi-6.1.y
2 parents 1c16140 + d2a6dc4 commit 431319d

File tree

167 files changed

+2989
-1559
lines changed

Some content is hidden

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

167 files changed

+2989
-1559
lines changed

Documentation/accounting/psi.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ prevent overly frequent polling. Max limit is chosen as a high enough number
105105
after which monitors are most likely not needed and psi averages can be used
106106
instead.
107107

108+
Unprivileged users can also create monitors, with the only limitation that the
109+
window size must be a multiple of 2s, in order to prevent excessive resource
110+
usage.
111+
108112
When activated, psi monitor stays active for at least the duration of one
109113
tracking window to avoid repeated activations/deactivations when system is
110114
bouncing in and out of the stall state.

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 = 41
4+
SUBLEVEL = 42
55
EXTRAVERSION =
66
NAME = Curry Ramen
77

arch/arm64/kernel/fpsimd.c

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,8 @@ void sve_sync_from_fpsimd_zeropad(struct task_struct *task)
803803
int vec_set_vector_length(struct task_struct *task, enum vec_type type,
804804
unsigned long vl, unsigned long flags)
805805
{
806+
bool free_sme = false;
807+
806808
if (flags & ~(unsigned long)(PR_SVE_VL_INHERIT |
807809
PR_SVE_SET_VL_ONEXEC))
808810
return -EINVAL;
@@ -851,21 +853,36 @@ int vec_set_vector_length(struct task_struct *task, enum vec_type type,
851853
thread_sm_enabled(&task->thread))
852854
sve_to_fpsimd(task);
853855

854-
if (system_supports_sme() && type == ARM64_VEC_SME) {
855-
task->thread.svcr &= ~(SVCR_SM_MASK |
856-
SVCR_ZA_MASK);
857-
clear_thread_flag(TIF_SME);
856+
if (system_supports_sme()) {
857+
if (type == ARM64_VEC_SME ||
858+
!(task->thread.svcr & (SVCR_SM_MASK | SVCR_ZA_MASK))) {
859+
/*
860+
* We are changing the SME VL or weren't using
861+
* SME anyway, discard the state and force a
862+
* reallocation.
863+
*/
864+
task->thread.svcr &= ~(SVCR_SM_MASK |
865+
SVCR_ZA_MASK);
866+
clear_thread_flag(TIF_SME);
867+
free_sme = true;
868+
}
858869
}
859870

860871
if (task == current)
861872
put_cpu_fpsimd_context();
862873

863874
/*
864-
* Force reallocation of task SVE and SME state to the correct
865-
* size on next use:
875+
* Free the changed states if they are not in use, SME will be
876+
* reallocated to the correct size on next use and we just
877+
* allocate SVE now in case it is needed for use in streaming
878+
* mode.
866879
*/
867-
sve_free(task);
868-
if (system_supports_sme() && type == ARM64_VEC_SME)
880+
if (system_supports_sve()) {
881+
sve_free(task);
882+
sve_alloc(task, true);
883+
}
884+
885+
if (free_sme)
869886
sme_free(task);
870887

871888
task_set_vl(task, type, vl);

arch/arm64/net/bpf_jit_comp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,13 @@ static int build_prologue(struct jit_ctx *ctx, bool ebpf_from_cbpf)
322322
*
323323
*/
324324

325-
emit_bti(A64_BTI_C, ctx);
325+
/* bpf function may be invoked by 3 instruction types:
326+
* 1. bl, attached via freplace to bpf prog via short jump
327+
* 2. br, attached via freplace to bpf prog via long jump
328+
* 3. blr, working as a function pointer, used by emit_call.
329+
* So BTI_JC should used here to support both br and blr.
330+
*/
331+
emit_bti(A64_BTI_JC, ctx);
326332

327333
emit(A64_MOV(1, A64_R(9), A64_LR), ctx);
328334
emit(A64_NOP, ctx);

arch/mips/include/asm/dec/prom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static inline bool prom_is_rex(u32 magic)
7070
*/
7171
typedef struct {
7272
int pagesize;
73-
unsigned char bitmap[0];
73+
unsigned char bitmap[];
7474
} memmap;
7575

7676

drivers/acpi/video_detect.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
510510
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
511511
},
512512
},
513+
{
514+
.callback = video_detect_force_native,
515+
/* Dell Studio 1569 */
516+
.matches = {
517+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
518+
DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1569"),
519+
},
520+
},
513521
{
514522
.callback = video_detect_force_native,
515523
/* Acer Aspire 3830TG */

drivers/base/regmap/regmap-i2c.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ static int regmap_i2c_smbus_i2c_read(void *context, const void *reg,
242242
static const struct regmap_bus regmap_i2c_smbus_i2c_block = {
243243
.write = regmap_i2c_smbus_i2c_write,
244244
.read = regmap_i2c_smbus_i2c_read,
245-
.max_raw_read = I2C_SMBUS_BLOCK_MAX,
246-
.max_raw_write = I2C_SMBUS_BLOCK_MAX,
245+
.max_raw_read = I2C_SMBUS_BLOCK_MAX - 1,
246+
.max_raw_write = I2C_SMBUS_BLOCK_MAX - 1,
247247
};
248248

249249
static int regmap_i2c_smbus_i2c_write_reg16(void *context, const void *data,
@@ -299,8 +299,8 @@ static int regmap_i2c_smbus_i2c_read_reg16(void *context, const void *reg,
299299
static const struct regmap_bus regmap_i2c_smbus_i2c_block_reg16 = {
300300
.write = regmap_i2c_smbus_i2c_write_reg16,
301301
.read = regmap_i2c_smbus_i2c_read_reg16,
302-
.max_raw_read = I2C_SMBUS_BLOCK_MAX,
303-
.max_raw_write = I2C_SMBUS_BLOCK_MAX,
302+
.max_raw_read = I2C_SMBUS_BLOCK_MAX - 2,
303+
.max_raw_write = I2C_SMBUS_BLOCK_MAX - 2,
304304
};
305305

306306
static const struct regmap_bus *regmap_get_i2c_bus(struct i2c_client *i2c,

drivers/base/regmap/regmap-spi-avmm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static const struct regmap_bus regmap_spi_avmm_bus = {
660660
.reg_format_endian_default = REGMAP_ENDIAN_NATIVE,
661661
.val_format_endian_default = REGMAP_ENDIAN_NATIVE,
662662
.max_raw_read = SPI_AVMM_VAL_SIZE * MAX_READ_CNT,
663-
.max_raw_write = SPI_AVMM_REG_SIZE + SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT,
663+
.max_raw_write = SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT,
664664
.free_context = spi_avmm_bridge_ctx_free,
665665
};
666666

drivers/base/regmap/regmap.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,17 +2064,15 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
20642064
size_t val_count = val_len / val_bytes;
20652065
size_t chunk_count, chunk_bytes;
20662066
size_t chunk_regs = val_count;
2067-
size_t max_data = map->max_raw_write - map->format.reg_bytes -
2068-
map->format.pad_bytes;
20692067
int ret, i;
20702068

20712069
if (!val_count)
20722070
return -EINVAL;
20732071

20742072
if (map->use_single_write)
20752073
chunk_regs = 1;
2076-
else if (map->max_raw_write && val_len > max_data)
2077-
chunk_regs = max_data / val_bytes;
2074+
else if (map->max_raw_write && val_len > map->max_raw_write)
2075+
chunk_regs = map->max_raw_write / val_bytes;
20782076

20792077
chunk_count = val_count / chunk_regs;
20802078
chunk_bytes = chunk_regs * val_bytes;

drivers/dma-buf/dma-resv.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ int dma_resv_get_fences(struct dma_resv *obj, enum dma_resv_usage usage,
566566
dma_resv_for_each_fence_unlocked(&cursor, fence) {
567567

568568
if (dma_resv_iter_is_restarted(&cursor)) {
569+
struct dma_fence **new_fences;
569570
unsigned int count;
570571

571572
while (*num_fences)
@@ -574,13 +575,17 @@ int dma_resv_get_fences(struct dma_resv *obj, enum dma_resv_usage usage,
574575
count = cursor.num_fences + 1;
575576

576577
/* Eventually re-allocate the array */
577-
*fences = krealloc_array(*fences, count,
578-
sizeof(void *),
579-
GFP_KERNEL);
580-
if (count && !*fences) {
578+
new_fences = krealloc_array(*fences, count,
579+
sizeof(void *),
580+
GFP_KERNEL);
581+
if (count && !new_fences) {
582+
kfree(*fences);
583+
*fences = NULL;
584+
*num_fences = 0;
581585
dma_resv_iter_end(&cursor);
582586
return -ENOMEM;
583587
}
588+
*fences = new_fences;
584589
}
585590

586591
(*fences)[(*num_fences)++] = dma_fence_get(fence);

0 commit comments

Comments
 (0)