Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8b38f51
ZEN: PCI: Add Intel remapped NVMe device support
dsd Jun 4, 2019
ebc8300
ZEN: Disable stack conservation for GCC
kerneltoast Mar 8, 2020
32199ce
ZEN: arch/x86: Disable AVX2 and tree vectorization
damentz Mar 4, 2023
a792cf2
ZEN: Initialize ata before graphics
fenrus75 Jun 3, 2016
b719954
ZEN: Input: evdev - use call_rcu when detaching client
kennylevinsen Dec 27, 2020
b8bff9c
ZEN: Set default max map count to (INT_MAX - 5)
damentz Apr 27, 2023
00fb321
ZEN: mm: Stop kswapd early when nothing's waiting for it to free pages
kerneltoast Apr 20, 2020
29b9083
ZEN: ahci: Disable staggered spinup by default
EXtremeExploit Nov 29, 2024
8c67bdf
ZEN: INTERACTIVE: Base config item
heftig Jan 27, 2020
7a2aa2b
ZEN: INTERACTIVE: Use BFQ as the elevator for SQ devices
heftig Jan 27, 2020
816b23e
block: Clean up elevator_set_default
heftig Aug 2, 2025
2d79b82
ZEN: INTERACTIVE: Use Kyber as the elevator for MQ devices
heftig Dec 11, 2022
401c8c7
ZEN: INTERACTIVE: Enable background reclaim of hugepages
heftig Jan 27, 2020
8ab08df
ZEN: INTERACTIVE: Tune EEVDF for interactivity
heftig Oct 31, 2023
36bf8a0
ZEN: INTERACTIVE: Tune ondemand governor for interactivity
heftig Jan 27, 2020
cc2af15
ZEN: INTERACTIVE: mm: Disable unevictable compaction
damentz Mar 5, 2022
a06be6e
ZEN: INTERACTIVE: mm: Disable watermark boosting by default
kerneltoast Mar 28, 2020
11b8bf5
ZEN: INTERACTIVE: mm/swap: Disable swap-in readahead
damentz Sep 5, 2022
fbb8433
BORE scheduler 6.18 from CachyOS
sirlucjan Nov 28, 2025
ebe05f4
sched/fair: Prefer full-idle SMT cores
arighi Apr 11, 2025
61fe0ea
Make threaded IRQs optionally the default which can be disabled.
ckolivas Dec 7, 2016
c02e4ba
futex: Add entry point for FUTEX_WAIT_MULTIPLE (opcode 31)
andrealmeid Oct 25, 2021
20aa2cc
mm: Support soft dirty flag read with reset.
May 7, 2020
324549f
mm: Support soft dirty flag reset for VA range.
May 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1067,11 +1067,6 @@ KBUILD_CFLAGS += -fno-strict-overflow
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
KBUILD_CFLAGS += -fno-stack-check

# conserve stack if available
ifdef CONFIG_CC_IS_GCC
KBUILD_CFLAGS += -fconserve-stack
endif

# Ensure compilers do not transform certain loops into calls to wcslen()
KBUILD_CFLAGS += -fno-builtin-wcslen

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export BITS
#
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
#
KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-sse4a
KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-sse4a -mno-avx2 -fno-tree-vectorize
KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2

Expand Down
6 changes: 6 additions & 0 deletions arch/x86/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct pci_sysdata {
#if IS_ENABLED(CONFIG_VMD)
struct pci_dev *vmd_dev; /* VMD Device if in Intel VMD domain */
#endif
struct pci_dev *nvme_remap_dev; /* AHCI Device if NVME remapped bus */
};

extern int pci_routeirq;
Expand Down Expand Up @@ -69,6 +70,11 @@ static inline bool is_vmd(struct pci_bus *bus)
#define is_vmd(bus) false
#endif /* CONFIG_VMD */

static inline bool is_nvme_remap(struct pci_bus *bus)
{
return to_pci_sysdata(bus)->nvme_remap_dev != NULL;
}

/* Can be used to override the logic in pci_scan_bus for skipping
already-configured bus numbers - to be used for buggy BIOSes
or architectures with incomplete PCI setup by the loader */
Expand Down
7 changes: 5 additions & 2 deletions arch/x86/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,12 +723,15 @@ int pci_ext_cfg_avail(void)
return 0;
}

