diff options
| author | Ingo Molnar <mingo@kernel.org> | 2025-12-14 11:22:37 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-12-14 11:24:18 +0300 |
| commit | 6c08d768a528ad22016850a481d67bfc8cdb9d4b (patch) | |
| tree | d845706063fd236ceb4cf418948f80c01807c8c9 | |
| parent | 0d9daff41418cbc762e4b6ec683e0a5ec4cdb5f3 (diff) | |
| download | linux-6c08d768a528ad22016850a481d67bfc8cdb9d4b.tar.xz | |
x86/boot/e820: Use <linux/sizes.h> symbols for literals
Use the human-readable SZ_* constants.
Suggested-by: Nikolay Borisov <nik.borisov@suse.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/92a15c2d-055c-4f4e-b232-32030a8e5e54@suse.com
| -rw-r--r-- | arch/x86/kernel/e820.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index d1b1786d006b..97b54bd0f482 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -617,7 +617,7 @@ __init static void e820__update_table_kexec(void) e820__update_table(e820_table_kexec); } -#define MAX_GAP_END 0x100000000ull +#define MAX_GAP_END SZ_4G /* * Search for a gap in the E820 memory space from 0 to MAX_GAP_END (4GB). @@ -696,7 +696,7 @@ __init void e820__setup_pci_gap(void) pr_err("Cannot find an available gap in the 32-bit address range\n"); pr_err("PCI devices with unassigned 32-bit BARs may not work!\n"); #else - max_gap_start = 0x10000000; + max_gap_start = SZ_256M; #endif } @@ -1080,7 +1080,7 @@ __initdata static struct resource *e820_res; __init static bool e820_device_region(enum e820_type type, struct resource *res) { /* This is the legacy BIOS/DOS ROM-shadow + MMIO region: */ - if (res->start < (1ULL<<20)) + if (res->start < SZ_1M) return false; /* |
