Skip to content

Commit aa21b7e

Browse files
committed
Merge tag 'v6.12.11' into 6.12-main
This is the 6.12.11 stable release # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmeSbPIACgkQONu9yGCS # aT5bGBAAs1eOct8WLdGRoeI1OcuggctRpLaHWWlvjMWb/NPgJHKjgRrrAvd/YF/j # pPNLV+0y3kmXvVi+Rbc4pJMf6KoDDrjmc9H7yKqWha+CeiaLwKXinNdLivmCpZsv # tB/p3/rm7GQ1Sw4i7HwVQ1cVF8KK9ZEJWwgZ5g6jXh4OcfxrGAjKDz+R4QfEtr85 # y54Hfoiw3VlAOPvaH8uidVwV1gj6gdxau/hygI2OWZbrqXhdrvsKAtjk9JAd/N5+ # V+9kxAYGtmdcR3V2W97DhHVvmEe3zte6jp2GwevukvsunM6CtpTKBIWGQkXNmsXi # HS/odxrgtiQxD+7xWy3CyU0jcLH+UcIXv/xY9YzEQNhQpV635JVxpw9r8aU3Z6dG # mkl+FoyKrObKg1YJBUz/rVSH1QGTHqhdG0c1Rr4pg2bkrHlRNTStFm4lk4QTwqeU # C4KsS/h6OlArpSr1aXHdd8BXaqgb4u8gDCAnzN69nHsVvd1WsuoJjaV35ZTPuaPn # 0zl8pa+56O+QLiaDBVVHPd/NGc5g9qtwgutgy+5bBYJkb9t3E6XjvQSZ0tqRn08n # Y/565Gtkss/G5Nm34oQ98mAQkP/5HCwKTblfnR3H1txu7PUybJOkNqakE0CmC0p6 # 80Sa1w/0sXjykoLLx/OSGQ4rUqyKgUpu3wWb2xItKm73UIavEmk= # =kWI9 # -----END PGP SIGNATURE----- # gpg: Signature made Thu Jan 23 17:23:14 2025 CET # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Can't check signature: No public key
2 parents a8e329d + 62b2447 commit aa21b7e

File tree

157 files changed

+1324
-636
lines changed

Some content is hidden

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

157 files changed

+1324
-636
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 12
4-
SUBLEVEL = 10
4+
SUBLEVEL = 11
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

arch/x86/include/asm/special_insns.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static inline int write_user_shstk_64(u64 __user *addr, u64 val)
217217

218218
#define nop() asm volatile ("nop")
219219

220-
static inline void serialize(void)
220+
static __always_inline void serialize(void)
221221
{
222222
/* Instruction opcode for SERIALIZE; supported in binutils >= 2.35. */
223223
asm volatile(".byte 0xf, 0x1, 0xe8" ::: "memory");

arch/x86/kernel/fred.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ void cpu_init_fred_exceptions(void)
5050
FRED_CONFIG_ENTRYPOINT(asm_fred_entrypoint_user));
5151

5252
wrmsrl(MSR_IA32_FRED_STKLVLS, 0);
53-
wrmsrl(MSR_IA32_FRED_RSP0, 0);
53+
54+
/*
55+
* Ater a CPU offline/online cycle, the FRED RSP0 MSR should be
56+
* resynchronized with its per-CPU cache.
57+
*/
58+
wrmsrl(MSR_IA32_FRED_RSP0, __this_cpu_read(fred_rsp0));
59+
5460
wrmsrl(MSR_IA32_FRED_RSP1, 0);
5561
wrmsrl(MSR_IA32_FRED_RSP2, 0);
5662
wrmsrl(MSR_IA32_FRED_RSP3, 0);

drivers/acpi/resource.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -689,11 +689,11 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
689689
for (i = 0; i < ARRAY_SIZE(override_table); i++) {
690690
const struct irq_override_cmp *entry = &override_table[i];
691691

692-
if (dmi_check_system(entry->system) &&
693-
entry->irq == gsi &&
692+
if (entry->irq == gsi &&
694693
entry->triggering == triggering &&
695694
entry->polarity == polarity &&
696-
entry->shareable == shareable)
695+
entry->shareable == shareable &&
696+
dmi_check_system(entry->system))
697697
return entry->override;
698698
}
699699

