summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2021-09-14 13:14:10 -0400
committergraysky2021-09-14 13:14:10 -0400
commit92475bb0b0563a5f95697b148a6282fa0be1fb13 (patch)
tree36f533419bc9dad4aeee918bab8aa07a9f09275a
parent5d507d1ae41b0080c388e2fe3fdd9bf1e3d026d3 (diff)
downloadaur-92475bb0b0563a5f95697b148a6282fa0be1fb13.tar.gz
Update to 5.14.3-1
-rw-r--r--.SRCINFO36
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch34
-rw-r--r--0002-Bluetooth-Move-shutdown-callback-before-flushing-tx-.patch76
-rw-r--r--0002-x86-setup-Consolidate-early-memory-reservations.patch188
-rw-r--r--0003-watchdog-iTCO_wdt-Fix-detection-of-SMI-off-case.patch42
-rw-r--r--0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch67
-rw-r--r--0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch87
-rw-r--r--0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch170
-rw-r--r--0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch114
-rw-r--r--0007-x86-crash-remove-crash_reserve_low_1M.patch58
-rw-r--r--PKGBUILD53
11 files changed, 175 insertions, 750 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e7d76d98a974..b34fac2fd248 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-ck
- pkgver = 5.12.19
+ pkgver = 5.14.3
pkgrel = 1
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = x86_64
@@ -12,35 +12,27 @@ pkgbase = linux-ck
makedepends = tar
makedepends = xz
options = !strip
- source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.12.19.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.12.19.tar.sign
+ source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.14.3.tar.xz
+ source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.14.3.tar.sign
source = config
- source = more-uarches-20210610.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20210610.tar.gz
- source = http://ck.kolivas.org/patches/5.0/5.12/5.12-ck1/patch-5.12-ck1.xz
+ source = more-uarches-20210818.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20210818.tar.gz
+ source = xanmod-patches-from-ck-e2d48df5def86f498766b22e836a9c2f1bcb3809.tar.gz::https://github.com/xanmod/linux-patches/archive/e2d48df5def86f498766b22e836a9c2f1bcb3809.tar.gz
source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
- source = 0002-x86-setup-Consolidate-early-memory-reservations.patch
- source = 0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch
- source = 0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch
- source = 0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch
- source = 0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch
- source = 0007-x86-crash-remove-crash_reserve_low_1M.patch
+ source = 0002-Bluetooth-Move-shutdown-callback-before-flushing-tx-.patch
+ source = 0003-watchdog-iTCO_wdt-Fix-detection-of-SMI-off-case.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
- b2sums = 88e4c32cf196662a6a24e72b978019d6f8881a8523918029f4229a995c5fd957a5e01f42de9f53c7980df7e3de5ea6b069cc2c5f93852e615fe8fe78a1b131c6
+ b2sums = c4d2bcffe7149f66e37d05f7c13ebfe59263e7474a6f536317cc092eb9d7e917651059edaf71b26022310c67c1f2f017b2147e53bebcbfcc3f2c92dc6213a721
b2sums = SKIP
b2sums = e7b85b8015414c2405c35f811cc3d201e10fb717e94f4c54c921d4a51dafcd61a2ac61695cf4ad5f51a2dcf5fda0558d99a896ec6478f47e7577c7207a4f7a94
- b2sums = 30d1df754608bb423cbc99c2097ad521baa091b9a3b39df4bd5c2d50c57eec54d8fa0e4a4a04b847c3d1b87ba682cadc8db45fabeefdc9ad7caaf8e77b96e41a
- b2sums = c9f729ba1efe6f04e7b2c57d3999bc9675b577596dccb2f227e5b6e444285e1fdd270bf67c0fcf9f5808a4c3a4b1c7a5c13a76f754ad9b9447243ccbaf2ce6a3
- b2sums = 2aa7bbea8e526ad080f4fbeef3364749b070e3d0b38f1b724a40796d455452f2c9865c96a25e52edcc8c827ce4dc3046db3cbbb858e899b9dd502673244b05c8
- b2sums = c8a372bdb918ecc8faeb203df3945c664d59bd61864952ea5e354bf6cef6e546f3c548e26887a718d34e51753fad603a2bf10d579f8d5ba9303a7ddfe57ada4e
- b2sums = b349cc801b7435a0772dafcefe4c350c925783a2fec96f56fb8b4298adbc494c295900e00498fd15894c6a778b67663743d2b2fe236765b2c65ec643d928b59d
- b2sums = 10efc6f5460b9397b9bb3369bd3e94883682806d77c0efb0e322034f8b4b422ab10d5e975fb2df8a3c12ed2ec5d0a36f795614e928224864178d7ef25e59638b
- b2sums = 14d6df3f80495d7c63f191a4cc2e42ab7fd27b1368f18c71e1d0f5230c9bfa0958c73c940bacf7f5073ed4288bbb846e1c2903b441e4171c8ea8171ce5d56e45
- b2sums = abe1754b1c16e2e6a6c369f6497a6679f5e846ad9652d2d019425bfe5fa1186c1e75f46790ba15a227982abc61469e7423b3eee30e3dc56a631a5d36e3ecbffa
- b2sums = ed1dc0f7e4f97969185de71b8f26c321359e06855d3c3b2ac3fccf2d1cdae121feb70fc5a6546c63d2ca0ce3ef21d510a40e4077262715d53165a1b236119788
+ b2sums = 5a191fb995303be264e8721318622bee1d1a3822f805ddf21c1002817ca2e144d6d17e1337f37b32dc3aca1a8754e4354a800c1b4d44417aea0acaf326533b35
+ b2sums = bd20774ee2c9856601af2c89a3af95c6abc812b71253368090e9c252edcce452f416bfeed54ced0886d401b5a9e1cb72c16ea5f04a72d8ded596c0d083f80e42
+ b2sums = 5ed452cf76c91af71db83c138556480fe06b54b8c342d3428bea565861709aa85884f2ded9b60d4c0b29a982da89b987134d829fa73484d02ebaaf55ede53875
+ b2sums = 81ca359fe4cf6d1a0c9eba0bb92ca75f71d7887b76b5689467372fe3cf8e57446125f0a6b3d0219efeeed1b31fa749efc75379cc275af0e5501637865e42ba00
+ b2sums = 5209f8331ea8114df6f8d7a916df5eaa16e30c9fa8ffd72da2bcb56f0d4f81a89aec2143009c8b642002fa4c999595006185ccaecbfbaeceb632f144c3decf04
pkgname = linux-ck
- pkgdesc = The Linux-ck kernel and modules with the ck1 patchset featuring MuQSS CPU scheduler
+ pkgdesc = The Linux-ck kernel and modules with ck's hrtimer patches
depends = coreutils
depends = kmod
depends = initramfs
diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
index 8a39e8690250..123d36531914 100644
--- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
@@ -1,7 +1,7 @@
-From 37b5b75497cd7fb1bcc544ecbfc124c14f3d5983 Mon Sep 17 00:00:00 2001
+From 33cd1eaa66fe7e6752fca93682f522c77b6924ed Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Mon, 16 Sep 2019 04:53:20 +0200
-Subject: [PATCH 1/8] ZEN: Add sysctl and CONFIG to disallow unprivileged
+Subject: [PATCH 1/4] ZEN: Add sysctl and CONFIG to disallow unprivileged
CLONE_NEWUSER
Our default behavior continues to match the vanilla kernel.
@@ -14,10 +14,10 @@ Our default behavior continues to match the vanilla kernel.
5 files changed, 53 insertions(+)
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
-index f6c5f784be5a..07d194f23587 100644
+index eb70cabe6e7f..dda54e3bc47c 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
-@@ -108,6 +108,8 @@ void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
+@@ -137,6 +137,8 @@ static inline void set_rlimit_ucount_max(struct user_namespace *ns,
#ifdef CONFIG_USER_NS
@@ -26,7 +26,7 @@ index f6c5f784be5a..07d194f23587 100644
static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
{
if (ns)
-@@ -141,6 +143,8 @@ extern bool current_in_userns(const struct user_namespace *target_ns);
+@@ -170,6 +172,8 @@ extern bool current_in_userns(const struct user_namespace *target_ns);
struct ns_common *ns_get_owner(struct ns_common *ns);
#else
@@ -36,10 +36,10 @@ index f6c5f784be5a..07d194f23587 100644
{
return &init_user_ns;
diff --git a/init/Kconfig b/init/Kconfig
-index 5f5c776ef192..afd708ed0241 100644
+index 55f9f7738ebb..33c6a820ac08 100644
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1177,6 +1177,22 @@ config USER_NS
+@@ -1198,6 +1198,22 @@ config USER_NS
If unsure, say N.
@@ -63,12 +63,12 @@ index 5f5c776ef192..afd708ed0241 100644
bool "PID Namespaces"
default y
diff --git a/kernel/fork.c b/kernel/fork.c
-index 426cd0c51f9e..e83a79860d58 100644
+index 44f4c2d83763..7d4e04e18eef 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
-@@ -97,6 +97,10 @@
- #include <linux/scs.h>
+@@ -98,6 +98,10 @@
#include <linux/io_uring.h>
+ #include <linux/bpf.h>
+#ifdef CONFIG_USER_NS
+#include <linux/user_namespace.h>
@@ -77,7 +77,7 @@ index 426cd0c51f9e..e83a79860d58 100644
#include <asm/pgalloc.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
-@@ -1872,6 +1876,10 @@ static __latent_entropy struct task_struct *copy_process(
+@@ -1876,6 +1880,10 @@ static __latent_entropy struct task_struct *copy_process(
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
return ERR_PTR(-EINVAL);
@@ -88,7 +88,7 @@ index 426cd0c51f9e..e83a79860d58 100644
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
-@@ -2971,6 +2979,12 @@ int ksys_unshare(unsigned long unshare_flags)
+@@ -2980,6 +2988,12 @@ int ksys_unshare(unsigned long unshare_flags)
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
@@ -102,10 +102,10 @@ index 426cd0c51f9e..e83a79860d58 100644
if (err)
goto bad_unshare_out;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index 62fbd09b5dc1..01192edd25f3 100644
+index 272f4a272f8c..760e8a2d815d 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
-@@ -103,6 +103,9 @@
+@@ -105,6 +105,9 @@
#ifdef CONFIG_LOCKUP_DETECTOR
#include <linux/nmi.h>
#endif
@@ -115,7 +115,7 @@ index 62fbd09b5dc1..01192edd25f3 100644
#if defined(CONFIG_SYSCTL)
-@@ -1902,6 +1905,15 @@ static struct ctl_table kern_table[] = {
+@@ -1908,6 +1911,15 @@ static struct ctl_table kern_table[] = {
.proc_handler = proc_dointvec,
},
#endif
@@ -132,7 +132,7 @@ index 62fbd09b5dc1..01192edd25f3 100644
{
.procname = "tainted",
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
-index 9a4b980d695b..4388ca13ea3f 100644
+index ef82d401dde8..5a6c2e07174b 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -21,6 +21,13 @@
@@ -150,5 +150,5 @@ index 9a4b980d695b..4388ca13ea3f 100644
static DEFINE_MUTEX(userns_state_mutex);
--
-2.32.0
+2.33.0
diff --git a/0002-Bluetooth-Move-shutdown-callback-before-flushing-tx-.patch b/0002-Bluetooth-Move-shutdown-callback-before-flushing-tx-.patch
new file mode 100644
index 000000000000..0b8fdc7bee19
--- /dev/null
+++ b/0002-Bluetooth-Move-shutdown-callback-before-flushing-tx-.patch
@@ -0,0 +1,76 @@
+From d3fc3f9b76dc50e11a4c68d408221d51d175bf89 Mon Sep 17 00:00:00 2001
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Date: Tue, 10 Aug 2021 12:53:15 +0800
+Subject: [PATCH 2/4] Bluetooth: Move shutdown callback before flushing tx and
+ rx queue
+
+Commit 0ea9fd001a14 ("Bluetooth: Shutdown controller after workqueues
+are flushed or cancelled") introduced a regression that makes mtkbtsdio
+driver stops working:
+[ 36.593956] Bluetooth: hci0: Firmware already downloaded
+[ 46.814613] Bluetooth: hci0: Execution of wmt command timed out
+[ 46.814619] Bluetooth: hci0: Failed to send wmt func ctrl (-110)
+
+The shutdown callback depends on the result of hdev->rx_work, so we
+should call it before flushing rx_work:
+-> btmtksdio_shutdown()
+ -> mtk_hci_wmt_sync()
+ -> __hci_cmd_send()
+ -> wait for BTMTKSDIO_TX_WAIT_VND_EVT gets cleared
+
+-> btmtksdio_recv_event()
+ -> hci_recv_frame()
+ -> queue_work(hdev->workqueue, &hdev->rx_work)
+ -> clears BTMTKSDIO_TX_WAIT_VND_EVT
+
+So move the shutdown callback before flushing TX/RX queue to resolve the
+issue.
+
+Reported-and-tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
+Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Fixes: 0ea9fd001a14 ("Bluetooth: Shutdown controller after workqueues are flushed or cancelled")
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Fixes: https://bugs.archlinux.org/task/72032
+---
+ net/bluetooth/hci_core.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
+index e1a545c8a69f..2331612839d7 100644
+--- a/net/bluetooth/hci_core.c
++++ b/net/bluetooth/hci_core.c
+@@ -1727,6 +1727,14 @@ int hci_dev_do_close(struct hci_dev *hdev)
+ hci_request_cancel_all(hdev);
+ hci_req_sync_lock(hdev);
+
++ if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
++ !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
++ test_bit(HCI_UP, &hdev->flags)) {
++ /* Execute vendor specific shutdown routine */
++ if (hdev->shutdown)
++ hdev->shutdown(hdev);
++ }
++
+ if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
+ cancel_delayed_work_sync(&hdev->cmd_timer);
+ hci_req_sync_unlock(hdev);
+@@ -1798,14 +1806,6 @@ int hci_dev_do_close(struct hci_dev *hdev)
+ clear_bit(HCI_INIT, &hdev->flags);
+ }
+
+- if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
+- !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
+- test_bit(HCI_UP, &hdev->flags)) {
+- /* Execute vendor specific shutdown routine */
+- if (hdev->shutdown)
+- hdev->shutdown(hdev);
+- }
+-
+ /* flush cmd work */
+ flush_work(&hdev->cmd_work);
+
+--
+2.33.0
+
diff --git a/0002-x86-setup-Consolidate-early-memory-reservations.patch b/0002-x86-setup-Consolidate-early-memory-reservations.patch
deleted file mode 100644
index 214bd0ec3806..000000000000
--- a/0002-x86-setup-Consolidate-early-memory-reservations.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From bb76340a8e02ef21bdd65e45a2fa319a08916ce0 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <rppt@linux.ibm.com>
-Date: Tue, 2 Mar 2021 12:04:05 +0200
-Subject: [PATCH 2/8] x86/setup: Consolidate early memory reservations
-
-The early reservations of memory areas used by the firmware, bootloader,
-kernel text and data are spread over setup_arch(). Moreover, some of them
-happen *after* memblock allocations, e.g trim_platform_memory_ranges() and
-trim_low_memory_range() are called after reserve_real_mode() that allocates
-memory.
-
-There was no corruption of these memory regions because memblock always
-allocates memory either from the end of memory (in top-down mode) or above
-the kernel image (in bottom-up mode). However, the bottom up mode is going
-to be updated to span the entire memory [1] to avoid limitations caused by
-KASLR.
-
-Consolidate early memory reservations in a dedicated function to improve
-robustness against future changes. Having the early reservations in one
-place also makes it clearer what memory must be reserved before memblock
-allocations are allowed.
-
-Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
-Signed-off-by: Borislav Petkov <bp@suse.de>
-Reviewed-by: Baoquan He <bhe@redhat.com>
-Acked-by: Borislav Petkov <bp@suse.de>
-Acked-by: David Hildenbrand <david@redhat.com>
-Link: [1] https://lore.kernel.org/lkml/20201217201214.3414100-2-guro@fb.com
-Link: https://lkml.kernel.org/r/20210302100406.22059-2-rppt@kernel.org
----
- arch/x86/kernel/setup.c | 92 ++++++++++++++++++++---------------------
- 1 file changed, 44 insertions(+), 48 deletions(-)
-
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index e79f21d13a0d..420d881da2bd 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -646,18 +646,6 @@ static void __init trim_snb_memory(void)
- }
- }
-
--/*
-- * Here we put platform-specific memory range workarounds, i.e.
-- * memory known to be corrupt or otherwise in need to be reserved on
-- * specific platforms.
-- *
-- * If this gets used more widely it could use a real dispatch mechanism.
-- */
--static void __init trim_platform_memory_ranges(void)
--{
-- trim_snb_memory();
--}
--
- static void __init trim_bios_range(void)
- {
- /*
-@@ -730,7 +718,38 @@ static void __init trim_low_memory_range(void)
- {
- memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE));
- }
--
-+
-+static void __init early_reserve_memory(void)
-+{
-+ /*
-+ * Reserve the memory occupied by the kernel between _text and
-+ * __end_of_kernel_reserve symbols. Any kernel sections after the
-+ * __end_of_kernel_reserve symbol must be explicitly reserved with a
-+ * separate memblock_reserve() or they will be discarded.
-+ */
-+ memblock_reserve(__pa_symbol(_text),
-+ (unsigned long)__end_of_kernel_reserve - (unsigned long)_text);
-+
-+ /*
-+ * Make sure page 0 is always reserved because on systems with
-+ * L1TF its contents can be leaked to user processes.
-+ */
-+ memblock_reserve(0, PAGE_SIZE);
-+
-+ early_reserve_initrd();
-+
-+ if (efi_enabled(EFI_BOOT))
-+ efi_memblock_x86_reserve_range();
-+
-+ memblock_x86_reserve_range_setup_data();
-+
-+ reserve_ibft_region();
-+ reserve_bios_regions();
-+
-+ trim_snb_memory();
-+ trim_low_memory_range();
-+}
-+
- /*
- * Dump out kernel offset information on panic.
- */
-@@ -765,29 +784,6 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
-
- void __init setup_arch(char **cmdline_p)
- {
-- /*
-- * Reserve the memory occupied by the kernel between _text and
-- * __end_of_kernel_reserve symbols. Any kernel sections after the
-- * __end_of_kernel_reserve symbol must be explicitly reserved with a
-- * separate memblock_reserve() or they will be discarded.
-- */
-- memblock_reserve(__pa_symbol(_text),
-- (unsigned long)__end_of_kernel_reserve - (unsigned long)_text);
--
-- /*
-- * Make sure page 0 is always reserved because on systems with
-- * L1TF its contents can be leaked to user processes.
-- */
-- memblock_reserve(0, PAGE_SIZE);
--
-- early_reserve_initrd();
--
-- /*
-- * At this point everything still needed from the boot loader
-- * or BIOS or kernel text should be early reserved or marked not
-- * RAM in e820. All other memory is free game.
-- */
--
- #ifdef CONFIG_X86_32
- memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
-
-@@ -911,8 +907,18 @@ void __init setup_arch(char **cmdline_p)
-
- parse_early_param();
-
-- if (efi_enabled(EFI_BOOT))
-- efi_memblock_x86_reserve_range();
-+ /*
-+ * Do some memory reservations *before* memory is added to
-+ * memblock, so memblock allocations won't overwrite it.
-+ * Do it after early param, so we could get (unlikely) panic from
-+ * serial.
-+ *
-+ * After this point everything still needed from the boot loader or
-+ * firmware or kernel text should be early reserved or marked not
-+ * RAM in e820. All other memory is free game.
-+ */
-+ early_reserve_memory();
-+
- #ifdef CONFIG_MEMORY_HOTPLUG
- /*
- * Memory used by the kernel cannot be hot-removed because Linux
-@@ -939,9 +945,6 @@ void __init setup_arch(char **cmdline_p)
-
- x86_report_nx();
-
-- /* after early param, so could get panic from serial */
-- memblock_x86_reserve_range_setup_data();
--
- if (acpi_mps_check()) {
- #ifdef CONFIG_X86_LOCAL_APIC
- disable_apic = 1;
-@@ -1033,8 +1036,6 @@ void __init setup_arch(char **cmdline_p)
- */
- find_smp_config();
-
-- reserve_ibft_region();
--
- early_alloc_pgt_buf();
-
- /*
-@@ -1055,8 +1056,6 @@ void __init setup_arch(char **cmdline_p)
- */
- sev_setup_arch();
-
-- reserve_bios_regions();
--
- efi_fake_memmap();
- efi_find_mirror();
- efi_esrt_init();
-@@ -1082,9 +1081,6 @@ void __init setup_arch(char **cmdline_p)
-
- reserve_real_mode();
-
-- trim_platform_memory_ranges();
-- trim_low_memory_range();
--
- init_mem_mapping();
-
- idt_setup_early_pf();
---
-2.32.0
-
diff --git a/0003-watchdog-iTCO_wdt-Fix-detection-of-SMI-off-case.patch b/0003-watchdog-iTCO_wdt-Fix-detection-of-SMI-off-case.patch
new file mode 100644
index 000000000000..dbc54013dfc9
--- /dev/null
+++ b/0003-watchdog-iTCO_wdt-Fix-detection-of-SMI-off-case.patch
@@ -0,0 +1,42 @@
+From 53f97d0158180e3e48173cb3a6485cf254a95f12 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Mon, 26 Jul 2021 13:46:13 +0200
+Subject: [PATCH 3/4] watchdog: iTCO_wdt: Fix detection of SMI-off case
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Obviously, the test needs to run against the register content, not its
+address.
+
+Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
+Cc: stable@vger.kernel.org
+Reported-by: Mantas Mikulėnas <grawity@gmail.com>
+Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
+Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
+Reviewed-by: Guenter Roeck <linux@roeck-us.net>
+Tested-by: Mantas Mikulėnas <grawity@gmail.com>
+Link: https://lore.kernel.org/r/d84f8e06-f646-8b43-d063-fb11f4827044@siemens.com
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
+Fixes: https://bugs.archlinux.org/task/72045 (?)
+---
+ drivers/watchdog/iTCO_wdt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
+index b3f604669e2c..643c6c2d0b72 100644
+--- a/drivers/watchdog/iTCO_wdt.c
++++ b/drivers/watchdog/iTCO_wdt.c
+@@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
+ * Otherwise, the BIOS generally reboots when the SMI triggers.
+ */
+ if (p->smi_res &&
+- (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
++ (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
+ tmrval /= 2;
+
+ /* from the specs: */
+--
+2.33.0
+
diff --git a/0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch b/0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch
deleted file mode 100644
index d401a3ec4f93..000000000000
--- a/0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From c9af5920c79bd8dd521bd6ae0c004be2737ca615 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <rppt@linux.ibm.com>
-Date: Tue, 2 Mar 2021 12:04:06 +0200
-Subject: [PATCH 3/8] x86/setup: Merge several reservations of start of memory
-
-Currently, the first several pages are reserved both to avoid leaking
-their contents on systems with L1TF and to avoid corrupting BIOS memory.
-
-Merge the two memory reservations.
-
-Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
-Signed-off-by: Borislav Petkov <bp@suse.de>
-Reviewed-by: David Hildenbrand <david@redhat.com>
-Acked-by: Borislav Petkov <bp@suse.de>
-Link: https://lkml.kernel.org/r/20210302100406.22059-3-rppt@kernel.org
----
- arch/x86/kernel/setup.c | 19 ++++++++++---------
- 1 file changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index 420d881da2bd..282d572e49af 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -714,11 +714,6 @@ static int __init parse_reservelow(char *p)
-
- early_param("reservelow", parse_reservelow);
-
--static void __init trim_low_memory_range(void)
--{
-- memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE));
--}
--
- static void __init early_reserve_memory(void)
- {
- /*
-@@ -731,10 +726,17 @@ static void __init early_reserve_memory(void)
- (unsigned long)__end_of_kernel_reserve - (unsigned long)_text);
-
- /*
-- * Make sure page 0 is always reserved because on systems with
-- * L1TF its contents can be leaked to user processes.
-+ * The first 4Kb of memory is a BIOS owned area, but generally it is
-+ * not listed as such in the E820 table.
-+ *
-+ * Reserve the first memory page and typically some additional
-+ * memory (64KiB by default) since some BIOSes are known to corrupt
-+ * low memory. See the Kconfig help text for X86_RESERVE_LOW.
-+ *
-+ * In addition, make sure page 0 is always reserved because on
-+ * systems with L1TF its contents can be leaked to user processes.
- */
-- memblock_reserve(0, PAGE_SIZE);
-+ memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE));
-
- early_reserve_initrd();
-
-@@ -747,7 +749,6 @@ static void __init early_reserve_memory(void)
- reserve_bios_regions();
-
- trim_snb_memory();
-- trim_low_memory_range();
- }
-
- /*
---
-2.32.0
-
diff --git a/0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch b/0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch
deleted file mode 100644
index 1ae1cf9ff06c..000000000000
--- a/0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 0eeb496ee17167a8d2c714c121fa518991d2ceb4 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <rppt@linux.ibm.com>
-Date: Tue, 13 Apr 2021 21:08:39 +0300
-Subject: [PATCH 4/8] x86/setup: Move trim_snb_memory() later in setup_arch()
- to fix boot hangs
-
-Commit
-
- a799c2bd29d1 ("x86/setup: Consolidate early memory reservations")
-
-moved reservation of the memory inaccessible by Sandy Bride integrated
-graphics very early, and, as a result, on systems with such devices
-the first 1M was reserved by trim_snb_memory() which prevented the
-allocation of the real mode trampoline and made the boot hang very
-early.
-
-Since the purpose of trim_snb_memory() is to prevent problematic pages
-ever reaching the graphics device, it is safe to reserve these pages
-after memblock allocations are possible.
-
-Move trim_snb_memory() later in boot so that it will be called after
-reserve_real_mode() and make comments describing trim_snb_memory()
-operation more elaborate.
-
- [ bp: Massage a bit. ]
-
-Fixes: a799c2bd29d1 ("x86/setup: Consolidate early memory reservations")
-Reported-by: Randy Dunlap <rdunlap@infradead.org>
-Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
-Signed-off-by: Borislav Petkov <bp@suse.de>
-Tested-by: Randy Dunlap <rdunlap@infradead.org>
-Tested-by: Hugh Dickins <hughd@google.com>
-Link: https://lkml.kernel.org/r/f67d3e03-af90-f790-baf4-8d412fe055af@infradead.org
----
- arch/x86/kernel/setup.c | 20 +++++++++++++++-----
- 1 file changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index 282d572e49af..7d466f51be1f 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -634,11 +634,16 @@ static void __init trim_snb_memory(void)
- printk(KERN_DEBUG "reserving inaccessible SNB gfx pages\n");
-
- /*
-- * Reserve all memory below the 1 MB mark that has not
-- * already been reserved.
-+ * SandyBridge integrated graphics devices have a bug that prevents
-+ * them from accessing certain memory ranges, namely anything below
-+ * 1M and in the pages listed in bad_pages[] above.
-+ *
-+ * To avoid these pages being ever accessed by SNB gfx devices
-+ * reserve all memory below the 1 MB mark and bad_pages that have
-+ * not already been reserved at boot time.
- */
- memblock_reserve(0, 1<<20);
--
-+
- for (i = 0; i < ARRAY_SIZE(bad_pages); i++) {
- if (memblock_reserve(bad_pages[i], PAGE_SIZE))
- printk(KERN_WARNING "failed to reserve 0x%08lx\n",
-@@ -747,8 +752,6 @@ static void __init early_reserve_memory(void)
-
- reserve_ibft_region();
- reserve_bios_regions();
--
-- trim_snb_memory();
- }
-
- /*
-@@ -1082,6 +1085,13 @@ void __init setup_arch(char **cmdline_p)
-
- reserve_real_mode();
-
-+ /*
-+ * Reserving memory causing GPU hangs on Sandy Bridge integrated
-+ * graphics devices should be done after we allocated memory under
-+ * 1M for the real mode trampoline.
-+ */
-+ trim_snb_memory();
-+
- init_mem_mapping();
-
- idt_setup_early_pf();
---
-2.32.0
-
diff --git a/0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch b/0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch
deleted file mode 100644
index 3059077f7d3b..000000000000
--- a/0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From dc0b7cf80e9d746072f1e0f6184e178b4de42952 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <rppt@linux.ibm.com>
-Date: Tue, 1 Jun 2021 10:53:52 +0300
-Subject: [PATCH 5/8] x86/setup: always reserve the first 1M of RAM
-
-There are BIOSes that are known to corrupt the memory under 1M, or more
-precisely under 640K because the memory above 640K is anyway reserved for
-the EGA/VGA frame buffer and BIOS.
-
-To prevent usage of the memory that will be potentially clobbered by the
-kernel, the beginning of the memory is always reserved. The exact size of
-the reserved area is determined by CONFIG_X86_RESERVE_LOW build time and
-reservelow command line option. The reserved range may be from 4K to 640K
-with the default of 64K. There are also configurations that reserve the
-entire 1M range, like machines with SandyBridge graphic devices or systems
-that enable crash kernel.
-
-In addition to the potentially clobbered memory, EBDA of unknown size may
-be as low as 128K and the memory above that EBDA start is also reserved
-early.
-
-It would have been possible to reserve the entire range under 1M unless for
-the real mode trampoline that must reside in that area.
-
-To accommodate placement of the real mode trampoline and keep the memory
-safe from being clobbered by BIOS reserve the first 64K of RAM before
-memory allocations are possible and then, after the real mode trampoline is
-allocated, reserve the entire range from 0 to 1M.
-
-Update trim_snb_memory() and reserve_real_mode() to avoid redundant
-reservations of the same memory range.
-
-Also make sure the memory under 1M is not getting freed by
-efi_free_boot_services().
-
-Fixes: a799c2bd29d1 ("x86/setup: Consolidate early memory reservations")
-Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
----
- arch/x86/kernel/setup.c | 35 ++++++++++++++++++++--------------
- arch/x86/platform/efi/quirks.c | 12 ++++++++++++
- arch/x86/realmode/init.c | 14 ++++++++------
- 3 files changed, 41 insertions(+), 20 deletions(-)
-
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index 7d466f51be1f..d7cfb927864f 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -638,11 +638,11 @@ static void __init trim_snb_memory(void)
- * them from accessing certain memory ranges, namely anything below
- * 1M and in the pages listed in bad_pages[] above.
- *
-- * To avoid these pages being ever accessed by SNB gfx devices
-- * reserve all memory below the 1 MB mark and bad_pages that have
-- * not already been reserved at boot time.
-+ * To avoid these pages being ever accessed by SNB gfx devices reserve
-+ * bad_pages that have not already been reserved at boot time.
-+ * All memory below the 1 MB mark is anyway reserved later during
-+ * setup_arch(), so there is no need to reserve it here.
- */
-- memblock_reserve(0, 1<<20);
-
- for (i = 0; i < ARRAY_SIZE(bad_pages); i++) {
- if (memblock_reserve(bad_pages[i], PAGE_SIZE))
-@@ -734,14 +734,14 @@ static void __init early_reserve_memory(void)
- * The first 4Kb of memory is a BIOS owned area, but generally it is
- * not listed as such in the E820 table.
- *
-- * Reserve the first memory page and typically some additional
-- * memory (64KiB by default) since some BIOSes are known to corrupt
-- * low memory. See the Kconfig help text for X86_RESERVE_LOW.
-+ * Reserve the first 64K of memory since some BIOSes are known to
-+ * corrupt low memory. After the real mode trampoline is allocated the
-+ * rest of the memory below 640k is reserved.
- *
- * In addition, make sure page 0 is always reserved because on
- * systems with L1TF its contents can be leaked to user processes.
- */
-- memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE));
-+ memblock_reserve(0, SZ_64K);
-
- early_reserve_initrd();
-
-@@ -752,6 +752,7 @@ static void __init early_reserve_memory(void)
-
- reserve_ibft_region();
- reserve_bios_regions();
-+ trim_snb_memory();
- }
-
- /*
-@@ -1083,14 +1084,20 @@ void __init setup_arch(char **cmdline_p)
- (max_pfn_mapped<<PAGE_SHIFT) - 1);
- #endif
-
-- reserve_real_mode();
--
- /*
-- * Reserving memory causing GPU hangs on Sandy Bridge integrated
-- * graphics devices should be done after we allocated memory under
-- * 1M for the real mode trampoline.
-+ * Find free memory for the real mode trampoline and place it
-+ * there.
-+ * If there is not enough free memory under 1M, on EFI-enabled
-+ * systems there will be additional attempt to reclaim the memory
-+ * for the real mode trampoline at efi_free_boot_services().
-+ *
-+ * Unconditionally reserve the entire first 1M of RAM because
-+ * BIOSes are know to corrupt low memory and several
-+ * hundred kilobytes are not worth complex detection what memory gets
-+ * clobbered. Moreover, on machines with SandyBridge graphics or in
-+ * setups that use crashkernel the entire 1M is anyway reserved.
- */
-- trim_snb_memory();
-+ reserve_real_mode();
-
- init_mem_mapping();
-
-diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
-index 67d93a243c35..27561b56a821 100644
---- a/arch/x86/platform/efi/quirks.c
-+++ b/arch/x86/platform/efi/quirks.c
-@@ -450,6 +450,18 @@ void __init efi_free_boot_services(void)
- size -= rm_size;
- }
-
-+ /*
-+ * Don't free memory under 1M for two reasons:
-+ * - BIOS might clobber it
-+ * - Crash kernel needs it to be reserved
-+ */
-+ if (start + size < SZ_1M)
-+ continue;
-+ if (start < SZ_1M) {
-+ size -= (SZ_1M - start);
-+ start = SZ_1M;
-+ }
-+
- memblock_free_late(start, size);
- }
-
-diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
-index 22fda7d99159..ea42630d4e2e 100644
---- a/arch/x86/realmode/init.c
-+++ b/arch/x86/realmode/init.c
-@@ -29,14 +29,16 @@ void __init reserve_real_mode(void)
-
- /* Has to be under 1M so we can execute real-mode AP code. */
- mem = memblock_find_in_range(0, 1<<20, size, PAGE_SIZE);
-- if (!mem) {
-+ if (!mem)
- pr_info("No sub-1M memory is available for the trampoline\n");
-- return;
-- }
-+ else
-+ set_real_mode_mem(mem);
-
-- memblock_reserve(mem, size);
-- set_real_mode_mem(mem);
-- crash_reserve_low_1M();
-+ /*
-+ * Unconditionally reserve the entire fisrt 1M, see comment in
-+ * setup_arch()
-+ */
-+ memblock_reserve(0, SZ_1M);
- }
-
- static void sme_sev_setup_real_mode(struct trampoline_header *th)
---
-2.32.0
-
diff --git a/0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch b/0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch
deleted file mode 100644
index b1b5166c384a..000000000000
--- a/0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 626944666ea063c6e05a9de501b1514a670c9a30 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <rppt@linux.ibm.com>
-Date: Tue, 1 Jun 2021 10:53:53 +0300
-Subject: [PATCH 6/8] x86/setup: remove CONFIG_X86_RESERVE_LOW and reservelow
- options
-
-The CONFIG_X86_RESERVE_LOW build time and reservelow command line option
-allowed to control the amount of memory under 1M that would be reserved at
-boot to avoid using memory that can be potentially clobbered by BIOS.
-
-Since the entire range under 1M is always reserved there is no need for
-these options and they can be removed.
-
-Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
----
- .../admin-guide/kernel-parameters.txt | 5 ----
- arch/x86/Kconfig | 29 -------------------
- arch/x86/kernel/setup.c | 24 ---------------
- 3 files changed, 58 deletions(-)
-
-diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
-index 835f810f2f26..479cc44cc4e2 100644
---- a/Documentation/admin-guide/kernel-parameters.txt
-+++ b/Documentation/admin-guide/kernel-parameters.txt
-@@ -4623,11 +4623,6 @@
- Reserves a hole at the top of the kernel virtual
- address space.
-
-- reservelow= [X86]
-- Format: nn[K]
-- Set the amount of memory to reserve for BIOS at
-- the bottom of the address space.
--
- reset_devices [KNL] Force drivers to reset the underlying device
- during initialization.
-
-diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
-index 861b1b794697..fc91be3b1bd1 100644
---- a/arch/x86/Kconfig
-+++ b/arch/x86/Kconfig
-@@ -1688,35 +1688,6 @@ config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
- Set whether the default state of memory_corruption_check is
- on or off.
-
--config X86_RESERVE_LOW
-- int "Amount of low memory, in kilobytes, to reserve for the BIOS"
-- default 64
-- range 4 640
-- help
-- Specify the amount of low memory to reserve for the BIOS.
--
-- The first page contains BIOS data structures that the kernel
-- must not use, so that page must always be reserved.
--
-- By default we reserve the first 64K of physical RAM, as a
-- number of BIOSes are known to corrupt that memory range
-- during events such as suspend/resume or monitor cable
-- insertion, so it must not be used by the kernel.
--
-- You can set this to 4 if you are absolutely sure that you
-- trust the BIOS to get all its memory reservations and usages
-- right. If you know your BIOS have problems beyond the
-- default 64K area, you can set this to 640 to avoid using the
-- entire low memory range.
--
-- If you have doubts about the BIOS (e.g. suspend/resume does
-- not work or there's kernel crashes after certain hardware
-- hotplug events) then you might want to enable
-- X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check
-- typical corruption patterns.
--
-- Leave this to the default value of 64 if you are unsure.
--
- config MATH_EMULATION
- bool
- depends on MODIFY_LDT_SYSCALL
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index d7cfb927864f..fbda4bbf75c1 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -695,30 +695,6 @@ static void __init e820_add_kernel_range(void)
- e820__range_add(start, size, E820_TYPE_RAM);
- }
-
--static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
--
--static int __init parse_reservelow(char *p)
--{
-- unsigned long long size;
--
-- if (!p)
-- return -EINVAL;
--
-- size = memparse(p, &p);
--
-- if (size < 4096)
-- size = 4096;
--
-- if (size > 640*1024)
-- size = 640*1024;
--
-- reserve_low = size;
--
-- return 0;
--}
--
--early_param("reservelow", parse_reservelow);
--
- static void __init early_reserve_memory(void)
- {
- /*
---
-2.32.0
-
diff --git a/0007-x86-crash-remove-crash_reserve_low_1M.patch b/0007-x86-crash-remove-crash_reserve_low_1M.patch
deleted file mode 100644
index 098c47fee2eb..000000000000
--- a/0007-x86-crash-remove-crash_reserve_low_1M.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 9071d83661e7446ce0f3291b06f1f96cd43e75d7 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <rppt@linux.ibm.com>
-Date: Tue, 1 Jun 2021 10:53:54 +0300
-Subject: [PATCH 7/8] x86/crash: remove crash_reserve_low_1M()
-
-The entire memory range under 1M is unconditionally reserved at
-setup_arch(), so there is no need for crash_reserve_low_1M() anymore.
-
-Remove this function.
-
-Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
----
- arch/x86/include/asm/crash.h | 6 ------
- arch/x86/kernel/crash.c | 13 -------------
- 2 files changed, 19 deletions(-)
-
-diff --git a/arch/x86/include/asm/crash.h b/arch/x86/include/asm/crash.h
-index f58de66091e5..8b6bd63530dc 100644
---- a/arch/x86/include/asm/crash.h
-+++ b/arch/x86/include/asm/crash.h
-@@ -9,10 +9,4 @@ int crash_setup_memmap_entries(struct kimage *image,
- struct boot_params *params);
- void crash_smp_send_stop(void);
-
--#ifdef CONFIG_KEXEC_CORE
--void __init crash_reserve_low_1M(void);
--#else
--static inline void __init crash_reserve_low_1M(void) { }
--#endif
--
- #endif /* _ASM_X86_CRASH_H */
-diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
-index b1deacbeb266..e0b8d9662da5 100644
---- a/arch/x86/kernel/crash.c
-+++ b/arch/x86/kernel/crash.c
-@@ -70,19 +70,6 @@ static inline void cpu_crash_vmclear_loaded_vmcss(void)
- rcu_read_unlock();
- }
-
--/*
-- * When the crashkernel option is specified, only use the low
-- * 1M for the real mode trampoline.
-- */
--void __init crash_reserve_low_1M(void)
--{
-- if (cmdline_find_option(boot_command_line, "crashkernel", NULL, 0) < 0)
-- return;
--
-- memblock_reserve(0, 1<<20);
-- pr_info("Reserving the low 1M of memory for crashkernel\n");
--}
--
- #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
-
- static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
---
-2.32.0
-
diff --git a/PKGBUILD b/PKGBUILD
index f3663893f1fc..81780fc9841f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -64,9 +64,8 @@ _subarch=
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-ck
-pkgver=5.12.19
+pkgver=5.14.3
pkgrel=1
-_ckpatchversion=1
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
license=(GPL2)
@@ -74,37 +73,34 @@ makedepends=(
bc kmod libelf cpio perl tar xz
)
options=('!strip')
-_ckpatch="patch-5.12-ck${_ckpatchversion}"
-_gcc_more_v=20210610
+
+# https://ck-hack.blogspot.com/2021/08/514-and-future-of-muqss-and-ck-once.html
+# thankfully xanmod keeps the hrtimer patches up to date
+_commit=e2d48df5def86f498766b22e836a9c2f1bcb3809
+_xan=linux-5.14.y-xanmod
+
+_gcc_more_v=20210818
source=(
"https://www.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar".{xz,sign}
config # the main kernel config file
"more-uarches-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/$_gcc_more_v.tar.gz"
- "http://ck.kolivas.org/patches/5.0/5.12/5.12-ck${_ckpatchversion}/$_ckpatch.xz"
+ "xanmod-patches-from-ck-$_commit.tar.gz::https://github.com/xanmod/linux-patches/archive/$_commit.tar.gz"
0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
- 0002-x86-setup-Consolidate-early-memory-reservations.patch
- 0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch
- 0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch
- 0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch
- 0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch
- 0007-x86-crash-remove-crash_reserve_low_1M.patch
+ 0002-Bluetooth-Move-shutdown-callback-before-flushing-tx-.patch
+ 0003-watchdog-iTCO_wdt-Fix-detection-of-SMI-off-case.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
-b2sums=('88e4c32cf196662a6a24e72b978019d6f8881a8523918029f4229a995c5fd957a5e01f42de9f53c7980df7e3de5ea6b069cc2c5f93852e615fe8fe78a1b131c6'
+b2sums=('c4d2bcffe7149f66e37d05f7c13ebfe59263e7474a6f536317cc092eb9d7e917651059edaf71b26022310c67c1f2f017b2147e53bebcbfcc3f2c92dc6213a721'
'SKIP'
'e7b85b8015414c2405c35f811cc3d201e10fb717e94f4c54c921d4a51dafcd61a2ac61695cf4ad5f51a2dcf5fda0558d99a896ec6478f47e7577c7207a4f7a94'
- '30d1df754608bb423cbc99c2097ad521baa091b9a3b39df4bd5c2d50c57eec54d8fa0e4a4a04b847c3d1b87ba682cadc8db45fabeefdc9ad7caaf8e77b96e41a'
- 'c9f729ba1efe6f04e7b2c57d3999bc9675b577596dccb2f227e5b6e444285e1fdd270bf67c0fcf9f5808a4c3a4b1c7a5c13a76f754ad9b9447243ccbaf2ce6a3'
- '2aa7bbea8e526ad080f4fbeef3364749b070e3d0b38f1b724a40796d455452f2c9865c96a25e52edcc8c827ce4dc3046db3cbbb858e899b9dd502673244b05c8'
- 'c8a372bdb918ecc8faeb203df3945c664d59bd61864952ea5e354bf6cef6e546f3c548e26887a718d34e51753fad603a2bf10d579f8d5ba9303a7ddfe57ada4e'
- 'b349cc801b7435a0772dafcefe4c350c925783a2fec96f56fb8b4298adbc494c295900e00498fd15894c6a778b67663743d2b2fe236765b2c65ec643d928b59d'
- '10efc6f5460b9397b9bb3369bd3e94883682806d77c0efb0e322034f8b4b422ab10d5e975fb2df8a3c12ed2ec5d0a36f795614e928224864178d7ef25e59638b'
- '14d6df3f80495d7c63f191a4cc2e42ab7fd27b1368f18c71e1d0f5230c9bfa0958c73c940bacf7f5073ed4288bbb846e1c2903b441e4171c8ea8171ce5d56e45'
- 'abe1754b1c16e2e6a6c369f6497a6679f5e846ad9652d2d019425bfe5fa1186c1e75f46790ba15a227982abc61469e7423b3eee30e3dc56a631a5d36e3ecbffa'
- 'ed1dc0f7e4f97969185de71b8f26c321359e06855d3c3b2ac3fccf2d1cdae121feb70fc5a6546c63d2ca0ce3ef21d510a40e4077262715d53165a1b236119788')
+ '5a191fb995303be264e8721318622bee1d1a3822f805ddf21c1002817ca2e144d6d17e1337f37b32dc3aca1a8754e4354a800c1b4d44417aea0acaf326533b35'
+ 'bd20774ee2c9856601af2c89a3af95c6abc812b71253368090e9c252edcce452f416bfeed54ced0886d401b5a9e1cb72c16ea5f04a72d8ded596c0d083f80e42'
+ '5ed452cf76c91af71db83c138556480fe06b54b8c342d3428bea565861709aa85884f2ded9b60d4c0b29a982da89b987134d829fa73484d02ebaaf55ede53875'
+ '81ca359fe4cf6d1a0c9eba0bb92ca75f71d7887b76b5689467372fe3cf8e57446125f0a6b3d0219efeeed1b31fa749efc75379cc275af0e5501637865e42ba00'
+ '5209f8331ea8114df6f8d7a916df5eaa16e30c9fa8ffd72da2bcb56f0d4f81a89aec2143009c8b642002fa4c999595006185ccaecbfbaeceb632f144c3decf04')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@@ -151,13 +147,16 @@ prepare() {
# FS#66613
# https://bugzilla.kernel.org/show_bug.cgi?id=207173#c6
scripts/config --disable CONFIG_KVM_WERROR
+
+ # ck recommends 1000 Hz tick and the hrtimer patches in lieu of ck1
+ scripts/config --enable CONFIG_HZ_1000
- # fix naming schema in EXTRAVERSION of ck patch set
- sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" "../${_ckpatch}"
+ # these are ck's htrimer patches
+ echo "Patching with ck hrtimer patches..."
- # ck patchset itself
- echo "Patching with ck patchset..."
- patch -Np1 -i ../"${_ckpatch}"
+ for i in ../linux-patches-"$_commit"/"$_xan"/ck-hrtimer/0*.patch; do
+ patch -Np1 -i $i
+ done
# non-interactively apply ck1 default options
# this isn't redundant if we want a clean selection of subarch below
@@ -206,7 +205,7 @@ build() {
}
_package() {
- pkgdesc="The ${pkgbase/linux/Linux} kernel and modules with the ck1 patchset featuring MuQSS CPU scheduler"
+ pkgdesc="The ${pkgbase/linux/Linux} kernel and modules with ck's hrtimer patches"
depends=(coreutils kmod initramfs)
optdepends=('crda: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices')