summaryrefslogtreecommitdiffstats
path: root/patches/0003-x86-pud_trans_huge-is-already-defined-generically-fo.patch
blob: 1166ea6bb531ad26ce3a242719200e35b66ee28f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From eb9589e5c7ddcf59702ef7b105eb3a1ef065887a Mon Sep 17 00:00:00 2001
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Sun, 24 May 2020 18:48:24 -0600
Subject: [PATCH 03/34] x86: pud_trans_huge is already defined generically for
 the nop inline

When pud_trans_huge is not required, the stub function is already
defined in the asm-generic code, so adding it here too results in a
compiler error. To fix this bug, we just get rid of the second
superfluous definition, as well as the third in asm-generic itself,
where the set of conditions for its inclusion overlapped.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 arch/x86/include/asm/pgtable.h | 9 ---------
 include/asm-generic/pgtable.h  | 4 ----
 2 files changed, 13 deletions(-)

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 88926233768..e39cd5a8bd5 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -1101,15 +1101,6 @@ static inline int pmd_write(pmd_t pmd)
 	return pmd_flags(pmd) & _PAGE_RW;
 }
 
-#if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \
-	(defined(CONFIG_TRANSPARENT_HUGEPAGE) && \
-	 !defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD))
-static inline int pud_trans_huge(pud_t pud)
-{
-	return 0;
-}
-#endif
-
 #define __HAVE_ARCH_PMDP_GET_AND_CLEAR
 static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm, unsigned long addr,
 				       pmd_t *pmdp)
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 4cea7a5f709..16a4514b4fe 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -629,10 +629,6 @@ static inline int pmd_trans_splitting(pmd_t pmd)
 {
 	return 0;
 }
-static inline int pud_trans_huge(pud_t pud)
-{
-	return 0;
-}
 static inline int pud_trans_splitting(pud_t pud)
 {
 	return 0;
-- 
2.29.1