mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-05 15:49:52 +08:00
Fold the 56 kernel patches into 32: one arch patch (which now includes the riscv ISA patch, parking, atomics, SMP, blocking waits, unfair spinlocks, the arm64 user ABI, pc sampling, ptrace, single-step and core dumps), each driver with its SMP part, the generic changes one per piece (the cond_resched() poll split out of the arch patch), and kw_defconfig last. The messages describe the code as it is; every patch that was kernel-wasm@localhost's is Pooya Parsa's. The tree is unchanged. kernel/build.sh patches (kernel/tools/export-patches.sh) exports the series without what changed in every later patch on each edit: no numbers in the file names (the order is the new series file, which build.sh applies), a zero commit hash, no git version signature and no index lines, with the diff options fixed.
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Pooya Parsa <pooya@pi0.io>
|
|
Date: Mon, 16 Nov 2026 16:06:57 +0000
|
|
Subject: [PATCH] mm: allow percpu-km on SMP with a flat vmalloc
|
|
|
|
An architecture whose vmalloc returns directly mapped memory
|
|
(VMALLOC_FLAT) cannot vmap() the scattered pages that percpu-vm maps
|
|
into each chunk. percpu-km allocates every chunk as one contiguous
|
|
block instead and only needs a single group, which a UMA machine
|
|
has. Let such an SMP architecture use it.
|
|
---
|
|
mm/Kconfig | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/mm/Kconfig b/mm/Kconfig
|
|
--- a/mm/Kconfig
|
|
+++ b/mm/Kconfig
|
|
@@ -1041,10 +1041,12 @@ config VMALLOC_FLAT
|
|
bool
|
|
|
|
#
|
|
-# UP and nommu archs use km based percpu allocator
|
|
+# UP and nommu archs use km based percpu allocator, and so do SMP archs
|
|
+# whose vmalloc returns directly mapped memory (VMALLOC_FLAT), which cannot
|
|
+# vmap() the scattered pages percpu-vm needs
|
|
#
|
|
config NEED_PER_CPU_KM
|
|
- depends on !SMP || !MMU
|
|
+ depends on !SMP || !MMU || VMALLOC_FLAT
|
|
bool
|
|
default y
|
|
|