drivers/block/zram/zram_drv.c

+1
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize)
13491349
zram->mem_pool = zs_create_pool(zram->disk->disk_name);
13501350
if (!zram->mem_pool) {
13511351
vfree(zram->table);
1352+
zram->table = NULL;
13521353
return false;
13531354
}
13541355

drivers/cpufreq/Kconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ config QORIQ_CPUFREQ
311311
This adds the CPUFreq driver support for Freescale QorIQ SoCs
312312
which are capable of changing the CPU's frequency dynamically.
313313

314-
endif
315-
316314
config ACPI_CPPC_CPUFREQ
317315
tristate "CPUFreq driver based on the ACPI CPPC spec"
318316
depends on ACPI_PROCESSOR
@@ -341,4 +339,6 @@ config ACPI_CPPC_CPUFREQ_FIE
341339

342340
If in doubt, say N.
343341

342+
endif
343+
344344
endmenu

drivers/cpuidle/governors/teo.c

+48-43
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,27 @@
1010
* DOC: teo-description
1111
*
1212
* The idea of this governor is based on the observation that on many systems
13-
* timer events are two or more orders of magnitude more frequent than any
14-
* other interrupts, so they are likely to be the most significant cause of CPU
15-
* wakeups from idle states. Moreover, information about what happened in the
16-
* (relatively recent) past can be used to estimate whether or not the deepest
17-
* idle state with target residency within the (known) time till the closest
18-
* timer event, referred to as the sleep length, is likely to be suitable for
19-
* the upcoming CPU idle period and, if not, then which of the shallower idle
20-
* states to choose instead of it.
13+
* timer interrupts are two or more orders of magnitude more frequent than any
14+
* other interrupt types, so they are likely to dominate CPU wakeup patterns.
15+
* Moreover, in principle, the time when the next timer event is going to occur
16+
* can be determined at the idle state selection time, although doing that may
17+
* be costly, so it can be regarded as the most reliable source of information
18+
* for idle state selection.
2119
*
22-
* Of course, non-timer wakeup sources are more important in some use cases
23-
* which can be covered by taking a few most recent idle time intervals of the
24-
* CPU into account. However, even in that context it is not necessary to
25-
* consider idle duration values greater than the sleep length, because the
26-
* closest timer will ultimately wake up the CPU anyway unless it is woken up
27-
* earlier.
20+
* Of course, non-timer wakeup sources are more important in some use cases,
21+
* but even then it is generally unnecessary to consider idle duration values
22+
* greater than the time time till the next timer event, referred as the sleep
23+
* length in what follows, because the closest timer will ultimately wake up the
24+
* CPU anyway unless it is woken up earlier.
2825
*
29-
* Thus this governor estimates whether or not the prospective idle duration of
30-
* a CPU is likely to be significantly shorter than the sleep length and selects
31-
* an idle state for it accordingly.
26+
* However, since obtaining the sleep length may be costly, the governor first
27+
* checks if it can select a shallow idle state using wakeup pattern information
28+
* from recent times, in which case it can do without knowing the sleep length
29+
* at all. For this purpose, it counts CPU wakeup events and looks for an idle
30+
* state whose target residency has not exceeded the idle duration (measured
31+
* after wakeup) in the majority of relevant recent cases. If the target
32+
* residency of that state is small enough, it may be used right away and the
33+
* sleep length need not be determined.
3234
*
3335
* The computations carried out by this governor are based on using bins whose
3436
* boundaries are aligned with the target residency parameter values of the CPU
@@ -39,7 +41,11 @@
3941
* idle state 2, the third bin spans from the target residency of idle state 2
4042
* up to, but not including, the target residency of idle state 3 and so on.
4143
* The last bin spans from the target residency of the deepest idle state
42-
* supplied by the driver to infinity.
44+
* supplied by the driver to the scheduler tick period length or to infinity if
45+
* the tick period length is less than the target residency of that state. In
46+
* the latter case, the governor also counts events with the measured idle
47+
* duration between the tick period length and the target residency of the
48+
* deepest idle state.
4349
*
4450
* Two metrics called "hits" and "intercepts" are associated with each bin.
4551
* They are updated every time before selecting an idle state for the given CPU
@@ -49,47 +55,46 @@
4955
* sleep length and the idle duration measured after CPU wakeup fall into the
5056
* same bin (that is, the CPU appears to wake up "on time" relative to the sleep
5157
* length). In turn, the "intercepts" metric reflects the relative frequency of
52-
* situations in which the measured idle duration is so much shorter than the
53-
* sleep length that the bin it falls into corresponds to an idle state
54-
* shallower than the one whose bin is fallen into by the sleep length (these
55-
* situations are referred to as "intercepts" below).
58+
* non-timer wakeup events for which the measured idle duration falls into a bin
59+
* that corresponds to an idle state shallower than the one whose bin is fallen
60+
* into by the sleep length (these events are also referred to as "intercepts"
61+
* below).
5662
*
5763
* In order to select an idle state for a CPU, the governor takes the following
5864
* steps (modulo the possible latency constraint that must be taken into account
5965
* too):
6066
*
61-
* 1. Find the deepest CPU idle state whose target residency does not exceed
62-
* the current sleep length (the candidate idle state) and compute 2 sums as
63-
* follows:
67+
* 1. Find the deepest enabled CPU idle state (the candidate idle state) and
68+
* compute 2 sums as follows:
6469
*
65-
* - The sum of the "hits" and "intercepts" metrics for the candidate state
66-
* and all of the deeper idle states (it represents the cases in which the
67-
* CPU was idle long enough to avoid being intercepted if the sleep length
68-
* had been equal to the current one).
70+
* - The sum of the "hits" metric for all of the idle states shallower than
71+
* the candidate one (it represents the cases in which the CPU was likely
72+
* woken up by a timer).
6973
*
70-
* - The sum of the "intercepts" metrics for all of the idle states shallower
71-
* than the candidate one (it represents the cases in which the CPU was not
72-
* idle long enough to avoid being intercepted if the sleep length had been
73-
* equal to the current one).
74+
* - The sum of the "intercepts" metric for all of the idle states shallower
75+
* than the candidate one (it represents the cases in which the CPU was
76+
* likely woken up by a non-timer wakeup source).
7477
*
75-
* 2. If the second sum is greater than the first one the CPU is likely to wake
76-
* up early, so look for an alternative idle state to select.
78+
* 2. If the second sum computed in step 1 is greater than a half of the sum of
79+
* both metrics for the candidate state bin and all subsequent bins(if any),
80+
* a shallower idle state is likely to be more suitable, so look for it.
7781
*
78-
* - Traverse the idle states shallower than the candidate one in the
82+
* - Traverse the enabled idle states shallower than the candidate one in the
7983
* descending order.
8084
*
8185
* - For each of them compute the sum of the "intercepts" metrics over all
8286
* of the idle states between it and the candidate one (including the
8387
* former and excluding the latter).
8488
*
85-
* - If each of these sums that needs to be taken into account (because the
86-
* check related to it has indicated that the CPU is likely to wake up
87-
* early) is greater than a half of the corresponding sum computed in step
88-
* 1 (which means that the target residency of the state in question had
89-
* not exceeded the idle duration in over a half of the relevant cases),
90-
* select the given idle state instead of the candidate one.
89+
* - If this sum is greater than a half of the second sum computed in step 1,
90+
* use the given idle state as the new candidate one.
9191
*
92-
* 3. By default, select the candidate state.
92+
* 3. If the current candidate state is state 0 or its target residency is short
93+
* enough, return it and prevent the scheduler tick from being stopped.
94+
*
95+
* 4. Obtain the sleep length value and check if it is below the target
96+
* residency of the current candidate state, in which case a new shallower
97+
* candidate state needs to be found, so look for it.
9398
*/
9499

