Update patches/0001-cachyos-base-all.patch

This commit is contained in:
ferreo 2024-12-10 14:28:43 +01:00
parent 332ce74361
commit 68ebab95ca

View File

@ -1,6 +1,6 @@
From ca0d3edbeafb06cd3a46f864d0db9a400f0156ab Mon Sep 17 00:00:00 2001
From aa3b5e41cee0a75912ae811ab1fb452599d4ac7c Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:33:43 +0100
Date: Mon, 9 Dec 2024 15:04:11 +0100
Subject: [PATCH 01/12] amd-cache-optimizer
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -272,9 +272,9 @@ index 000000000000..0f6d3c54d879
--
2.47.1
From 3b4b0f1c81789f3e15c7b55939eaceba375d74c6 Mon Sep 17 00:00:00 2001
From 686f1a6bbcebfa31a83580a9df9a5b6b6b8577ed Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:33:59 +0100
Date: Mon, 9 Dec 2024 15:04:33 +0100
Subject: [PATCH 02/12] amd-pstate
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -1089,9 +1089,9 @@ index dd4682857c12..23698d0f4bb4 100644
--
2.47.1
From 22d86a45e904cc75dda7aa5352c61cb40af5e258 Mon Sep 17 00:00:00 2001
From 24f92bfcd2f013233f8e8934da9d7cfe12119d8d Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:34:11 +0100
Date: Mon, 9 Dec 2024 15:04:43 +0100
Subject: [PATCH 03/12] autofdo
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -1505,7 +1505,7 @@ index a578178468f1..a2d251917629 100644
M: Petr Mladek <pmladek@suse.com>
R: Steven Rostedt <rostedt@goodmis.org>
diff --git a/Makefile b/Makefile
index da6e99309a4d..ca57863d294f 100644
index 87dc2f810860..d078509ae8ed 100644
--- a/Makefile
+++ b/Makefile
@@ -1018,6 +1018,8 @@ include-$(CONFIG_KMSAN) += scripts/Makefile.kmsan
@ -1835,9 +1835,9 @@ index 3d27983dc908..6f64d611faea 100644
--
2.47.1
From 16c298c1b5423342fed9480db28cbbbc97b51d0e Mon Sep 17 00:00:00 2001
From b72626750a4730d61c14c9ddc63771fb33401a84 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:34:23 +0100
Date: Mon, 9 Dec 2024 15:04:56 +0100
Subject: [PATCH 04/12] bbr3
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -5221,9 +5221,9 @@ index 79064580c8c0..697270ce1ea6 100644
--
2.47.1
From 4dd9316343809174a5fde1af50590a7c714efe76 Mon Sep 17 00:00:00 2001
From 20395e8ad251d4e7f456bd74ef7a83627970b709 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:34:35 +0100
Date: Mon, 9 Dec 2024 15:05:06 +0100
Subject: [PATCH 05/12] cachy
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -5291,9 +5291,9 @@ Signed-off-by: Peter Jung <admin@ptr1337.dev>
mm/page_alloc.c | 4 +
mm/swap.c | 5 +
mm/vmpressure.c | 4 +
mm/vmscan.c | 147 +
mm/vmscan.c | 143 +
net/ipv4/inet_connection_sock.c | 2 +-
65 files changed, 6919 insertions(+), 66 deletions(-)
65 files changed, 6915 insertions(+), 66 deletions(-)
create mode 100644 drivers/media/v4l2-core/v4l2loopback.c
create mode 100644 drivers/media/v4l2-core/v4l2loopback.h
create mode 100644 drivers/media/v4l2-core/v4l2loopback_formats.h
@ -5453,7 +5453,7 @@ index 6d942b5c58f0..1768a106aab1 100644
======
diff --git a/Makefile b/Makefile
index ca57863d294f..7cc9e5a04f71 100644
index d078509ae8ed..6911671b03f4 100644
--- a/Makefile
+++ b/Makefile
@@ -801,11 +801,19 @@ KBUILD_CFLAGS += -fno-delete-null-pointer-checks
@ -6622,10 +6622,10 @@ index f5bf41f21c41..363af8990aa2 100644
struct amdgpu_pm {
struct mutex mutex;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 80e60ea2d11e..44f0b159d232 100644
index 32bdeac2676b..eb6a3cc9ca44 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2775,7 +2775,10 @@ int smu_get_power_limit(void *handle,
@@ -2779,7 +2779,10 @@ int smu_get_power_limit(void *handle,
*limit = smu->max_power_limit;
break;
case SMU_PPT_LIMIT_MIN:
@ -6637,7 +6637,7 @@ index 80e60ea2d11e..44f0b159d232 100644
break;
default:
return -EINVAL;
@@ -2799,7 +2802,14 @@ static int smu_set_power_limit(void *handle, uint32_t limit)
@@ -2803,7 +2806,14 @@ static int smu_set_power_limit(void *handle, uint32_t limit)
if (smu->ppt_funcs->set_power_limit)
return smu->ppt_funcs->set_power_limit(smu, limit_type, limit);
@ -6653,7 +6653,7 @@ index 80e60ea2d11e..44f0b159d232 100644
dev_err(smu->adev->dev,
"New power limit (%d) is out of range [%d,%d]\n",
limit, smu->min_power_limit, smu->max_power_limit);
@@ -2878,6 +2888,10 @@ static enum smu_clk_type smu_convert_to_smuclk(enum pp_clock_type type)
@@ -2882,6 +2892,10 @@ static enum smu_clk_type smu_convert_to_smuclk(enum pp_clock_type type)
clk_type = SMU_OD_FAN_TARGET_TEMPERATURE; break;
case OD_FAN_MINIMUM_PWM:
clk_type = SMU_OD_FAN_MINIMUM_PWM; break;
@ -6839,7 +6839,7 @@ index d53e162dcd8d..24675a1d98db 100644
smu_v13_0_0_set_supported_od_feature_mask(smu);
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
index b891a5e0a396..50d16301f3eb 100644
index ceaf4572db25..60d18aca6ce5 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
@@ -83,6 +83,8 @@
@ -6975,7 +6975,7 @@ index b891a5e0a396..50d16301f3eb 100644
case PP_OD_RESTORE_DEFAULT_TABLE:
if (size == 1) {
ret = smu_v13_0_7_od_restore_table_single(smu, input[0]);
@@ -2106,7 +2204,11 @@ static void smu_v13_0_7_set_supported_od_feature_mask(struct smu_context *smu)
@@ -2108,7 +2206,11 @@ static void smu_v13_0_7_set_supported_od_feature_mask(struct smu_context *smu)
OD_OPS_SUPPORT_FAN_TARGET_TEMPERATURE_RETRIEVE |
OD_OPS_SUPPORT_FAN_TARGET_TEMPERATURE_SET |
OD_OPS_SUPPORT_FAN_MINIMUM_PWM_RETRIEVE |
@ -6988,7 +6988,7 @@ index b891a5e0a396..50d16301f3eb 100644
}
static int smu_v13_0_7_set_default_od_settings(struct smu_context *smu)
@@ -2172,6 +2274,10 @@ static int smu_v13_0_7_set_default_od_settings(struct smu_context *smu)
@@ -2174,6 +2276,10 @@ static int smu_v13_0_7_set_default_od_settings(struct smu_context *smu)
user_od_table_bak.OverDriveTable.FanTargetTemperature;
user_od_table->OverDriveTable.FanMinimumPwm =
user_od_table_bak.OverDriveTable.FanMinimumPwm;
@ -13163,14 +13163,14 @@ index 5734d5d5060f..af595df5b65f 100644
(1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG);
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 4ba5607aaf19..0a83f8973ddf 100644
index 4ba5607aaf19..c081fbac7e6b 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -2628,6 +2628,7 @@ static void __init mem_init_print_info(void)
, K(totalhigh_pages())
#endif
);
+ printk(KERN_INFO "le9 Unofficial (le9uo) working set protection 1.7 by Masahito Suzuki (forked from hakavlad's original le9 patch)");
+ printk(KERN_INFO "le9 Unofficial (le9uo) working set protection 1.8 by Masahito Suzuki (forked from hakavlad's original le9 patch)");
}
/*
@ -13256,7 +13256,7 @@ index bd5183dfd879..3a410f53a07c 100644
/*
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 28ba2b06fc7d..bd8299997740 100644
index 28ba2b06fc7d..38602f8ad5aa 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -148,6 +148,15 @@ struct scan_control {
@ -13341,20 +13341,8 @@ index 28ba2b06fc7d..bd8299997740 100644
nr[lru] = scan;
}
}
@@ -3992,7 +4035,11 @@ static bool lruvec_is_reclaimable(struct lruvec *lruvec, struct scan_control *sc
}
/* to protect the working set of the last N jiffies */
+#ifdef CONFIG_CACHY
+static unsigned long lru_gen_min_ttl __read_mostly = 1000;
+#else
static unsigned long lru_gen_min_ttl __read_mostly;
+#endif
static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
{
@@ -4030,6 +4077,96 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
}
@@ -2578,6 +2621,96 @@ static bool can_age_anon_pages(struct pglist_data *pgdat,
return can_demote(pgdat->node_id, sc);
}
+int vm_workingset_protection_update_handler(const struct ctl_table *table, int write,
@ -13447,10 +13435,10 @@ index 28ba2b06fc7d..bd8299997740 100644
+ }
+}
+
/******************************************************************************
* rmap/PT walk feedback
******************************************************************************/
@@ -4528,6 +4665,12 @@ static int isolate_folios(struct lruvec *lruvec, struct scan_control *sc, int sw
#ifdef CONFIG_LRU_GEN
#ifdef CONFIG_LRU_GEN_ENABLED
@@ -4528,6 +4661,12 @@ static int isolate_folios(struct lruvec *lruvec, struct scan_control *sc, int sw
*/
if (!swappiness)
type = LRU_GEN_FILE;
@ -13463,7 +13451,7 @@ index 28ba2b06fc7d..bd8299997740 100644
else if (min_seq[LRU_GEN_ANON] < min_seq[LRU_GEN_FILE])
type = LRU_GEN_ANON;
else if (swappiness == 1)
@@ -4807,6 +4950,8 @@ static int shrink_one(struct lruvec *lruvec, struct scan_control *sc)
@@ -4807,6 +4946,8 @@ static int shrink_one(struct lruvec *lruvec, struct scan_control *sc)
struct mem_cgroup *memcg = lruvec_memcg(lruvec);
struct pglist_data *pgdat = lruvec_pgdat(lruvec);
@ -13472,7 +13460,7 @@ index 28ba2b06fc7d..bd8299997740 100644
/* lru_gen_age_node() called mem_cgroup_calculate_protection() */
if (mem_cgroup_below_min(NULL, memcg))
return MEMCG_LRU_YOUNG;
@@ -5954,6 +6099,8 @@ static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
@@ -5954,6 +6095,8 @@ static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
prepare_scan_control(pgdat, sc);
@ -13497,9 +13485,9 @@ index fe7947f77406..99e138cfdd95 100644
--
2.47.1
From b6bf895456ea8a4c4e8bb7263152b45083b3737f Mon Sep 17 00:00:00 2001
From 37350776bd6035e1071a5f89eac871e7fd46462e Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:36:53 +0100
Date: Mon, 9 Dec 2024 15:05:36 +0100
Subject: [PATCH 06/12] crypto
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -15103,17 +15091,16 @@ index bbcff1fb78cb..752812bc4991 100644
--
2.47.1
From b87a14bbaced97e13e94aab5dfa5caa88b41d452 Mon Sep 17 00:00:00 2001
From e28f2b9d9260e1a4c97a830a32ceca817162811f Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:41:32 +0100
Date: Mon, 9 Dec 2024 15:05:49 +0100
Subject: [PATCH 07/12] fixes
Signed-off-by: Peter Jung <admin@ptr1337.dev>
---
arch/Kconfig | 4 +-
arch/x86/include/asm/futex.h | 8 +-
arch/x86/kernel/alternative.c | 10 +-
arch/x86/mm/tlb.c | 22 +--
arch/x86/mm/tlb.c | 2 +-
drivers/bluetooth/btmtk.c | 4 +-
drivers/bluetooth/btusb.c | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +
@ -15143,17 +15130,14 @@ Signed-off-by: Peter Jung <admin@ptr1337.dev>
fs/ntfs3/ntfs_fs.h | 3 +-
fs/ntfs3/record.c | 16 +-
fs/ntfs3/run.c | 40 +++--
include/linux/mm_types.h | 1 +
include/linux/sched/ext.h | 1 +
kernel/futex/core.c | 22 ---
kernel/futex/futex.h | 59 +++++-
kernel/kprobes.c | 23 ++-
kernel/sched/ext.c | 9 +-
kernel/workqueue.c | 22 ++-
mm/mmap.c | 1 +
scripts/package/PKGBUILD | 5 +
sound/pci/hda/patch_realtek.c | 2 +
43 files changed, 1103 insertions(+), 755 deletions(-)
39 files changed, 1078 insertions(+), 739 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 00551f340dbe..833b2344ce79 100644
@ -15203,41 +15187,8 @@ index 99d345b686fa..6e2458088800 100644
return -EFAULT;
asm volatile("\n"
"1:\t" LOCK_PREFIX "cmpxchgl %3, %2\n"
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index d17518ca19b8..8b66a555d2f0 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -1825,11 +1825,18 @@ static inline temp_mm_state_t use_temporary_mm(struct mm_struct *mm)
return temp_state;
}
+__ro_after_init struct mm_struct *poking_mm;
+__ro_after_init unsigned long poking_addr;
+
static inline void unuse_temporary_mm(temp_mm_state_t prev_state)
{
lockdep_assert_irqs_disabled();
+
switch_mm_irqs_off(NULL, prev_state.mm, current);
+ /* Clear the cpumask, to indicate no TLB flushing is needed anywhere */
+ cpumask_clear_cpu(raw_smp_processor_id(), mm_cpumask(poking_mm));
+
/*
* Restore the breakpoints if they were disabled before the temporary mm
* was loaded.
@@ -1838,9 +1845,6 @@ static inline void unuse_temporary_mm(temp_mm_state_t prev_state)
hw_breakpoint_restore();
}
-__ro_after_init struct mm_struct *poking_mm;
-__ro_after_init unsigned long poking_addr;
-
static void text_poke_memcpy(void *dst, const void *src, size_t len)
{
memcpy(dst, src, len);
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index b0678d59ebdb..3059b675101c 100644
index b0678d59ebdb..a2becb85bea7 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -569,7 +569,7 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct mm_struct *next,
@ -15249,44 +15200,6 @@ index b0678d59ebdb..3059b675101c 100644
!cpumask_test_cpu(cpu, mm_cpumask(next))))
cpumask_set_cpu(cpu, mm_cpumask(next));
@@ -607,18 +607,15 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct mm_struct *next,
cond_mitigation(tsk);
/*
- * Stop remote flushes for the previous mm.
- * Skip kernel threads; we never send init_mm TLB flushing IPIs,
- * but the bitmap manipulation can cause cache line contention.
+ * Leave this CPU in prev's mm_cpumask. Atomic writes to
+ * mm_cpumask can be expensive under contention. The CPU
+ * will be removed lazily at TLB flush time.
*/
- if (prev != &init_mm) {
- VM_WARN_ON_ONCE(!cpumask_test_cpu(cpu,
- mm_cpumask(prev)));
- cpumask_clear_cpu(cpu, mm_cpumask(prev));
- }
+ VM_WARN_ON_ONCE(prev != &init_mm && !cpumask_test_cpu(cpu,
+ mm_cpumask(prev)));
/* Start receiving IPIs and then read tlb_gen (and LAM below) */
- if (next != &init_mm)
+ if (next != &init_mm && !cpumask_test_cpu(cpu, mm_cpumask(next)))
cpumask_set_cpu(cpu, mm_cpumask(next));
next_tlb_gen = atomic64_read(&next->context.tlb_gen);
@@ -762,8 +759,11 @@ static void flush_tlb_func(void *info)
count_vm_tlb_event(NR_TLB_REMOTE_FLUSH_RECEIVED);
/* Can only happen on remote CPUs */
- if (f->mm && f->mm != loaded_mm)
+ if (f->mm && f->mm != loaded_mm) {
+ cpumask_clear_cpu(raw_smp_processor_id(), mm_cpumask(f->mm));
+ trace_tlb_flush(TLB_REMOTE_WRONG_CPU, 0);
return;
+ }
}
if (unlikely(loaded_mm == &init_mm))
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index 480e4adba9fa..3626faab9c91 100644
--- a/drivers/bluetooth/btmtk.c
@ -15344,7 +15257,7 @@ index 7617963901fa..9f992e09de86 100644
struct debugfs_blob_wrapper debugfs_vbios_blob;
struct debugfs_blob_wrapper debugfs_discovery_blob;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c2394c8b4d6b..046a2c8ec0bd 100644
index 1f08cb88d51b..a317a66647f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -145,6 +145,8 @@ const char *amdgpu_asic_name[] = {
@ -15557,7 +15470,7 @@ index d4a6cf6e98e8..20d28c68593d 100644
*/
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 44f0b159d232..7abf6fc9cbbe 100644
index eb6a3cc9ca44..c7d977890f47 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -72,6 +72,10 @@ static int smu_set_power_limit(void *handle, uint32_t limit);
@ -15623,7 +15536,7 @@ index 44f0b159d232..7abf6fc9cbbe 100644
smu_fini_microcode(smu);
return 0;
@@ -2113,6 +2106,9 @@ static int smu_suspend(void *handle)
@@ -2117,6 +2110,9 @@ static int smu_suspend(void *handle)
if (!ret)
adev->gfx.gfx_off_entrycount = count;
@ -15633,7 +15546,7 @@ index 44f0b159d232..7abf6fc9cbbe 100644
return 0;
}
@@ -2225,25 +2221,49 @@ static int smu_enable_umd_pstate(void *handle,
@@ -2229,25 +2225,49 @@ static int smu_enable_umd_pstate(void *handle,
}
static int smu_bump_power_profile_mode(struct smu_context *smu,
@ -15691,7 +15604,7 @@ index 44f0b159d232..7abf6fc9cbbe 100644
struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);
if (!skip_display_settings) {
@@ -2280,14 +2300,8 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
@@ -2284,14 +2304,8 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
}
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
@ -15708,7 +15621,7 @@ index 44f0b159d232..7abf6fc9cbbe 100644
return ret;
}
@@ -2306,13 +2320,13 @@ static int smu_handle_task(struct smu_context *smu,
@@ -2310,13 +2324,13 @@ static int smu_handle_task(struct smu_context *smu,
ret = smu_pre_display_config_changed(smu);
if (ret)
return ret;
@ -15725,7 +15638,7 @@ index 44f0b159d232..7abf6fc9cbbe 100644
break;
default:
break;
@@ -2334,12 +2348,11 @@ static int smu_handle_dpm_task(void *handle,
@@ -2338,12 +2352,11 @@ static int smu_handle_dpm_task(void *handle,
static int smu_switch_power_profile(void *handle,
enum PP_SMC_POWER_PROFILE type,
@ -15740,7 +15653,7 @@ index 44f0b159d232..7abf6fc9cbbe 100644
if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)
return -EOPNOTSUPP;
@@ -2347,21 +2360,21 @@ static int smu_switch_power_profile(void *handle,
@@ -2351,21 +2364,21 @@ static int smu_switch_power_profile(void *handle,
if (!(type < PP_SMC_POWER_PROFILE_CUSTOM))
return -EINVAL;
@ -15776,7 +15689,7 @@ index 44f0b159d232..7abf6fc9cbbe 100644
return 0;
}
@@ -3063,12 +3076,35 @@ static int smu_set_power_profile_mode(void *handle,
@@ -3067,12 +3080,35 @@ static int smu_set_power_profile_mode(void *handle,
uint32_t param_size)
{
struct smu_context *smu = handle;
@ -15850,10 +15763,10 @@ index b44a185d07e8..2b8a18ce25d9 100644
/**
* @dpm_set_vcn_enable: Enable/disable VCN engine dynamic power
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
index c0f6b59369b7..f4c64c46ff7a 100644
index d52512f5f1bd..fc1297fecc62 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
@@ -1441,98 +1441,120 @@ static int arcturus_get_power_profile_mode(struct smu_context *smu,
@@ -1445,98 +1445,120 @@ static int arcturus_get_power_profile_mode(struct smu_context *smu,
return size;
}
@ -16759,10 +16672,10 @@ index 24675a1d98db..5fa58ef65371 100644
return ret;
}
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
index 50d16301f3eb..ed41de3d397a 100644
index 60d18aca6ce5..31996f8c6e3a 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
@@ -2540,78 +2540,110 @@ do { \
@@ -2542,78 +2542,110 @@ do { \
return result;
}
@ -16927,10 +16840,10 @@ index 50d16301f3eb..ed41de3d397a 100644
return ret;
}
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
index 1e16a281f2dc..bfaa9e43f92a 100644
index 82aef8626afa..b22fb7eafcd3 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@ -1729,90 +1729,120 @@ static int smu_v14_0_2_get_power_profile_mode(struct smu_context *smu,
@@ -1751,90 +1751,120 @@ static int smu_v14_0_2_get_power_profile_mode(struct smu_context *smu,
return size;
}
@ -17924,30 +17837,6 @@ index 58e988cd8049..6e86d66197ef 100644
}
return ret;
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 6e3bdf8e38bc..6b6f05404304 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1335,6 +1335,7 @@ enum tlb_flush_reason {
TLB_LOCAL_SHOOTDOWN,
TLB_LOCAL_MM_SHOOTDOWN,
TLB_REMOTE_SEND_IPI,
+ TLB_REMOTE_WRONG_CPU,
NR_TLB_FLUSH_REASONS,
};
diff --git a/include/linux/sched/ext.h b/include/linux/sched/ext.h
index 2799e7284fff..1ddbde64a31b 100644
--- a/include/linux/sched/ext.h
+++ b/include/linux/sched/ext.h
@@ -199,6 +199,7 @@ struct sched_ext_entity {
#ifdef CONFIG_EXT_GROUP_SCHED
struct cgroup *cgrp_moving_from;
#endif
+ /* must be the last field, see init_scx_entity() */
struct list_head tasks_node;
};
diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 136768ae2637..9107704a6574 100644
--- a/kernel/futex/core.c
@ -18128,33 +18017,6 @@ index da59c68df841..55d0835ea0cf 100644
jump_label_unlock();
return ret;
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 16613631543f..751d73d500e5 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -3567,7 +3567,12 @@ static void scx_ops_exit_task(struct task_struct *p)
void init_scx_entity(struct sched_ext_entity *scx)
{
- memset(scx, 0, sizeof(*scx));
+ /*
+ * init_idle() calls this function again after fork sequence is
+ * complete. Don't touch ->tasks_node as it's already linked.
+ */
+ memset(scx, 0, offsetof(struct sched_ext_entity, tasks_node));
+
INIT_LIST_HEAD(&scx->dsq_list.node);
RB_CLEAR_NODE(&scx->dsq_priq);
scx->sticky_cpu = -1;
@@ -6473,8 +6478,6 @@ __bpf_kfunc_end_defs();
BTF_KFUNCS_START(scx_kfunc_ids_unlocked)
BTF_ID_FLAGS(func, scx_bpf_create_dsq, KF_SLEEPABLE)
-BTF_ID_FLAGS(func, scx_bpf_dispatch_from_dsq_set_slice)
-BTF_ID_FLAGS(func, scx_bpf_dispatch_from_dsq_set_vtime)
BTF_ID_FLAGS(func, scx_bpf_dispatch_from_dsq, KF_RCU)
BTF_ID_FLAGS(func, scx_bpf_dispatch_vtime_from_dsq, KF_RCU)
BTF_KFUNCS_END(scx_kfunc_ids_unlocked)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 9949ffad8df0..8b07576814a5 100644
--- a/kernel/workqueue.c
@ -18248,9 +18110,9 @@ index 18e6779a83be..c73982b07969 100644
--
2.47.1
From e3136a3233eba6da59d7a48e41c571afe0dd9349 Mon Sep 17 00:00:00 2001
From 2b26fe935509d7c15fc1edc0a0311156f33b8e66 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:41:42 +0100
Date: Mon, 9 Dec 2024 15:06:08 +0100
Subject: [PATCH 08/12] ntsync
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -21337,9 +21199,9 @@ index 000000000000..5fa2c9a0768c
--
2.47.1
From 71bb61460f0957c5bed4d52c612f0196d3da54d3 Mon Sep 17 00:00:00 2001
From d10c15c5c7691ea2e8f670df7f1189063c1564f9 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:41:55 +0100
Date: Mon, 9 Dec 2024 15:06:21 +0100
Subject: [PATCH 09/12] perf-per-core
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -22334,10 +22196,10 @@ index 2361ed4d2b15..37a9afffb59e 100644
--
2.47.1
From 0eaeb75af11e153427fa208c9f951f605e76923f Mon Sep 17 00:00:00 2001
From 45606cc9ced5adecd6c8629df5e7ea887c51a659 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:42:06 +0100
Subject: [PATCH 10/12] pksm
Date: Mon, 9 Dec 2024 15:06:31 +0100
Subject: [PATCH 10/12] pskm
Signed-off-by: Peter Jung <admin@ptr1337.dev>
---
@ -22767,9 +22629,9 @@ index 01071182763e..7394bad8178e 100644
--
2.47.1
From 9a010ef3215a498041d6b72ebf77167480aa5c4d Mon Sep 17 00:00:00 2001
From 361d97664ce1fdff4159a40889e08d325824cb7c Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:42:15 +0100
Date: Mon, 9 Dec 2024 15:06:41 +0100
Subject: [PATCH 11/12] t2
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@ -33016,9 +32878,9 @@ index b03d526e4c45..66d09cbec5a8 100755
--
2.47.1
From 1fd0be01b82212aeb9b66ee23aae5e3f018a7b20 Mon Sep 17 00:00:00 2001
From 687a65788e3de0d4c0ebc824109f2193dbcf3af1 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
Date: Thu, 5 Dec 2024 14:42:25 +0100
Date: Mon, 9 Dec 2024 15:06:50 +0100
Subject: [PATCH 12/12] zstd
Signed-off-by: Peter Jung <admin@ptr1337.dev>