1
0

release 6.12.4 (preliminary)

This commit is contained in:
2024-12-10 06:44:25 +03:00
parent 9debc8729c
commit 407e7bac82
246 changed files with 4681 additions and 5758 deletions

View File

@@ -0,0 +1,266 @@
From d2589889bf6001daef33479d29680fa3f991fae9 Mon Sep 17 00:00:00 2001
From: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Date: Tue, 12 Nov 2024 22:33:06 +0530
Subject: [PATCH 1/2] platform/x86/amd: amd_3d_vcache: Add AMD 3D V-Cache
optimizer driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
AMD X3D processors, also known as AMD 3D V-Cache, feature dual Core
Complex Dies (CCDs) and enlarged L3 cache, enabling dynamic mode
switching between Frequency and Cache modes. To optimize performance,
implement the AMD 3D V-Cache Optimizer, which allows selecting either:
Frequency mode: cores within the faster CCD are prioritized before
those in the slower CCD.
Cache mode: cores within the larger L3 CCD are prioritized before
those in the smaller L3 CCD.
Co-developed-by: Perry Yuan <perry.yuan@amd.com>
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Link: https://lore.kernel.org/r/20241112170307.3745777-2-Basavaraj.Natikar@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
MAINTAINERS | 7 +
drivers/platform/x86/amd/Kconfig | 12 ++
drivers/platform/x86/amd/Makefile | 2 +
drivers/platform/x86/amd/x3d_vcache.c | 176 ++++++++++++++++++++++++++
4 files changed, 197 insertions(+)
create mode 100644 drivers/platform/x86/amd/x3d_vcache.c
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -965,6 +965,13 @@ Q: https://patchwork.kernel.org/project/
F: drivers/infiniband/hw/efa/
F: include/uapi/rdma/efa-abi.h
+AMD 3D V-CACHE PERFORMANCE OPTIMIZER DRIVER
+M: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+R: Mario Limonciello <mario.limonciello@amd.com>
+L: platform-driver-x86@vger.kernel.org
+S: Supported
+F: drivers/platform/x86/amd/x3d_vcache.c
+
AMD ADDRESS TRANSLATION LIBRARY (ATL)
M: Yazen Ghannam <Yazen.Ghannam@amd.com>
L: linux-edac@vger.kernel.org
--- a/drivers/platform/x86/amd/Kconfig
+++ b/drivers/platform/x86/amd/Kconfig
@@ -19,6 +19,18 @@ config AMD_HSMP
If you choose to compile this driver as a module the module will be
called amd_hsmp.
+config AMD_3D_VCACHE
+ tristate "AMD 3D V-Cache Performance Optimizer Driver"
+ depends on X86_64 && ACPI
+ help
+ The driver provides a sysfs interface, enabling the setting of a bias
+ that alters CPU core reordering. This bias prefers cores with higher
+ frequencies or larger L3 caches on processors supporting AMD 3D V-Cache
+ technology.
+
+ If you choose to compile this driver as a module the module will be
+ called amd_3d_vcache.
+
config AMD_WBRF
bool "AMD Wifi RF Band mitigations (WBRF)"
depends on ACPI
--- a/drivers/platform/x86/amd/Makefile
+++ b/drivers/platform/x86/amd/Makefile
@@ -4,6 +4,8 @@
# AMD x86 Platform-Specific Drivers
#
+obj-$(CONFIG_AMD_3D_VCACHE) += amd_3d_vcache.o
+amd_3d_vcache-objs := x3d_vcache.o
obj-$(CONFIG_AMD_PMC) += pmc/
amd_hsmp-y := hsmp.o
obj-$(CONFIG_AMD_HSMP) += amd_hsmp.o
--- /dev/null
+++ b/drivers/platform/x86/amd/x3d_vcache.c
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * AMD 3D V-Cache Performance Optimizer Driver
+ *
+ * Copyright (c) 2024, Advanced Micro Devices, Inc.
+ * All Rights Reserved.
+ *
+ * Authors: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+ * Perry Yuan <perry.yuan@amd.com>
+ * Mario Limonciello <mario.limonciello@amd.com>
+ */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/acpi.h>
+#include <linux/array_size.h>
+#include <linux/device.h>
+#include <linux/errno.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
+#include <linux/pm.h>
+#include <linux/sysfs.h>
+#include <linux/uuid.h>
+
+static char *x3d_mode = "frequency";
+module_param(x3d_mode, charp, 0);
+MODULE_PARM_DESC(x3d_mode, "Initial 3D-VCache mode; 'frequency' (default) or 'cache'");
+
+#define DSM_REVISION_ID 0
+#define DSM_SET_X3D_MODE 1
+
+static guid_t x3d_guid = GUID_INIT(0xdff8e55f, 0xbcfd, 0x46fb, 0xba, 0x0a,
+ 0xef, 0xd0, 0x45, 0x0f, 0x34, 0xee);
+
+enum amd_x3d_mode_type {
+ MODE_INDEX_FREQ,
+ MODE_INDEX_CACHE,
+};
+
+static const char * const amd_x3d_mode_strings[] = {
+ [MODE_INDEX_FREQ] = "frequency",
+ [MODE_INDEX_CACHE] = "cache",
+};
+
+struct amd_x3d_dev {
+ struct device *dev;
+ acpi_handle ahandle;
+ /* To protect x3d mode setting */
+ struct mutex lock;
+ enum amd_x3d_mode_type curr_mode;
+};
+
+static int amd_x3d_get_mode(struct amd_x3d_dev *data)
+{
+ guard(mutex)(&data->lock);
+
+ return data->curr_mode;
+}
+
+static int amd_x3d_mode_switch(struct amd_x3d_dev *data, int new_state)
+{
+ union acpi_object *out, argv;
+
+ guard(mutex)(&data->lock);
+ argv.type = ACPI_TYPE_INTEGER;
+ argv.integer.value = new_state;
+
+ out = acpi_evaluate_dsm(data->ahandle, &x3d_guid, DSM_REVISION_ID,
+ DSM_SET_X3D_MODE, &argv);
+ if (!out) {
+ dev_err(data->dev, "failed to evaluate _DSM\n");
+ return -EINVAL;
+ }
+
+ data->curr_mode = new_state;
+
+ kfree(out);
+
+ return 0;
+}
+
+static ssize_t amd_x3d_mode_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct amd_x3d_dev *data = dev_get_drvdata(dev);
+ int ret;
+
+ ret = sysfs_match_string(amd_x3d_mode_strings, buf);
+ if (ret < 0)
+ return ret;
+
+ ret = amd_x3d_mode_switch(data, ret);
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t amd_x3d_mode_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct amd_x3d_dev *data = dev_get_drvdata(dev);
+ int mode = amd_x3d_get_mode(data);
+
+ return sysfs_emit(buf, "%s\n", amd_x3d_mode_strings[mode]);
+}
+static DEVICE_ATTR_RW(amd_x3d_mode);
+
+static struct attribute *amd_x3d_attrs[] = {
+ &dev_attr_amd_x3d_mode.attr,
+ NULL
+};
+ATTRIBUTE_GROUPS(amd_x3d);
+
+static int amd_x3d_resume_handler(struct device *dev)
+{
+ struct amd_x3d_dev *data = dev_get_drvdata(dev);
+ int ret = amd_x3d_get_mode(data);
+
+ return amd_x3d_mode_switch(data, ret);
+}
+
+static DEFINE_SIMPLE_DEV_PM_OPS(amd_x3d_pm, NULL, amd_x3d_resume_handler);
+
+static const struct acpi_device_id amd_x3d_acpi_ids[] = {
+ {"AMDI0101"},
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, amd_x3d_acpi_ids);
+
+static int amd_x3d_probe(struct platform_device *pdev)
+{
+ struct amd_x3d_dev *data;
+ acpi_handle handle;
+ int ret;
+
+ handle = ACPI_HANDLE(&pdev->dev);
+ if (!handle)
+ return -ENODEV;
+
+ if (!acpi_check_dsm(handle, &x3d_guid, DSM_REVISION_ID, BIT(DSM_SET_X3D_MODE)))
+ return -ENODEV;
+
+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ data->dev = &pdev->dev;
+
+ ret = devm_mutex_init(data->dev, &data->lock);
+ if (ret)
+ return ret;
+
+ data->ahandle = handle;
+ platform_set_drvdata(pdev, data);
+
+ ret = match_string(amd_x3d_mode_strings, ARRAY_SIZE(amd_x3d_mode_strings), x3d_mode);
+ if (ret < 0)
+ return dev_err_probe(&pdev->dev, -EINVAL, "invalid mode %s\n", x3d_mode);
+
+ return amd_x3d_mode_switch(data, ret);
+}
+
+static struct platform_driver amd_3d_vcache_driver = {
+ .driver = {
+ .name = "amd_x3d_vcache",
+ .dev_groups = amd_x3d_groups,
+ .acpi_match_table = amd_x3d_acpi_ids,
+ .pm = pm_sleep_ptr(&amd_x3d_pm),
+ },
+ .probe = amd_x3d_probe,
+};
+module_platform_driver(amd_3d_vcache_driver);
+
+MODULE_DESCRIPTION("AMD 3D V-Cache Performance Optimizer Driver");
+MODULE_LICENSE("GPL");