95100
#include <linux/cpuidle.h>

drivers/firmware/efi/Kconfig

-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ config EFI_ZBOOT
7676
bool "Enable the generic EFI decompressor"
7777
depends on EFI_GENERIC_STUB && !ARM
7878
select HAVE_KERNEL_GZIP
79-
select HAVE_KERNEL_LZ4
80-
select HAVE_KERNEL_LZMA
81-
select HAVE_KERNEL_LZO
82-
select HAVE_KERNEL_XZ
8379
select HAVE_KERNEL_ZSTD
8480
help
8581
Create the bootable image as an EFI application that carries the

drivers/firmware/efi/libstub/Makefile.zboot

+6-12
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,16 @@ quiet_cmd_copy_and_pad = PAD $@
1212
$(obj)/vmlinux.bin: $(obj)/$(EFI_ZBOOT_PAYLOAD) FORCE
1313
$(call if_changed,copy_and_pad)
1414

15-
comp-type-$(CONFIG_KERNEL_GZIP) := gzip
16-
comp-type-$(CONFIG_KERNEL_LZ4) := lz4
17-
comp-type-$(CONFIG_KERNEL_LZMA) := lzma
18-
comp-type-$(CONFIG_KERNEL_LZO) := lzo
19-
comp-type-$(CONFIG_KERNEL_XZ) := xzkern
20-
comp-type-$(CONFIG_KERNEL_ZSTD) := zstd22
21-
2215
# in GZIP, the appended le32 carrying the uncompressed size is part of the
2316
# format, but in other cases, we just append it at the end for convenience,
2417
# causing the original tools to complain when checking image integrity.
25-
# So disregard it when calculating the payload size in the zimage header.
26-
zboot-method-y := $(comp-type-y)_with_size
27-
zboot-size-len-y := 4
18+
comp-type-y := gzip
19+
zboot-method-y := gzip
20+
zboot-size-len-y := 0
2821

