diff options
| author | Lorenzo Stoakes (ARM) <ljs@kernel.org> | 2026-09-26 11:41:06 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-09-30 16:55:54 -0700 |
| commit | 6dd3f2fdd94c01db9d772943b615741c0ea996e2 (patch) | |
| tree | fdcac3d4960e92195c503b80ef4336a010e686b1 /mm/Makefile | |
| parent | dfa0c85dc9c401d8f4f2f87938a802030f7d7757 (diff) | |
| download | linux-next-6dd3f2fdd94c01db9d772943b615741c0ea996e2.tar.gz linux-next-6dd3f2fdd94c01db9d772943b615741c0ea996e2.zip | |
mm: move drivers/char/mem.c to mm/char-mem.c
The memory character driver implements several mm-specific features and is
always compiled into the kernel, so move it to mm/ where it belongs.
Among other things the driver implements /dev/mem which provides raw access
to physical memory, and /dev/zero which either allows mapping of a shmem
region (if mapped with MAP_SHARED) or, uniquely, anonymous memory (if
mapped MAP_PRIVATE).
This change lays the foundations to allow MAP_PRIVATE-/dev/zero to be
mapped precisely the same as anonymous memory is mapped as currently it is
an edge case within mm.
Also update a couple of comments that reference 'drivers/char/mem.c' to
reference 'mm/char-mem.c'.
Link: https://lore.kernel.org/20260926-map-private-dev-zero-v3-1-d4781e84ccfc@kernel.org
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Jan Kara <jack@suse.cz>
Diffstat (limited to 'mm/Makefile')
| -rw-r--r-- | mm/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/Makefile b/mm/Makefile index e7245cb88c66..2a3ec53d62ee 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -55,7 +55,8 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ mm_init.o percpu.o slab_common.o \ compaction.o show_mem.o \ interval_tree.o list_lru.o workingset.o \ - debug.o gup.o mmap_lock.o vma_init.o $(mmu-y) + debug.o gup.o mmap_lock.o vma_init.o char-mem.o \ + $(mmu-y) # Give 'page_alloc' its own module-parameter namespace page-alloc-y := page_alloc.o |
