Skip to content

Commit ced875c

Browse files
committed
mm/x86/pat: use the new follow_pfnmap API
jira LE-3557 Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6 commit-author Peter Xu <[email protected]> commit cbea853 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-5.14.0-570.26.1.el9_6/cbea8536.failed Use the new API that can understand huge pfn mappings. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peter Xu <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Alex Williamson <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Gavin Shan <[email protected]> Cc: Gerald Schaefer <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Niklas Schnelle <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Cc: Zi Yan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> (cherry picked from commit cbea853) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # arch/x86/mm/pat/memtype.c
1 parent 43f37c3 commit ced875c

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
mm/x86/pat: use the new follow_pfnmap API
2+
3+
jira LE-3557
4+
Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6
5+
commit-author Peter Xu <[email protected]>
6+
commit cbea8536d933d546ceb1005bf9c04f9d01da8092
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-5.14.0-570.26.1.el9_6/cbea8536.failed
10+
11+
Use the new API that can understand huge pfn mappings.
12+
13+
Link: https://lkml.kernel.org/r/[email protected]
14+
Signed-off-by: Peter Xu <[email protected]>
15+
Cc: Thomas Gleixner <[email protected]>
16+
Cc: Ingo Molnar <[email protected]>
17+
Cc: Borislav Petkov <[email protected]>
18+
Cc: Dave Hansen <[email protected]>
19+
Cc: Alexander Gordeev <[email protected]>
20+
Cc: Alex Williamson <[email protected]>
21+
Cc: Aneesh Kumar K.V <[email protected]>
22+
Cc: Catalin Marinas <[email protected]>
23+
Cc: Christian Borntraeger <[email protected]>
24+
Cc: David Hildenbrand <[email protected]>
25+
Cc: Gavin Shan <[email protected]>
26+
Cc: Gerald Schaefer <[email protected]>
27+
Cc: Heiko Carstens <[email protected]>
28+
Cc: Jason Gunthorpe <[email protected]>
29+
Cc: Matthew Wilcox <[email protected]>
30+
Cc: Niklas Schnelle <[email protected]>
31+
Cc: Paolo Bonzini <[email protected]>
32+
Cc: Ryan Roberts <[email protected]>
33+
Cc: Sean Christopherson <[email protected]>
34+
Cc: Sven Schnelle <[email protected]>
35+
Cc: Vasily Gorbik <[email protected]>
36+
Cc: Will Deacon <[email protected]>
37+
Cc: Zi Yan <[email protected]>
38+
Signed-off-by: Andrew Morton <[email protected]>
39+
(cherry picked from commit cbea8536d933d546ceb1005bf9c04f9d01da8092)
40+
Signed-off-by: Jonathan Maple <[email protected]>
41+
42+
# Conflicts:
43+
# arch/x86/mm/pat/memtype.c
44+
diff --cc arch/x86/mm/pat/memtype.c
45+
index 36b603d0cdde,f73b5ce270b3..000000000000
46+
--- a/arch/x86/mm/pat/memtype.c
47+
+++ b/arch/x86/mm/pat/memtype.c
48+
@@@ -947,6 -948,26 +947,29 @@@ static void free_pfn_range(u64 paddr, u
49+
memtype_free(paddr, paddr + size);
50+
}
51+
52+
++<<<<<<< HEAD
53+
++=======
54+
+ static int follow_phys(struct vm_area_struct *vma, unsigned long *prot,
55+
+ resource_size_t *phys)
56+
+ {
57+
+ struct follow_pfnmap_args args = { .vma = vma, .address = vma->vm_start };
58+
+
59+
+ if (follow_pfnmap_start(&args))
60+
+ return -EINVAL;
61+
+
62+
+ /* Never return PFNs of anon folios in COW mappings. */
63+
+ if (!args.special) {
64+
+ follow_pfnmap_end(&args);
65+
+ return -EINVAL;
66+
+ }
67+
+
68+
+ *prot = pgprot_val(args.pgprot);
69+
+ *phys = (resource_size_t)args.pfn << PAGE_SHIFT;
70+
+ follow_pfnmap_end(&args);
71+
+ return 0;
72+
+ }
73+
+
74+
++>>>>>>> cbea8536d933 (mm/x86/pat: use the new follow_pfnmap API)
75+
static int get_pat_info(struct vm_area_struct *vma, resource_size_t *paddr,
76+
pgprot_t *pgprot)
77+
{
78+
* Unmerged path arch/x86/mm/pat/memtype.c

0 commit comments

Comments
 (0)