#if IS_ENABLED(CONFIG_VMD)
struct pci_dev *pci_real_dma_dev(struct pci_dev *dev)
{
#if IS_ENABLED(CONFIG_VMD)
if (is_vmd(dev->bus))
return to_pci_sysdata(dev->bus)->vmd_dev;
#endif

if (is_nvme_remap(dev->bus))
return to_pci_sysdata(dev->bus)->nvme_remap_dev;

return dev;
}
#endif
23 changes: 16 additions & 7 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,11 @@ void elv_update_nr_hw_queues(struct request_queue *q, struct elevator_type *e,
void elevator_set_default(struct request_queue *q)
{
struct elv_change_ctx ctx = {
#if defined(CONFIG_ZEN_INTERACTIVE) && defined(CONFIG_IOSCHED_BFQ)
.name = "bfq",
#else
.name = "mq-deadline",
#endif
.no_uevent = true,
};
int err;
Expand All @@ -758,17 +762,22 @@ void elevator_set_default(struct request_queue *q)
* have multiple queues or mq-deadline is not available, default
* to "none".
*/
if (q->nr_hw_queues != 1 && !blk_mq_is_shared_tags(q->tag_set->flags))
#if defined(CONFIG_ZEN_INTERACTIVE) && defined(CONFIG_MQ_IOSCHED_KYBER)
ctx.name = "kyber";
#else
return;
#endif

e = elevator_find_get(ctx.name);
if (!e)
return;

if ((q->nr_hw_queues == 1 ||
blk_mq_is_shared_tags(q->tag_set->flags))) {
err = elevator_change(q, &ctx);
if (err < 0)
pr_warn("\"%s\" elevator initialization, failed %d, falling back to \"none\"\n",
ctx.name, err);
}
err = elevator_change(q, &ctx);
if (err < 0)
pr_warn("\"%s\" elevator initialization, failed %d, falling back to \"none\"\n",
ctx.name, err);

elevator_put(e);
}

Expand Down
13 changes: 7 additions & 6 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,8 @@ obj-y += char/
# iommu/ comes before gpu as gpu are using iommu controllers
obj-y += iommu/

# gpu/ comes after char for AGP vs DRM startup and after iommu
obj-y += gpu/

obj-$(CONFIG_CONNECTOR) += connector/

# i810fb depends on char/agp/
obj-$(CONFIG_FB_I810) += video/fbdev/i810/

obj-$(CONFIG_PARPORT) += parport/
obj-y += base/ block/ misc/ mfd/ nfc/
obj-$(CONFIG_LIBNVDIMM) += nvdimm/
Expand All @@ -83,6 +77,13 @@ obj-y += macintosh/
obj-y += scsi/
obj-y += nvme/
obj-$(CONFIG_ATA) += ata/

# gpu/ comes after char for AGP vs DRM startup and after iommu
obj-y += gpu/

# i810fb depends on char/agp/
obj-$(CONFIG_FB_I810) += video/fbdev/i810/

obj-$(CONFIG_TARGET_CORE) += target/
obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_SPI) += spi/
Expand Down
23 changes: 9 additions & 14 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ static irqreturn_t ahci_thunderx_irq_handler(int irq, void *dev_instance)
}
#endif

