--- /dev/null
+From d278a9de5e1837edbe57b2f1f95a104ff6c84846 Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Wed, 2 Oct 2024 21:46:49 +0200
+Subject: ALSA: core: add isascii() check to card ID generator
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jaroslav Kysela <perex@perex.cz>
+
+commit d278a9de5e1837edbe57b2f1f95a104ff6c84846 upstream.
+
+The card identifier should contain only safe ASCII characters. The isalnum()
+returns true also for characters for non-ASCII characters.
+
+Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4135
+Link: https://lore.kernel.org/linux-sound/yk3WTvKkwheOon_LzZlJ43PPInz6byYfBzpKkbasww1yzuiMRqn7n6Y8vZcXB-xwFCu_vb8hoNjv7DTNwH5TWjpEuiVsyn9HPCEXqwF4120=@protonmail.com/
+Cc: stable@vger.kernel.org
+Reported-by: Barnabás Pőcze <pobrn@protonmail.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+Link: https://patch.msgid.link/20241002194649.1944696-1-perex@perex.cz
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/core/init.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/sound/core/init.c
++++ b/sound/core/init.c
+@@ -548,13 +548,19 @@ int snd_card_free(struct snd_card *card)
+ }
+ EXPORT_SYMBOL(snd_card_free);
+
++/* check, if the character is in the valid ASCII range */
++static inline bool safe_ascii_char(char c)
++{
++ return isascii(c) && isalnum(c);
++}
++
+ /* retrieve the last word of shortname or longname */
+ static const char *retrieve_id_from_card_name(const char *name)
+ {
+ const char *spos = name;
+
+ while (*name) {
+- if (isspace(*name) && isalnum(name[1]))
++ if (isspace(*name) && safe_ascii_char(name[1]))
+ spos = name + 1;
+ name++;
+ }
+@@ -581,12 +587,12 @@ static void copy_valid_id_string(struct
+ {
+ char *id = card->id;
+
+- while (*nid && !isalnum(*nid))
++ while (*nid && !safe_ascii_char(*nid))
+ nid++;
+ if (isdigit(*nid))
+ *id++ = isalpha(*src) ? *src : 'D';
+ while (*nid && (size_t)(id - card->id) < sizeof(card->id) - 1) {
+- if (isalnum(*nid))
++ if (safe_ascii_char(*nid))
+ *id++ = *nid;
+ nid++;
+ }
+@@ -684,7 +690,7 @@ card_id_store_attr(struct device *dev, s
+
+ for (idx = 0; idx < copy; idx++) {
+ c = buf[idx];
+- if (!isalnum(c) && c != '_' && c != '-')
++ if (!safe_ascii_char(c) && c != '_' && c != '-')
+ return -EINVAL;
+ }
+ memcpy(buf1, buf, copy);
--- /dev/null
+From 703235a244e533652346844cfa42623afb36eed1 Mon Sep 17 00:00:00 2001
+From: "Hans P. Moller" <hmoller@uc.cl>
+Date: Thu, 3 Oct 2024 20:28:28 -0300
+Subject: ALSA: line6: add hw monitor volume control to POD HD500X
+
+From: Hans P. Moller <hmoller@uc.cl>
+
+commit 703235a244e533652346844cfa42623afb36eed1 upstream.
+
+Add hw monitor volume control for POD HD500X. This is done adding
+LINE6_CAP_HWMON_CTL to the capabilities
+
+Signed-off-by: Hans P. Moller <hmoller@uc.cl>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Link: https://patch.msgid.link/20241003232828.5819-1-hmoller@uc.cl
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/line6/podhd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/usb/line6/podhd.c
++++ b/sound/usb/line6/podhd.c
+@@ -461,7 +461,7 @@ static const struct line6_properties pod
+ [LINE6_PODHD500X] = {
+ .id = "PODHD500X",
+ .name = "POD HD500X",
+- .capabilities = LINE6_CAP_CONTROL
++ .capabilities = LINE6_CAP_CONTROL | LINE6_CAP_HWMON_CTL
+ | LINE6_CAP_PCM | LINE6_CAP_HWMON,
+ .altsetting = 1,
+ .ep_ctrl_r = 0x81,
--- /dev/null
+From 9542130937e9dc707dd7c6b7af73326437da2d50 Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Tue, 10 Sep 2024 18:32:24 +0200
+Subject: parisc: Fix itlb miss handler for 64-bit programs
+
+From: Helge Deller <deller@gmx.de>
+
+commit 9542130937e9dc707dd7c6b7af73326437da2d50 upstream.
+
+For an itlb miss when executing code above 4 Gb on ILP64 adjust the
+iasq/iaoq in the same way isr/ior was adjusted. This fixes signal
+delivery for the 64-bit static test program from
+http://ftp.parisc-linux.org/src/64bit.tar.gz. Note that signals are
+handled by the signal trampoline code in the 64-bit VDSO which is mapped
+into high userspace memory region above 4GB for 64-bit processes.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Cc: stable@vger.kernel.org # v4.19+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/parisc/kernel/entry.S | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/arch/parisc/kernel/entry.S
++++ b/arch/parisc/kernel/entry.S
+@@ -1089,8 +1089,7 @@ ENTRY_CFI(intr_save) /* for os_hpmc */
+ STREG %r16, PT_ISR(%r29)
+ STREG %r17, PT_IOR(%r29)
+
+-#if 0 && defined(CONFIG_64BIT)
+- /* Revisit when we have 64-bit code above 4Gb */
++#if defined(CONFIG_64BIT)
+ b,n intr_save2
+
+ skip_save_ior:
+@@ -1098,8 +1097,7 @@ skip_save_ior:
+ * need to adjust iasq/iaoq here in the same way we adjusted isr/ior
+ * above.
+ */
+- extrd,u,* %r8,PSW_W_BIT,1,%r1
+- cmpib,COND(=),n 1,%r1,intr_save2
++ bb,COND(>=),n %r8,PSW_W_BIT,intr_save2
+ LDREG PT_IASQ0(%r29), %r16
+ LDREG PT_IAOQ0(%r29), %r17
+ /* adjust iasq/iaoq */
--- /dev/null
+From 62c0b1061593d7012292f781f11145b2d46f43ab Mon Sep 17 00:00:00 2001
+From: Luo Gengkun <luogengkun@huaweicloud.com>
+Date: Sat, 31 Aug 2024 07:43:15 +0000
+Subject: perf/core: Fix small negative period being ignored
+
+From: Luo Gengkun <luogengkun@huaweicloud.com>
+
+commit 62c0b1061593d7012292f781f11145b2d46f43ab upstream.
+
+In perf_adjust_period, we will first calculate period, and then use
+this period to calculate delta. However, when delta is less than 0,
+there will be a deviation compared to when delta is greater than or
+equal to 0. For example, when delta is in the range of [-14,-1], the
+range of delta = delta + 7 is between [-7,6], so the final value of
+delta/8 is 0. Therefore, the impact of -1 and -2 will be ignored.
+This is unacceptable when the target period is very short, because
+we will lose a lot of samples.
+
+Here are some tests and analyzes:
+before:
+ # perf record -e cs -F 1000 ./a.out
+ [ perf record: Woken up 1 times to write data ]
+ [ perf record: Captured and wrote 0.022 MB perf.data (518 samples) ]
+
+ # perf script
+ ...
+ a.out 396 257.956048: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.957891: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.959730: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.961545: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.963355: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.965163: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.966973: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.968785: 23 cs: ffffffff81f4eeec schedul>
+ a.out 396 257.970593: 23 cs: ffffffff81f4eeec schedul>
+ ...
+
+after:
+ # perf record -e cs -F 1000 ./a.out
+ [ perf record: Woken up 1 times to write data ]
+ [ perf record: Captured and wrote 0.058 MB perf.data (1466 samples) ]
+
+ # perf script
+ ...
+ a.out 395 59.338813: 11 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.339707: 12 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.340682: 13 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.341751: 13 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.342799: 12 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.343765: 11 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.344651: 11 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.345539: 12 cs: ffffffff81f4eeec schedul>
+ a.out 395 59.346502: 13 cs: ffffffff81f4eeec schedul>
+ ...
+
+test.c
+
+int main() {
+ for (int i = 0; i < 20000; i++)
+ usleep(10);
+
+ return 0;
+}
+
+ # time ./a.out
+ real 0m1.583s
+ user 0m0.040s
+ sys 0m0.298s
+
+The above results were tested on x86-64 qemu with KVM enabled using
+test.c as test program. Ideally, we should have around 1500 samples,
+but the previous algorithm had only about 500, whereas the modified
+algorithm now has about 1400. Further more, the new version shows 1
+sample per 0.001s, while the previous one is 1 sample per 0.002s.This
+indicates that the new algorithm is more sensitive to small negative
+values compared to old algorithm.
+
+Fixes: bd2b5b12849a ("perf_counter: More aggressive frequency adjustment")
+Signed-off-by: Luo Gengkun <luogengkun@huaweicloud.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
+Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
+Cc: stable@vger.kernel.org
+Link: https://lkml.kernel.org/r/20240831074316.2106159-2-luogengkun@huaweicloud.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/events/core.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -3618,7 +3618,11 @@ static void perf_adjust_period(struct pe
+ period = perf_calculate_period(event, nsec, count);
+
+ delta = (s64)(period - hwc->sample_period);
+- delta = (delta + 7) / 8; /* low pass filter */
++ if (delta >= 0)
++ delta += 7;
++ else
++ delta -= 7;
++ delta /= 8; /* low pass filter */
+
+ sample_period = hwc->sample_period + delta;
+
selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
i2c-xiic-wait-for-tx-empty-to-avoid-missed-tx-naks.patch
spi-bcm63xx-fix-module-autoloading.patch
+perf-core-fix-small-negative-period-being-ignored.patch
+parisc-fix-itlb-miss-handler-for-64-bit-programs.patch
+alsa-core-add-isascii-check-to-card-id-generator.patch
+alsa-line6-add-hw-monitor-volume-control-to-pod-hd500x.patch