29-
zboot-method-$(CONFIG_KERNEL_GZIP) := gzip
30-
zboot-size-len-$(CONFIG_KERNEL_GZIP) := 0
22+
comp-type-$(CONFIG_KERNEL_ZSTD) := zstd
23+
zboot-method-$(CONFIG_KERNEL_ZSTD) := zstd22_with_size
24+
zboot-size-len-$(CONFIG_KERNEL_ZSTD) := 4
3125

3226
$(obj)/vmlinuz: $(obj)/vmlinux.bin FORCE
3327
$(call if_changed,$(zboot-method-y))

drivers/gpio/gpio-sim.c

+41-7
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,30 @@ static void gpio_sim_device_deactivate(struct gpio_sim_device *dev)
10301030
dev->pdev = NULL;
10311031
}
10321032

1033+
static void
1034+
gpio_sim_device_lockup_configfs(struct gpio_sim_device *dev, bool lock)
1035+
{
1036+
struct configfs_subsystem *subsys = dev->group.cg_subsys;
1037+
struct gpio_sim_bank *bank;
1038+
struct gpio_sim_line *line;
1039+
1040+
/*
1041+
* The device only needs to depend on leaf line entries. This is
1042+
* sufficient to lock up all the configfs entries that the
1043+
* instantiated, alive device depends on.
1044+
*/
1045+
list_for_each_entry(bank, &dev->bank_list, siblings) {
1046+
list_for_each_entry(line, &bank->line_list, siblings) {
1047+
if (lock)
1048+
WARN_ON(configfs_depend_item_unlocked(
1049+
subsys, &line->group.cg_item));
1050+
else
1051+
configfs_undepend_item_unlocked(
1052+
&line->group.cg_item);
1053+
}
1054+
}
1055+
}
1056+
10331057
static ssize_t
10341058
gpio_sim_device_config_live_store(struct config_item *item,
10351059
const char *page, size_t count)
@@ -1042,14 +1066,24 @@ gpio_sim_device_config_live_store(struct config_item *item,
10421066
if (ret)
10431067
return ret;
10441068

1045-
guard(mutex)(&dev->lock);
1069+
if (live)
1070+
gpio_sim_device_lockup_configfs(dev, true);
10461071

1047-
if (live == gpio_sim_device_is_live(dev))
1048-
ret = -EPERM;
1049-
else if (live)
1050-
ret = gpio_sim_device_activate(dev);
1051-
else
1052-
gpio_sim_device_deactivate(dev);
1072+
scoped_guard(mutex, &dev->lock) {
1073+
if (live == gpio_sim_device_is_live(dev))
1074+
ret = -EPERM;
1075+
else if (live)
1076+
ret = gpio_sim_device_activate(dev);
1077+
else
1078+
gpio_sim_device_deactivate(dev);
1079+
}
1080+
1081+
/*
1082+
* Undepend is required only if device disablement (live == 0)
1083+
* succeeds or if device enablement (live == 1) fails.
1084+
*/
1085+
if (live == !!ret)
1086+
gpio_sim_device_lockup_configfs(dev, false);
10531087

10541088
return ret ?: count;
10551089
}