static void ahci_remap_check(struct pci_dev *pdev, int bar,
static int ahci_remap_check(struct pci_dev *pdev, int bar,
struct ahci_host_priv *hpriv)
{
int i;
Expand All @@ -1685,7 +1685,7 @@ static void ahci_remap_check(struct pci_dev *pdev, int bar,
pci_resource_len(pdev, bar) < SZ_512K ||
bar != AHCI_PCI_BAR_STANDARD ||
!(readl(hpriv->mmio + AHCI_VSCAP) & 1))
return;
return 0;

cap = readq(hpriv->mmio + AHCI_REMAP_CAP);
for (i = 0; i < AHCI_MAX_REMAP; i++) {
Expand All @@ -1700,18 +1700,11 @@ static void ahci_remap_check(struct pci_dev *pdev, int bar,
}

if (!hpriv->remapped_nvme)
return;

dev_warn(&pdev->dev, "Found %u remapped NVMe devices.\n",
hpriv->remapped_nvme);
dev_warn(&pdev->dev,
"Switch your BIOS from RAID to AHCI mode to use them.\n");
return 0;

/*
* Don't rely on the msi-x capability in the remap case,
* share the legacy interrupt across ahci and remapped devices.
*/
hpriv->flags |= AHCI_HFLAG_NO_MSI;
/* Abort probe, allowing intel-nvme-remap to step in when available */
dev_info(&pdev->dev, "Device will be handled by intel-nvme-remap.\n");
return -ENODEV;
}

static int ahci_get_irq_vector(struct ata_host *host, int port)
Expand Down Expand Up @@ -1975,7 +1968,9 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENOMEM;

/* detect remapped nvme devices */
ahci_remap_check(pdev, ahci_pci_bar, hpriv);
rc = ahci_remap_check(pdev, ahci_pci_bar, hpriv);
if (rc)
return rc;

sysfs_add_file_to_group(&pdev->dev.kobj,
&dev_attr_remapped_nvme.attr,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/libahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "libata.h"

static int ahci_skip_host_reset;
int ahci_ignore_sss;
int ahci_ignore_sss = 1;
EXPORT_SYMBOL_GPL(ahci_ignore_sss);

module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444);
Expand Down
8 changes: 7 additions & 1 deletion drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
#include "cpufreq_ondemand.h"

/* On-demand governor macros */
#if defined(CONFIG_ZEN_INTERACTIVE)
#define DEF_FREQUENCY_UP_THRESHOLD (55)
#define MICRO_FREQUENCY_UP_THRESHOLD (60)
#define DEF_SAMPLING_DOWN_FACTOR (5)
#else
#define DEF_FREQUENCY_UP_THRESHOLD (80)
#define MICRO_FREQUENCY_UP_THRESHOLD (95)
#define DEF_SAMPLING_DOWN_FACTOR (1)
#endif
#define MAX_SAMPLING_DOWN_FACTOR (100000)
#define MICRO_FREQUENCY_UP_THRESHOLD (95)
#define MIN_FREQUENCY_UP_THRESHOLD (1)
#define MAX_FREQUENCY_UP_THRESHOLD (100)

Expand Down
19 changes: 11 additions & 8 deletions drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct evdev_client {
struct fasync_struct *fasync;
struct evdev *evdev;
struct list_head node;
struct rcu_head rcu;
enum input_clock_type clk_type;
bool revoked;
unsigned long *evmasks[EV_CNT];
Expand Down Expand Up @@ -368,13 +369,22 @@ static void evdev_attach_client(struct evdev *evdev,
spin_unlock(&evdev->client_lock);
}

static void evdev_reclaim_client(struct rcu_head *rp)
{
struct evdev_client *client = container_of(rp, struct evdev_client, rcu);
unsigned int i;
for (i = 0; i < EV_CNT; ++i)
bitmap_free(client->evmasks[i]);
kvfree(client);
}

static void evdev_detach_client(struct evdev *evdev,
struct evdev_client *client)
{
spin_lock(&evdev->client_lock);
list_del_rcu(&client->node);
spin_unlock(&evdev->client_lock);
synchronize_rcu();
call_rcu(&client->rcu, evdev_reclaim_client);
}

static int evdev_open_device(struct evdev *evdev)
Expand Down Expand Up @@ -427,7 +437,6 @@ static int evdev_release(struct inode *inode, struct file *file)
{
struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev;
unsigned int i;

mutex_lock(&evdev->mutex);

Expand All @@ -439,11 +448,6 @@ static int evdev_release(struct inode *inode, struct file *file)

evdev_detach_client(evdev, client);

for (i = 0; i < EV_CNT; ++i)
bitmap_free(client->evmasks[i]);

kvfree(client);

evdev_close_device(evdev);

return 0;
Expand Down Expand Up @@ -486,7 +490,6 @@ static int evdev_open(struct inode *inode, struct file *file)

err_free_client:
evdev_detach_client(evdev, client);
kvfree(client);
return error;
}

Expand Down
6 changes: 6 additions & 0 deletions drivers/pci/controller/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
ifdef CONFIG_X86_64
ifdef CONFIG_SATA_AHCI
obj-y += intel-nvme-remap.o
endif
endif

obj-$(CONFIG_PCIE_CADENCE) += cadence/
obj-$(CONFIG_PCI_FTPCI100) += pci-ftpci100.o
obj-$(CONFIG_PCI_IXP4XX) += pci-ixp4xx.o
Expand Down
Loading