Thread (29 messages) 29 messages, 3 authors, 2022-01-07
STALE1607d
Revisions (6)
  1. v15 [diff vs current]
  2. v16 [diff vs current]
  3. v17 [diff vs current]
  4. v18 current
  5. v19 [diff vs current]
  6. v22 [diff vs current]

[PATCH v18 07/17] x86/setup: Eliminate a magic number in reserve_crashkernel()

From: Zhen Lei <hidden>
Date: 2021-12-22 13:13:27
Also in: kexec, linux-arm-kernel, linux-devicetree, lkml
Subsystem: the rest, x86 architecture (32-bit and 64-bit) · Maintainers: Linus Torvalds, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen

From: Chen Zhou <redacted>

Replace '(1ULL << 32)' with CRASH_ADDR_LOW_MAX to improve readability,
they are equal.

Signed-off-by: Chen Zhou <redacted>
Signed-off-by: Zhen Lei <redacted>
---
 arch/x86/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 52aa925877ca787..abff57ffbe92884 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -523,7 +523,7 @@ static void __init reserve_crashkernel(void)
 	}
 
 #ifdef CONFIG_X86_64
-	if (crash_base >= (1ULL << 32)) {
+	if (crash_base >= CRASH_ADDR_LOW_MAX) {
 		/*
 		 * Ensure that at least 256M extra low memory is allocated for
 		 * DMA buffers and swiotlb, if low memory size is not specified.
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help