]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Jeff Mahoney <jeffm@suse.com> |
2 | Subject: [PATCH] s390: Define FREE_PTE_NR | |
3 | Patch-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 | ||
16 | Signed-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; |