libspl: move physmem to sys/systm.h; initialise at libspl_init()

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #17861
This commit is contained in:
Rob Norris
2025-10-24 23:19:53 +11:00
committed by Brian Behlendorf
parent d02ea5170a
commit 6cf6f091cf
5 changed files with 47 additions and 4 deletions
-3
View File
@@ -60,7 +60,6 @@
* Emulation of kernel services in userland.
*/
uint64_t physmem;
uint32_t hostid;
struct utsname hw_utsname;
@@ -509,8 +508,6 @@ kernel_init(int mode)
umem_nofail_callback(umem_out_of_memory);
physmem = sysconf(_SC_PHYS_PAGES);
dprintf("physmem = %llu pages (%.2f GB)\n", (u_longlong_t)physmem,
(double)physmem * sysconf(_SC_PAGE_SIZE) / (1ULL << 30));