forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit1d9cfee
mm/sparsemem: enable vmem_altmap support in vmemmap_populate_basepages()
Patch series "arm64: Enable vmemmap mapping from device memory", v4.This series enables vmemmap backing memory allocation from device memoryranges on arm64. But before that, it enables vmemmap_populate_basepages()and vmemmap_alloc_block_buf() to accommodate struct vmem_altmap basedalocation requests.This patch (of 3):vmemmap_populate_basepages() is used across platforms to allocate backingmemory for vmemmap mapping. This is used as a standard default choice oras a fallback when intended huge pages allocation fails. This justcreates entire vmemmap mapping with base pages (PAGE_SIZE).On arm64 platforms, vmemmap_populate_basepages() is called instead of theplatform specific vmemmap_populate() when ARM64_SWAPPER_USES_SECTION_MAPSis not enabled as in case for ARM64_16K_PAGES and ARM64_64K_PAGES configs.At present vmemmap_populate_basepages() does not support allocating fromdriver defined struct vmem_altmap while trying to create vmemmap mappingfor a device memory range. It prevents ARM64_16K_PAGES andARM64_64K_PAGES configs on arm64 from supporting device memory withvmemap_altmap request.This enables vmem_altmap support in vmemmap_populate_basepages() unlockingdevice memory allocation for vmemap mapping on arm64 platforms with 16K or64K base page configs.Each architecture should evaluate and decide on subscribing device memorybased base page allocation through vmemmap_populate_basepages(). Hencelets keep it disabled on all archs in order to preserve the existingsemantics. A subsequent patch enables it on arm64.Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Tested-by: Jia He <justin.he@arm.com>Reviewed-by: David Hildenbrand <david@redhat.com>Acked-by: Will Deacon <will@kernel.org>Acked-by: Catalin Marinas <catalin.marinas@arm.com>Cc: Mark Rutland <mark.rutland@arm.com>Cc: Paul Walmsley <paul.walmsley@sifive.com>Cc: Palmer Dabbelt <palmer@dabbelt.com>Cc: Tony Luck <tony.luck@intel.com>Cc: Fenghua Yu <fenghua.yu@intel.com>Cc: Dave Hansen <dave.hansen@linux.intel.com>Cc: Andy Lutomirski <luto@kernel.org>Cc: Peter Zijlstra <peterz@infradead.org>Cc: Thomas Gleixner <tglx@linutronix.de>Cc: Ingo Molnar <mingo@redhat.com>Cc: Mike Rapoport <rppt@linux.ibm.com>Cc: Michal Hocko <mhocko@suse.com>Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>Cc: Dan Williams <dan.j.williams@intel.com>Cc: Pavel Tatashin <pasha.tatashin@soleen.com>Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>Cc: Borislav Petkov <bp@alien8.de>Cc: "H. Peter Anvin" <hpa@zytor.com>Cc: Hsin-Yi Wang <hsinyi@chromium.org>Cc: Jonathan Corbet <corbet@lwn.net>Cc: Michael Ellerman <mpe@ellerman.id.au>Cc: Paul Mackerras <paulus@samba.org>Cc: Robin Murphy <robin.murphy@arm.com>Cc: Steve Capper <steve.capper@arm.com>Cc: Yu Zhao <yuzhao@google.com>Link:http://lkml.kernel.org/r/1594004178-8861-1-git-send-email-anshuman.khandual@arm.comLink:http://lkml.kernel.org/r/1594004178-8861-2-git-send-email-anshuman.khandual@arm.comSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent56f3547 commit1d9cfee
File tree
6 files changed
+20
-13
lines changed- arch
- arm64/mm
- ia64/mm
- riscv/mm
- x86/mm
- include/linux
- mm
6 files changed
+20
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1070 | 1070 | | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | | - | |
| 1073 | + | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
658 | | - | |
| 658 | + | |
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
558 | 558 | | |
559 | 559 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1545 | 1545 | | |
1546 | 1546 | | |
1547 | 1547 | | |
1548 | | - | |
| 1548 | + | |
1549 | 1549 | | |
1550 | 1550 | | |
1551 | 1551 | | |
| |||
1557 | 1557 | | |
1558 | 1558 | | |
1559 | 1559 | | |
1560 | | - | |
| 1560 | + | |
1561 | 1561 | | |
1562 | 1562 | | |
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
1566 | 1566 | | |
1567 | 1567 | | |
1568 | | - | |
| 1568 | + | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2978 | 2978 | | |
2979 | 2979 | | |
2980 | 2980 | | |
2981 | | - | |
| 2981 | + | |
| 2982 | + | |
2982 | 2983 | | |
2983 | 2984 | | |
2984 | 2985 | | |
2985 | 2986 | | |
2986 | 2987 | | |
2987 | 2988 | | |
2988 | | - | |
| 2989 | + | |
2989 | 2990 | | |
2990 | 2991 | | |
2991 | 2992 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
| |||
212 | 218 | | |
213 | 219 | | |
214 | 220 | | |
215 | | - | |
216 | | - | |
| 221 | + | |
| 222 | + | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| |||
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
238 | | - | |
| 244 | + | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
| |||
0 commit comments
Comments
(0)