drivers/gpio/gpio-virtuser.c

+40-7
Original file line numberDiff line numberDiff line change
@@ -1546,6 +1546,30 @@ gpio_virtuser_device_deactivate(struct gpio_virtuser_device *dev)
15461546
dev->pdev = NULL;
15471547
}
15481548

1549+
static void
1550+
gpio_virtuser_device_lockup_configfs(struct gpio_virtuser_device *dev, bool lock)
1551+
{
1552+
struct configfs_subsystem *subsys = dev->group.cg_subsys;
1553+
struct gpio_virtuser_lookup_entry *entry;
1554+
struct gpio_virtuser_lookup *lookup;
1555+
1556+
/*
1557+
* The device only needs to depend on leaf lookup entries. This is
1558+
* sufficient to lock up all the configfs entries that the
1559+
* instantiated, alive device depends on.
1560+
*/
1561+
list_for_each_entry(lookup, &dev->lookup_list, siblings) {
1562+
list_for_each_entry(entry, &lookup->entry_list, siblings) {
1563+
if (lock)
1564+
WARN_ON(configfs_depend_item_unlocked(
1565+
subsys, &entry->group.cg_item));
1566+
else
1567+
configfs_undepend_item_unlocked(
1568+
&entry->group.cg_item);
1569+
}
1570+
}
1571+
}
1572+
15491573
static ssize_t
15501574
gpio_virtuser_device_config_live_store(struct config_item *item,
15511575
const char *page, size_t count)
@@ -1558,15 +1582,24 @@ gpio_virtuser_device_config_live_store(struct config_item *item,
15581582
if (ret)
15591583
return ret;
15601584

1561-
guard(mutex)(&dev->lock);
1585+
if (live)
1586+
gpio_virtuser_device_lockup_configfs(dev, true);
15621587

1563-
if (live == gpio_virtuser_device_is_live(dev))
1564-
return -EPERM;
1588+
scoped_guard(mutex, &dev->lock) {
1589+
if (live == gpio_virtuser_device_is_live(dev))
1590+
ret = -EPERM;
1591+
else if (live)
1592+
ret = gpio_virtuser_device_activate(dev);
1593+
else
1594+
gpio_virtuser_device_deactivate(dev);
1595+
}
15651596

1566-
if (live)
1567-
ret = gpio_virtuser_device_activate(dev);
1568-
else
1569-
gpio_virtuser_device_deactivate(dev);
1597+
/*
1598+
* Undepend is required only if device disablement (live == 0)
1599+
* succeeds or if device enablement (live == 1) fails.
1600+
*/
1601+
if (live == !!ret)
1602+
gpio_virtuser_device_lockup_configfs(dev, false);
15701603

15711604
return ret ?: count;
15721605
}

0 commit comments

Comments
 (0)