View File

@@ -0,0 +1,55 @@
From edf899b17950e1b926889b501e06c86dd867bac0 Mon Sep 17 00:00:00 2001
From: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Date: Tue, 12 Nov 2024 22:33:07 +0530
Subject: [PATCH 2/2] platform/x86/amd: amd_3d_vcache: Add sysfs ABI
documentation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add documentation for the amd_3d_vcache sysfs bus platform driver
interface so that userspace applications can use it to change mode
preferences, either frequency or cache.
Co-developed-by: Perry Yuan <perry.yuan@amd.com>
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Link: https://lore.kernel.org/r/20241112170307.3745777-3-Basavaraj.Natikar@amd.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
.../sysfs-bus-platform-drivers-amd_x3d_vcache | 12 ++++++++++++
MAINTAINERS | 1 +
2 files changed, 13 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-platform-drivers-amd_x3d_vcache
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-platform-drivers-amd_x3d_vcache
@@ -0,0 +1,12 @@
+What: /sys/bus/platform/drivers/amd_x3d_vcache/AMDI0101:00/amd_x3d_mode
+Date: November 2024
+KernelVersion: 6.13
+Contact: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+Description: (RW) AMD 3D V-Cache optimizer allows users to switch CPU core
+ rankings dynamically.
+
+ This file switches between these two modes:
+ - "frequency" cores within the faster CCD are prioritized before
+ those in the slower CCD.
+ - "cache" cores within the larger L3 CCD are prioritized before
+ those in the smaller L3 CCD.
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -970,6 +970,7 @@ M: Basavaraj Natikar <Basavaraj.Natikar@
R: Mario Limonciello <mario.limonciello@amd.com>
L: platform-driver-x86@vger.kernel.org
S: Supported
+F: Documentation/ABI/testing/sysfs-bus-platform-drivers-amd_x3d_vcache
F: drivers/platform/x86/amd/x3d_vcache.c
AMD ADDRESS TRANSLATION LIBRARY (ATL)

