svn commit: r353345 - stable/12/sys/kern
Mark Johnston
markj at FreeBSD.org
Wed Oct 9 14:09:26 UTC 2019
Author: markj
Date: Wed Oct 9 14:09:25 2019
New Revision: 353345
URL: https://svnweb.freebsd.org/changeset/base/353345
Log:
MFC r353014:
Use OBJT_PHYS VM objects for kernel modules.
Modified:
stable/12/sys/kern/link_elf.c
stable/12/sys/kern/link_elf_obj.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/kern/link_elf.c
==============================================================================
--- stable/12/sys/kern/link_elf.c Wed Oct 9 12:14:10 2019 (r353344)
+++ stable/12/sys/kern/link_elf.c Wed Oct 9 14:09:25 2019 (r353345)
@@ -944,7 +944,7 @@ link_elf_load_file(linker_class_t cls, const char* fil
ef = (elf_file_t) lf;
#ifdef SPARSE_MAPPING
- ef->object = vm_object_allocate(OBJT_DEFAULT, mapsize >> PAGE_SHIFT);
+ ef->object = vm_object_allocate(OBJT_PHYS, atop(mapsize));
if (ef->object == NULL) {
error = ENOMEM;
goto out;
Modified: stable/12/sys/kern/link_elf_obj.c
==============================================================================
--- stable/12/sys/kern/link_elf_obj.c Wed Oct 9 12:14:10 2019 (r353344)
+++ stable/12/sys/kern/link_elf_obj.c Wed Oct 9 14:09:25 2019 (r353345)
@@ -774,8 +774,7 @@ link_elf_load_file(linker_class_t cls, const char *fil
* This stuff needs to be in a single chunk so that profiling etc
* can get the bounds and gdb can associate offsets with modules
*/
- ef->object = vm_object_allocate(OBJT_DEFAULT,
- round_page(mapsize) >> PAGE_SHIFT);
+ ef->object = vm_object_allocate(OBJT_PHYS, atop(round_page(mapsize)));
if (ef->object == NULL) {
error = ENOMEM;
goto out;
More information about the svn-src-all
mailing list