]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:32:48 +0000 (16:32 +0200)
commit82729ec25602428b25bedf1f9cfa90f565966205
treebde4b5699d9718577d2758b502afb8a0ab10184e
parentdcedf22ce71993f32d8c72841961f84c8dc41764
xen: move max_pfn in xen_memory_setup() out of function scope

[ Upstream commit 43dc2a0f479b9cd30f6674986d7a40517e999d31 ]

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>
Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/xen/setup.c