xen: move max_pfn in xen_memory_setup() out of function scope
authorJuergen Gross <jgross@suse.com>
Tue, 6 Aug 2024 08:24:41 +0000 (10:24 +0200)
committerJuergen Gross <jgross@suse.com>
Tue, 10 Sep 2024 08:07:10 +0000 (10:07 +0200)
commit43dc2a0f479b9cd30f6674986d7a40517e999d31
treeb1906e05e19d1ba79021bd742b456616936ab164
parentc4498ae316da5b5786ccd448fc555f3339b8e4ca
xen: move max_pfn in xen_memory_setup() out of function scope

Instead of having max_pfn as a local variable of xen_memory_setup(),
make it a static variable in setup.c instead. This avoids having to
pass it to subfunctions, which will be needed in more cases in future.

Rename it to ini_nr_pages, as the value denotes the currently usable
number of memory pages as passed from the hypervisor at boot time.

Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/setup.c