Commit 242fef36 authored by Tiwei Bie's avatar Tiwei Bie Committed by Johannes Berg
Browse files

um: Fix the definition for physmem_size



Currently physmem_size is defined as long long but declared locally
as unsigned long long before using it in separate .c files. Make them
match by defining physmem_size as unsigned long long and also move
the declaration to a common header to allow the compiler to check it.

Signed-off-by: default avatarTiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20240916045950.508910-5-tiwei.btw@antgroup.com


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent cd05cbed
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -72,8 +72,6 @@ struct virtio_uml_vq_info {
	bool suspended;
};

extern unsigned long long physmem_size;

#define vu_err(vu_dev, ...)	dev_err(&(vu_dev)->pdev->dev, ##__VA_ARGS__)

/* Vhost-user protocol */
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ struct cpu_task {

extern struct cpu_task cpu_tasks[];

extern unsigned long long physmem_size;

extern unsigned long high_physmem;
extern unsigned long uml_physmem;
extern unsigned long uml_reserved;
+0 −2
Original line number Diff line number Diff line
@@ -22,8 +22,6 @@ static int physmem_fd = -1;
unsigned long high_physmem;
EXPORT_SYMBOL(high_physmem);

extern unsigned long long physmem_size;

void __init mem_total_pages(unsigned long physmem, unsigned long iomem)
{
	unsigned long phys_pages, iomem_pages, total_pages;
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static int have_root __initdata;
static int have_console __initdata;

/* Set in uml_mem_setup and modified in linux_main */
long long physmem_size = 64 * 1024 * 1024;
unsigned long long physmem_size = 64 * 1024 * 1024;
EXPORT_SYMBOL(physmem_size);

static const char *usage_string =