diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
commit | 08b74a000942a380fe028845f92cd3a0dee827d5 (patch) | |
tree | aa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch | |
parent | Adding upstream version 4.19.249. (diff) | |
download | linux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip |
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch')
-rw-r--r-- | debian/patches-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/debian/patches-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch b/debian/patches-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch new file mode 100644 index 000000000..6f9e4c5a0 --- /dev/null +++ b/debian/patches-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch @@ -0,0 +1,62 @@ +From 0d3b3e949716c72656373354c9658f523cf369a2 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 11 Dec 2018 21:53:43 +0100 +Subject: [PATCH 087/347] x86/mm/pat: disable preemption __split_large_page() + after spin_lock() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz + +Commit "x86/mm/pat: Disable preemption around __flush_tlb_all()" added a +warning if __flush_tlb_all() is invoked in preemptible context. On !RT +the warning does not trigger because a spin lock is acquired which +disables preemption. On RT the spin lock does not disable preemption and +so the warning is seen. + +Disable preemption to avoid the warning __flush_tlb_all(). + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + arch/x86/mm/pageattr.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c +index 101f3ad0d6ad..0b0396261ca1 100644 +--- a/arch/x86/mm/pageattr.c ++++ b/arch/x86/mm/pageattr.c +@@ -687,12 +687,18 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address, + pgprot_t ref_prot; + + spin_lock(&pgd_lock); ++ /* ++ * Keep preemption disabled after __flush_tlb_all() which expects not be ++ * preempted during the flush of the local TLB. ++ */ ++ preempt_disable(); + /* + * Check for races, another CPU might have split this page + * up for us already: + */ + tmp = _lookup_address_cpa(cpa, address, &level); + if (tmp != kpte) { ++ preempt_enable(); + spin_unlock(&pgd_lock); + return 1; + } +@@ -726,6 +732,7 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address, + break; + + default: ++ preempt_enable(); + spin_unlock(&pgd_lock); + return 1; + } +@@ -764,6 +771,7 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address, + * going on. + */ + __flush_tlb_all(); ++ preempt_enable(); + spin_unlock(&pgd_lock); + + return 0; +-- +2.36.1 + |