]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/s390-add-FREE_PTE_NR
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-add-FREE_PTE_NR
CommitLineData
2cb7cef9
BS
1From: Jeff Mahoney <jeffm@suse.com>
2Subject: [PATCH] s390: Define FREE_PTE_NR
3Patch-mainline: Never, unless FREE_PTE_NR is used in generic code
4
5 Commit ba8a9229ab9e80278c28ad68b15053f65b2b0a7c from
6 Martin Schwidefsky <schwidefsky@de.ibm.com> removed the
7 #include <asm-generic/tlb.h> from asm-s390/tlb.h when he defined the
8 s390-specific TLB operations.
9
10 FREE_PTR_NR is generally an internal-only value, but our unmap_vmas-lat
11 patch uses it to make smarter decisions about dumping PTEs in chunks.
12
13 This patch restores the generic value in asm-s390/tlb.h. Since it's only
14 used for an optimization, this should be safe.
15
16Signed-off-by: Jeff Mahoney <jeffm@suse.com>
17
18---
19 arch/s390/include/asm/tlb.h | 13 +++++++++++++
20 1 file changed, 13 insertions(+)
21
22--- a/arch/s390/include/asm/tlb.h
23+++ b/arch/s390/include/asm/tlb.h
24@@ -34,6 +34,19 @@
25 #define TLB_NR_PTRS 508
26 #endif
27
28+/* Lifted from asm-generic/tlb.h; Is used by patches.suse/unmap_vmas-lat */
29+/*
30+ * For UP we don't need to worry about TLB flush
31+ * and page free order so much..
32+ */
33+#ifdef CONFIG_SMP
34+ #define FREE_PTE_NR 506
35+ #define tlb_fast_mode(tlb) ((tlb)->nr == ~0U)
36+#else
37+ #define FREE_PTE_NR 1
38+ #define tlb_fast_mode(tlb) 1
39+#endif
40+
41 struct mmu_gather {
42 struct mm_struct *mm;
43 unsigned int fullmm;