aboutsummaryrefslogtreecommitdiff
path: root/arch/um/include/asm/mmu.h
AgeCommit message (Collapse)AuthorFilesLines
2024-07-03um: refactor TLB update handlingBenjamin Berg1-0/+4
Conceptually, we want the memory mappings to always be up to date and represent whatever is in the TLB. To ensure that, we need to sync them over in the userspace case and for the kernel we need to process the mappings. The kernel will call flush_tlb_* if page table entries that were valid before become invalid. Unfortunately, this is not the case if entries are added. As such, change both flush_tlb_* and set_ptes to track the memory range that has to be synchronized. For the kernel, we need to execute a flush_tlb_kern_* immediately but we can wait for the first page fault in case of set_ptes. For userspace in contrast we only store that a range of memory needs to be synced and do so whenever we switch to that process. Signed-off-by: Benjamin Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
2024-07-03um: remove LDT supportBenjamin Berg1-6/+0
The current LDT code has a few issues that mean it should be redone in a different way once we always start with a fresh MM even when cloning. In a new and better world, the kernel would just ensure its own LDT is clear at startup. At that point, all that is needed is a simple function to populate the LDT from another MM in arch_dup_mmap combined with some tracking of the installed LDT entries for each MM. Note that the old implementation was even incorrect with regard to reading, as it copied out the LDT entries in the internal format rather than converting them to the userspace structure. Removal should be fine as the LDT is not used for thread-local storage anymore. Signed-off-by: Benjamin Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
2024-04-30um: Fix the -Wmissing-prototypes warning for __switch_mmTiwei Bie1-2/+0
The __switch_mm function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: 4dc706c2f292 ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a bit") Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2024-01-04um: mmu: remove stub_pagesJohannes Berg1-1/+0
I removed all the users of this some time ago, but evidently forgot the pointers. Remove them from the data structure too. Fixes: bfc58e2b98e9 ("um: remove process stub VMA") Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2019-09-15um: Add SPDX headers for files in arch/um/includeAlex Dewar1-1/+1
Convert files to use SPDX header. All files are licensed under the GPLv2. Signed-off-by: Alex Dewar <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2012-10-09um: get rid of pointless include "..." where include <...> will doAl Viro1-1/+1
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2012-03-20um: embed ->stub_pages[] into mmu_contextAl Viro1-1/+1
seriously, kmalloc() for two-element array of pointers? Signed-off-by: Al Viro <[email protected]>
2011-11-02um: take ldt.h to arch/x86/um/asm/mm_context.hAl Viro1-2/+2
it's x86-only and we have no business playing with it in asm/mmu.h; make the latter have struct uml_arch_mm_context arch; instead of struct uml_ldt ldt; and let arch/<subarch>/um/asm/mm_context.h decide what'll be in there. While we are at it, kill host_ldt.h - it's not needed in part of places that include it (we want asm/ldt.h in those) and it can be trivially expanded into the single remaining one. Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a bitAl Viro1-5/+17
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2009-04-01uml: remove useless commentsWANG Cong1-10/+0
These comments are useless now, remove them. Signed-off-by: WANG Cong <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-10-22x86, um: initial part of asm-um moveAl Viro1-0/+22
Signed-off-by: Al Viro <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>