View File

@@ -1,4 +1,4 @@
From 0bbb6450b1ba362c1c2e7d8d752b39ec9844629b Mon Sep 17 00:00:00 2001
From b492213c96ded86e7800b320706ad15bd31c7c1b Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian@brauner.io>
Date: Wed, 16 Jan 2019 23:13:25 +0100
Subject: [PATCH 1/4] binder: turn into module
@@ -29,21 +29,6 @@ Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
[ arighi: zap_page_range() has been dropped, export zap_page_range_single() in 6.3 ]
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
drivers/android/Kconfig | 6 +++---
drivers/android/binder.c | 17 ++++++++++++++---
drivers/android/binder_alloc.h | 3 ++-
drivers/android/binder_internal.h | 5 +++--
drivers/android/binderfs.c | 6 +++---
fs/file.c | 1 +
include/linux/ipc_namespace.h | 3 +++
ipc/namespace.c | 17 +++++++++++++++++
kernel/sched/syscalls.c | 1 +
kernel/task_work.c | 1 +
mm/memory.c | 1 +
mm/vmalloc.c | 1 +
security/security.c | 4 ++++
14 files changed, 61 insertions(+), 15 deletions(-)
--- a/drivers/android/Kconfig
+++ b/drivers/android/Kconfig
@@ -60,7 +45,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
Binderfs is a pseudo-filesystem for the Android Binder IPC driver
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -6713,9 +6713,20 @@ err_alloc_device_names_failed:
@@ -7027,9 +7027,20 @@ err_alloc_device_names_failed:
return ret;
}
@@ -133,7 +118,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
static inline int __init init_binderfs(void)
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -120,7 +120,7 @@ static int binderfs_binder_device_create
@@ -122,7 +122,7 @@ static int binderfs_binder_device_create
struct super_block *sb = ref_inode->i_sb;
struct binderfs_info *info = sb->s_fs_info;
#if defined(CONFIG_IPC_NS)
@@ -142,7 +127,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
#else
bool use_reserve = true;
#endif
@@ -397,7 +397,7 @@ static int binderfs_binder_ctl_create(st
@@ -399,7 +399,7 @@ static int binderfs_binder_ctl_create(st
struct dentry *root = sb->s_root;
struct binderfs_info *info = sb->s_fs_info;
#if defined(CONFIG_IPC_NS)
@@ -151,7 +136,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
#else
bool use_reserve = true;
#endif
@@ -683,7 +683,7 @@ static int binderfs_fill_super(struct su
@@ -691,7 +691,7 @@ static int binderfs_fill_super(struct su
return -ENOMEM;
info = sb->s_fs_info;
@@ -199,7 +184,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
return container_of(ns, struct ipc_namespace, ns);
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -3166,6 +3166,7 @@ struct vm_struct *get_vm_area(unsigned l
@@ -3176,6 +3176,7 @@ struct vm_struct *get_vm_area(unsigned l
NUMA_NO_NODE, GFP_KERNEL,
__builtin_return_address(0));
}

View File

@@ -1,4 +1,4 @@
From 1e2892b83e6c4062623f9aec06eba27884d47059 Mon Sep 17 00:00:00 2001
From cdcc9fde68f01d86d8f9ff0baaf0e9fbd15fa8ba Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Thu, 13 Dec 2018 01:00:49 +0000
Subject: [PATCH 1/4] sched/wait: Do accept() in LIFO order for cache

View File

@@ -1,4 +1,4 @@
From 52caaf4af0242cc3ac1ddaf9791c4c08a4b7226d Mon Sep 17 00:00:00 2001
From c6f8d4723c8185d7096cdea7f5e499184f22426e Mon Sep 17 00:00:00 2001
From: William Douglas <william.douglas@intel.com>
Date: Wed, 20 Jun 2018 17:23:21 +0000
Subject: [PATCH 2/4] firmware: Enable stateless firmware loading

View File

@@ -1,4 +1,4 @@
From f57e26428b29ddcdf58b35659002293bde1bf281 Mon Sep 17 00:00:00 2001
From 78a04a7536d68fa0d8e7dc2955d37aa7f592fca5 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sun, 18 Feb 2018 23:35:41 +0000
Subject: [PATCH 3/4] locking: rwsem: spin faster
@@ -12,7 +12,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/kernel/locking/rwsem.c
+++ b/kernel/locking/rwsem.c
@@ -749,6 +749,7 @@ rwsem_spin_on_owner(struct rw_semaphore
@@ -747,6 +747,7 @@ rwsem_spin_on_owner(struct rw_semaphore
struct task_struct *new, *owner;
unsigned long flags, new_flags;
enum owner_state state;
@@ -20,7 +20,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
lockdep_assert_preemption_disabled();
@@ -785,7 +786,8 @@ rwsem_spin_on_owner(struct rw_semaphore
@@ -783,7 +784,8 @@ rwsem_spin_on_owner(struct rw_semaphore
break;
}

View File

@@ -1,4 +1,4 @@
From f68a84ded01d688aa58a973788f507899fbe191f Mon Sep 17 00:00:00 2001
From 2099f9c57216c836e445d2f6ba65f04131267f47 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 27 Feb 2023 01:38:18 +0000
Subject: [PATCH 1/2] netfilter: Add netfilter nf_tables fullcone support
@@ -1819,7 +1819,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
+MODULE_DESCRIPTION("Netfilter fullcone expression support library of RFC3489 full cone NAT");
--- /dev/null
+++ b/net/netfilter/nft_ext_fullcone.c
@@ -0,0 +1,466 @@
@@ -0,0 +1,470 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/*
@@ -1947,7 +1947,11 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
+}
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+static int nft_fullcone_validate(const struct nft_ctx *ctx, const struct nft_expr *expr)
+#else
+static int nft_fullcone_validate(const struct nft_ctx *ctx, const struct nft_expr *expr, const struct nft_data **data)
+#endif
+{
+ int err;
+

View File

@@ -1,4 +1,4 @@
From 9a066610b055315bf155a99b2ea0a58245ef11e2 Mon Sep 17 00:00:00 2001
From 6fbfabdc4e5ef8a186c27e4ed2db28ee1ddf4b4e Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 20 Feb 2018 15:56:02 +0100
Subject: [PATCH 2/2] netfilter: add xt_FLOWOFFLOAD target

View File

@@ -1,4 +1,4 @@
From 772c6e460211ac740b2550fa75be36b8a49731fe Mon Sep 17 00:00:00 2001
From 2b4dc54edd1589e720e5b27e4536fd549c31f34e Mon Sep 17 00:00:00 2001
From: "mfreemon@cloudflare.com" <mfreemon@cloudflare.com>
Date: Tue, 1 Mar 2022 17:06:02 -0600
Subject: [PATCH] tcp: Add a sysctl to skip tcp collapse processing when the
@@ -41,7 +41,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -223,6 +223,7 @@ struct netns_ipv4 {
@@ -226,6 +226,7 @@ struct netns_ipv4 {
u8 sysctl_fib_notify_on_flag_change;
u8 sysctl_tcp_syn_linear_timeouts;
@@ -83,7 +83,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
.maxlen = sizeof(u8),
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5645,6 +5645,7 @@ static bool tcp_prune_ofo_queue(struct s
@@ -5652,6 +5652,7 @@ static bool tcp_prune_ofo_queue(struct s
static int tcp_prune_queue(struct sock *sk, const struct sk_buff *in_skb)
{
struct tcp_sock *tp = tcp_sk(sk);
@@ -91,7 +91,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
NET_INC_STATS(sock_net(sk), LINUX_MIB_PRUNECALLED);
@@ -5656,6 +5657,39 @@ static int tcp_prune_queue(struct sock *
@@ -5663,6 +5664,39 @@ static int tcp_prune_queue(struct sock *
if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
return 0;
@@ -131,7 +131,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
tcp_collapse_ofo_queue(sk);
if (!skb_queue_empty(&sk->sk_receive_queue))
tcp_collapse(sk, &sk->sk_receive_queue, NULL,
@@ -5674,6 +5708,8 @@ static int tcp_prune_queue(struct sock *
@@ -5681,6 +5715,8 @@ static int tcp_prune_queue(struct sock *
if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
return 0;
@@ -142,7 +142,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
* and hopefully then we'll have sufficient space.
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -3508,6 +3508,7 @@ static int __net_init tcp_sk_init(struct
@@ -3524,6 +3524,7 @@ static int __net_init tcp_sk_init(struct
net->ipv4.sysctl_tcp_syn_linear_timeouts = 4;
net->ipv4.sysctl_tcp_shrink_window = 0;

View File

@@ -1,4 +1,4 @@
From 454d96573eea54fcb7714a4a455d13173dfb9768 Mon Sep 17 00:00:00 2001
From d79c32bd2a17e206d1c198570ef705549d0f644b Mon Sep 17 00:00:00 2001
From: Mark Weiman <mark.weiman@markzz.com>
Date: Sun, 12 Aug 2018 11:36:21 -0400
Subject: [PATCH] PCI: Enable overrides for missing ACS capabilities
@@ -55,7 +55,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4414,6 +4414,15 @@
@@ -4475,6 +4475,15 @@
nomsi [MSI] If the PCI_MSI kernel config parameter is
enabled, this kernel boot option can be used to
disable the use of MSI interrupts system-wide.

View File

@@ -1,4 +1,4 @@
From e054b70adebd85ed4ab62b458ee6ec3e902d970f Mon Sep 17 00:00:00 2001
From e914b6a0d571a92db04869a02e06dc83ec7c0700 Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sun, 27 Feb 2022 14:46:08 -0800
Subject: [PATCH 1/6] extcon: Add driver for Steam Deck
@@ -15,7 +15,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/drivers/extcon/Kconfig
+++ b/drivers/extcon/Kconfig
@@ -203,4 +203,11 @@ config EXTCON_RTK_TYPE_C
@@ -214,4 +214,11 @@ config EXTCON_RTK_TYPE_C
The DHC (Digital Home Hub) RTD series SoC contains a type c module.
This driver will detect the status of the type-c port.
@@ -29,7 +29,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
endif
--- a/drivers/extcon/Makefile
+++ b/drivers/extcon/Makefile
@@ -26,3 +26,4 @@ obj-$(CONFIG_EXTCON_USB_GPIO) += extcon-
@@ -27,3 +27,4 @@ obj-$(CONFIG_EXTCON_USB_GPIO) += extcon-
obj-$(CONFIG_EXTCON_USBC_CROS_EC) += extcon-usbc-cros-ec.o
obj-$(CONFIG_EXTCON_USBC_TUSB320) += extcon-usbc-tusb320.o
obj-$(CONFIG_EXTCON_RTK_TYPE_C) += extcon-rtk-type-c.o

View File

@@ -1,4 +1,4 @@
From be312a466f817a38a48668f93bb07a75ff9fa875 Mon Sep 17 00:00:00 2001
From 8fe7bb2680d3e1201fdf3329e51078831f32fe12 Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sat, 19 Feb 2022 16:09:45 -0800
Subject: [PATCH 2/6] hwmon: Add driver for Steam Deck's EC sensors
@@ -17,7 +17,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -2050,6 +2050,17 @@ config SENSORS_SCH5636
@@ -2053,6 +2053,17 @@ config SENSORS_SCH5636
This driver can also be built as a module. If so, the module
will be called sch5636.
@@ -37,14 +37,14 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
depends on I2C
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -207,6 +207,7 @@ obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47
@@ -208,6 +208,7 @@ obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47
obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o
obj-$(CONFIG_SENSORS_SPARX5) += sparx5-temp.o
obj-$(CONFIG_SENSORS_SPD5118) += spd5118.o
+obj-$(CONFIG_SENSORS_STEAMDECK) += steamdeck-hwmon.o
obj-$(CONFIG_SENSORS_STTS751) += stts751.o
obj-$(CONFIG_SENSORS_SURFACE_FAN)+= surface_fan.o
obj-$(CONFIG_SENSORS_SY7636A) += sy7636a-hwmon.o
obj-$(CONFIG_SENSORS_SURFACE_TEMP)+= surface_temp.o
--- /dev/null
+++ b/drivers/hwmon/steamdeck-hwmon.c
@@ -0,0 +1,224 @@

View File

@@ -1,4 +1,4 @@
From efe7b80f8a7448265d238c13ed1b6e327a9c739e Mon Sep 17 00:00:00 2001
From 8181870b30687aa9351d919d082bc2b671a9c4cb Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sat, 15 Jul 2023 12:58:54 -0700
Subject: [PATCH 3/6] hwmon: steamdeck-hwmon: Add support for max battery

View File

@@ -1,4 +1,4 @@
From e76032abd59b7d2b15c8106630423e3091b298ce Mon Sep 17 00:00:00 2001
From 4df11ab1bd9ad50e6ed928d1c2f3a8404775837b Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sun, 27 Feb 2022 12:58:05 -0800
Subject: [PATCH 4/6] leds: steamdeck: Add support for Steam Deck LED
@@ -15,7 +15,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -951,6 +951,13 @@ config LEDS_ACER_A500
@@ -959,6 +959,13 @@ config LEDS_ACER_A500
This option enables support for the Power Button LED of
Acer Iconia Tab A500.

View File

@@ -1,4 +1,4 @@
From c3cf089a9da1216d3e1e047eba2ec46e0febe457 Mon Sep 17 00:00:00 2001
From 947c953bf24af62c58e9eb0bab533816882b83a3 Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sat, 19 Feb 2022 16:08:36 -0800
Subject: [PATCH 5/6] mfd: Add MFD core driver for Steam Deck
@@ -19,7 +19,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -2390,5 +2390,16 @@ config MFD_RSMU_SPI
@@ -2402,5 +2402,16 @@ config MFD_RSMU_SPI
Additional drivers must be enabled in order to use the functionality
of the device.
@@ -38,7 +38,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
endif
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -288,3 +288,5 @@ obj-$(CONFIG_MFD_ATC260X_I2C) += atc260x
@@ -289,3 +289,5 @@ obj-$(CONFIG_MFD_ATC260X_I2C) += atc260x
obj-$(CONFIG_MFD_RSMU_I2C) += rsmu_i2c.o rsmu_core.o
obj-$(CONFIG_MFD_RSMU_SPI) += rsmu_spi.o rsmu_core.o

View File

@@ -1,4 +1,4 @@
From c24abd65482a08109e756c612e83c8c8450a263b Mon Sep 17 00:00:00 2001
From 2f8a2543aa33103cf237853d5f2ca8999261dd0d Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sun, 24 Sep 2023 15:02:33 -0700
Subject: [PATCH 6/6] mfd: steamdeck: Expose controller board power in sysfs

View File

@@ -1,25 +0,0 @@
From 2a949c896ea66e647d94254c28b1d4d6194ee14b Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 16 Sep 2024 00:55:35 +0000
Subject: [PATCH 03/19] XANMOD: kbuild: Add GCC SMS-based modulo scheduling
flags
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
Makefile | 5 +++++
1 file changed, 5 insertions(+)
--- a/Makefile
+++ b/Makefile
@@ -822,6 +822,11 @@ KBUILD_CFLAGS += -Os
KBUILD_RUSTFLAGS += -Copt-level=s
endif
+# Perform swing modulo scheduling immediately before the first scheduling pass.
+# This pass looks at innermost loops and reorders their instructions by
+# overlapping different iterations.
+KBUILD_CFLAGS += $(call cc-option,-fmodulo-sched -fmodulo-sched-allow-regmoves)
+
# Always set `debug-assertions` and `overflow-checks` because their default
# depends on `opt-level` and `debug-assertions`, respectively.
KBUILD_RUSTFLAGS += -Cdebug-assertions=$(if $(CONFIG_RUST_DEBUG_ASSERTIONS),y,n)

View File

@@ -1,7 +1,7 @@
From 867a311f231e89b4c9194579e40718f751761ffc Mon Sep 17 00:00:00 2001
From 67e174927705e71b0d254ab6fab5af40193376a4 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Sat, 31 Aug 2024 16:57:41 +0000
Subject: [PATCH 04/19] kbuild: Remove GCC minimal function alignment
Subject: [PATCH 03/18] kbuild: Remove GCC minimal function alignment
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
@@ -12,7 +12,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/Makefile
+++ b/Makefile
@@ -981,15 +981,8 @@ export CC_FLAGS_FPU
@@ -996,15 +996,8 @@ export CC_FLAGS_FPU
export CC_FLAGS_NO_FPU
ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0)
@@ -30,7 +30,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
NOSTDINC_FLAGS += -nostdinc
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1628,18 +1628,6 @@ config FUNCTION_ALIGNMENT
@@ -1667,18 +1667,6 @@ config FUNCTION_ALIGNMENT
default 4 if FUNCTION_ALIGNMENT_4B
default 0

View File

@@ -1,7 +1,7 @@
From e98005253085b5a00881c085fab388a4742e700b Mon Sep 17 00:00:00 2001
From 43c0eb6ded02d18daa26e0186ae2f92bec5bfb8f Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Thu, 11 May 2023 19:41:41 +0000
Subject: [PATCH 05/19] XANMOD: fair: Set scheduler tunable latencies to
Subject: [PATCH 04/18] XANMOD: fair: Set scheduler tunable latencies to
unscaled
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From 07341955b471371f5414f94814c49289de9319cf Mon Sep 17 00:00:00 2001
From b20c46d59b4102165248167bd5911c2d695679cc Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Sun, 15 Sep 2024 23:03:38 +0000
Subject: [PATCH 06/19] XANMOD: sched: Add yield_type sysctl to reduce or
Subject: [PATCH 05/18] XANMOD: sched: Add yield_type sysctl to reduce or
disable sched_yield
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
@@ -12,7 +12,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/kernel/sched/syscalls.c
+++ b/kernel/sched/syscalls.c
@@ -1457,15 +1457,29 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t
@@ -1391,15 +1391,29 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t
return ret;
}

View File

@@ -1,7 +1,7 @@
From 9d6ba825d8c8635e217f7596fb4401c9ef9d408a Mon Sep 17 00:00:00 2001
From d23f0554f1b381f082dc81a6f3c523b90043b941 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Wed, 11 May 2022 18:56:51 +0000
Subject: [PATCH 07/19] XANMOD: block/mq-deadline: Increase write priority to
Subject: [PATCH 06/18] XANMOD: block/mq-deadline: Increase write priority to
improve responsiveness
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From f4b45e0e5444254caf5992cde662236867ac388b Mon Sep 17 00:00:00 2001
From 8c3035b22be106d8659d85c2651e589f53e89cc5 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Thu, 6 Jan 2022 16:59:01 +0000
Subject: [PATCH 08/19] XANMOD: block/mq-deadline: Disable front_merges by
Subject: [PATCH 07/18] XANMOD: block/mq-deadline: Disable front_merges by
default
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From 08580ad4d8ffb10cb30a228361d2d914a1502e3c Mon Sep 17 00:00:00 2001
From 3d1e3f450e9ca926a899a0502fd34df6d483efae Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 16 Sep 2024 15:36:01 +0000
Subject: [PATCH 09/19] XANMOD: block: Set rq_affinity to force complete I/O
Subject: [PATCH 08/18] XANMOD: block: Set rq_affinity to force complete I/O
requests on same CPU
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From 278088038e8259faf193e23ac16b48b0350da6fb Mon Sep 17 00:00:00 2001
From 80e2bd58a4f13d1a946c6616e18d124b1291f2a7 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 15 Jul 2024 04:50:34 +0000
Subject: [PATCH 10/19] XANMOD: blk-wbt: Set wbt_default_latency_nsec() to
Subject: [PATCH 09/18] XANMOD: blk-wbt: Set wbt_default_latency_nsec() to
2msec
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From 1637fbf551572f4578ed5644ae485b8da659b509 Mon Sep 17 00:00:00 2001
From 74767b639b4e9141b1961764655111a4fd62a5ab Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 29 Jan 2018 17:26:15 +0000
Subject: [PATCH 11/19] XANMOD: kconfig: add 500Hz timer interrupt kernel
Subject: [PATCH 10/18] XANMOD: kconfig: add 500Hz timer interrupt kernel
config option
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From 53a8dc8afb62674acc347ac7d9ebb46338ab7d64 Mon Sep 17 00:00:00 2001
From a047058c64e9d75db8e714a8c1202057920e21c7 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 29 Jan 2018 16:59:22 +0000
Subject: [PATCH 12/19] XANMOD: dcache: cache_pressure = 50 decreases the rate
Subject: [PATCH 11/18] XANMOD: dcache: cache_pressure = 50 decreases the rate
at which VFS caches are reclaimed
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -0,0 +1,48 @@
From 910bd8c627ea16ea9bcf70c153197aaba473b6b9 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Sun, 28 Apr 2024 09:06:54 +0000
Subject: [PATCH 12/18] XANMOD: mm: Raise max_map_count default value
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
Documentation/admin-guide/sysctl/vm.rst | 2 +-
include/linux/mm.h | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
--- a/Documentation/admin-guide/sysctl/vm.rst
+++ b/Documentation/admin-guide/sysctl/vm.rst
@@ -461,7 +461,7 @@ While most applications need less than a
programs, particularly malloc debuggers, may consume lots of them,
e.g., up to one or two maps per allocation.
-The default value is 65530.
+The XanMod default value is 2147483642.
mem_profiling
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -191,17 +191,18 @@ static inline void __mm_zero_struct_page
*
* When a program's coredump is generated as ELF format, a section is created
* per a vma. In ELF, the number of sections is represented in unsigned short.
- * This means the number of sections should be smaller than 65535 at coredump.
+ * This means the number of sections should be smaller than 2147483647 at
+ * coredump.
* Because the kernel adds some informative sections to a image of program at
* generating coredump, we need some margin. The number of extra sections is
* 1-3 now and depends on arch. We use "5" as safe margin, here.
*
- * ELF extended numbering allows more than 65535 sections, so 16-bit bound is
- * not a hard limit any more. Although some userspace tools can be surprised by
- * that.
+ * ELF extended numbering allows more than 2147483647 sections, so 16-bit bound
+ * is not a hard limit any more. Although some userspace tools can be surprised
+ * by that.
*/
#define MAPCOUNT_ELF_CORE_MARGIN (5)
-#define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
+#define DEFAULT_MAX_MAP_COUNT (INT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
extern int sysctl_max_map_count;

View File

@@ -1,7 +1,7 @@
From 73df371934a8b28f57030858965f6869c3705836 Mon Sep 17 00:00:00 2001
From 1ad86d993666c2d74ed6fd97e143b073e4b2c4c9 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Wed, 14 Aug 2024 18:54:53 +0000
Subject: [PATCH 14/19] XANMOD: mm/vmscan: Set minimum amount of swapping
Subject: [PATCH 13/18] XANMOD: mm/vmscan: Set minimum amount of swapping
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---

View File

@@ -1,7 +1,7 @@
From 8b42012dc4aa0008ad10cf7575f684ebc3a587cf Mon Sep 17 00:00:00 2001
From a24ca4c968092cf419821aaaa57b070c088e74e7 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Wed, 15 Jun 2022 17:07:29 +0000
Subject: [PATCH 15/19] XANMOD: sched/autogroup: Add kernel parameter and
Subject: [PATCH 14/18] XANMOD: sched/autogroup: Add kernel parameter and
config option to enable/disable autogroup feature by default
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
@@ -13,7 +13,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -493,6 +493,10 @@
@@ -498,6 +498,10 @@
Format: <int> (must be >=0)
Default: 64
@@ -24,7 +24,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
bau= [X86_UV] Enable the BAU on SGI UV. The default
behavior is to disable the BAU (i.e. bau=0).
Format: { "0" | "1" }
@@ -3835,8 +3839,6 @@
@@ -3881,8 +3885,6 @@
noapic [SMP,APIC,EARLY] Tells the kernel to not make use of any
IOAPICs that may be present in the system.
@@ -35,7 +35,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
no_console_suspend
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1318,6 +1318,18 @@ config SCHED_AUTOGROUP
@@ -1353,6 +1353,18 @@ config SCHED_AUTOGROUP
desktop applications. Task group autogeneration is currently based
upon task session.

View File

@@ -1,7 +1,7 @@
From f41037c4ee33dd201c1750727daa390a3f652516 Mon Sep 17 00:00:00 2001
From 4664b97efde786ff28f2eb234c1d59c9da30c3b4 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Tue, 31 Mar 2020 13:32:08 -0300
Subject: [PATCH 16/19] XANMOD: cpufreq: tunes ondemand and conservative
Subject: [PATCH 15/18] XANMOD: cpufreq: tunes ondemand and conservative
governor for performance
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From 000614733021b6723cfd78a4908b9b2e869ea001 Mon Sep 17 00:00:00 2001
From 444f831f229a418b4865d11940b3987f55ab151f Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 16 Sep 2024 08:09:56 +0000
Subject: [PATCH 17/19] XANMOD: lib/kconfig.debug: disable default
Subject: [PATCH 16/18] XANMOD: lib/kconfig.debug: disable default
SYMBOLIC_ERRNAME and DEBUG_BUGVERBOSE
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From bea9f2e6b80582dc36b5693e08633546b14b2a4e Mon Sep 17 00:00:00 2001
From 3536b212b829712a928b03cf513f3da87e15b3ef Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Sun, 29 May 2022 00:57:40 +0000
Subject: [PATCH 18/19] XANMOD: scripts/setlocalversion: remove "+" tag for git
Subject: [PATCH 17/18] XANMOD: scripts/setlocalversion: remove "+" tag for git
repo short version
Signed-off-by: Alexandre Frade <kernel@xanmod.org>

View File

@@ -1,7 +1,7 @@
From eb42d6c8411f9a70472e6f3632051e2e44910843 Mon Sep 17 00:00:00 2001
From 857de795e16a927cf251e5ede247b6e96938916e Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 24 Apr 2023 04:50:34 +0000
Subject: [PATCH 19/19] XANMOD: scripts/setlocalversion: Move localversion*
Subject: [PATCH 18/18] XANMOD: scripts/setlocalversion: Move localversion*
files to the end
Signed-off-by: Alexandre Frade <kernel@xanmod.org>