[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130415080621.GA1994@udknight>
Date: Mon, 15 Apr 2013 16:06:21 +0800
From: Wang YanQing <udknight@...il.com>
To: akpm@...ux-foundation.org
Cc: yinghai@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] x86: reserve_crashkernel: use
memblock_is_region_reserved to simplify code
Use memblock_is_region_reserved instead of memblock_find_in_range
to simplify the check codes, and gain a little speed benefit.
Signed-off-by: Wang YanQing <udknight@...il.com>
---
arch/x86/kernel/setup.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 90d8cc9..9d60c85 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -577,11 +577,7 @@ static void __init reserve_crashkernel(void)
}
} else {
- unsigned long long start;
-
- start = memblock_find_in_range(crash_base,
- crash_base + crash_size, crash_size, 1<<20);
- if (start != crash_base) {
+ if (memblock_is_region_reserved(crash_base, crash_size)) {
pr_info("crashkernel reservation failed - memory is in use.\n");
return;
}
--
1.7.12.4.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists