]> git.hungrycats.org Git - linux/commitdiff
um: Fix the definition for physmem_size
authorTiwei Bie <tiwei.btw@antgroup.com>
Mon, 16 Sep 2024 04:59:50 +0000 (12:59 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 10 Oct 2024 10:02:13 +0000 (12:02 +0200)
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: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20240916045950.508910-5-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/drivers/virtio_uml.c
arch/um/include/shared/as-layout.h
arch/um/kernel/physmem.c
arch/um/kernel/um_arch.c

index e7f5556e3c96cd2c96285567beda58ecf80791b4..4d3e9b9f5b6141d9c711f6581ab256fbdcf6546d 100644 (file)
@@ -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 */
index 61965a06c18afef4396dada38e718178270e1c88..283226c34ca47b74949bb7c41c047988b41afc46 100644 (file)
@@ -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;
index 94aca17993fdfd321845bd130fb8247e39b44636..636830fe00f257c655316060d719d0e31e7d7dbd 100644 (file)
@@ -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;
index 8f86aa468b506a19e7a124a1d299b7d9fab6a446..99cdf4b2d6482d23a7df9a8a229d23400a8a8957 100644 (file)
@@ -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 =