linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rmk@arm.linux.org.uk (Russell King)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH kexec-tools v2 26/32] arm: rename crash_reserved_mem to crash_kernel_mem
Date: Mon, 06 Jun 2016 18:00:57 +0100	[thread overview]
Message-ID: <E1b9xtZ-0003tw-VT@e0050434b2927.dyn.armlinux.org.uk> (raw)
In-Reply-To: <20160606164129.GM1041@n2100.armlinux.org.uk>

Rename crash_reserved_mem to crash_kernel_mem as we want to support
multiple reserved memory ranges.

Reviewed-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
---
 kexec/arch/arm/crashdump-arm.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
index f2e6a0d..1a6ab88 100644
--- a/kexec/arch/arm/crashdump-arm.c
+++ b/kexec/arch/arm/crashdump-arm.c
@@ -53,7 +53,7 @@ struct memory_ranges usablemem_rgns = {
 };
 
 /* memory range reserved for crashkernel */
-static struct memory_range crash_reserved_mem;
+static struct memory_range crash_kernel_mem;
 
 static struct crash_elf_info elf_info = {
 	.class		= ELFCLASS32,
@@ -140,7 +140,7 @@ static int get_kernel_page_offset(struct kexec_info *info,
  */
 static void crash_exclude_range(void)
 {
-	const struct memory_range *range = &crash_reserved_mem;
+	const struct memory_range *range = &crash_kernel_mem;
 	int i;
 
 	for (i = 0; i < usablemem_rgns.size; i++) {
@@ -262,8 +262,8 @@ static void dump_memory_ranges(void)
 		return;
 
 	dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n",
-		  crash_reserved_mem.start, crash_reserved_mem.end,
-		  (unsigned long)range_size(&crash_reserved_mem) >> 20);
+		  crash_kernel_mem.start, crash_kernel_mem.end,
+		  (unsigned long)range_size(&crash_kernel_mem) >> 20);
 
 	for (i = 0; i < usablemem_rgns.size; i++) {
 		struct memory_range *r = usablemem_rgns.ranges + i;
@@ -313,10 +313,10 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
 	 * Ensure that the crash kernel memory range is sane. The crash kernel
 	 * must be located within memory which is visible during booting.
 	 */
-	if (crash_reserved_mem.end > ARM_MAX_VIRTUAL) {
+	if (crash_kernel_mem.end > ARM_MAX_VIRTUAL) {
 		fprintf(stderr,
 			"Crash kernel memory [0x%llx-0x%llx] is inaccessible at boot - unable to load crash kernel\n",
-			crash_reserved_mem.start, crash_reserved_mem.end);
+			crash_kernel_mem.start, crash_kernel_mem.end);
 		return -1;
 	}
 
@@ -349,8 +349,8 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
 	 * regions to be aligned to SECTION_SIZE.
 	 */
 	elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
-					  crash_reserved_mem.start,
-					  crash_reserved_mem.end, -1, 0);
+					  crash_kernel_mem.start,
+					  crash_kernel_mem.end, -1, 0);
 
 	dbgprintf("elfcorehdr: %#lx\n", elfcorehdr);
 	cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
@@ -360,7 +360,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
 	 * prevents the dump capture kernel from using any other memory regions
 	 * which belong to the primary kernel.
 	 */
-	cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start);
+	cmdline_add_mem(mod_cmdline, elfcorehdr - crash_kernel_mem.start);
 
 	dump_memory_ranges();
 	dbgprintf("kernel command line: \"%s\"\n", mod_cmdline);
@@ -377,7 +377,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
  * @length: size of the memory region
  *
  * This function is called for each memory range in /proc/iomem, stores
- * the location of the crash kernel range into @crash_reserved_mem, and
+ * the location of the crash kernel range into @crash_kernel_mem, and
  * stores the system RAM into @usablemem_rgns.
  */
 static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),
@@ -385,9 +385,9 @@ static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),
 				unsigned long long length)
 {
 	if (strncmp(str, CRASH_KERNEL, strlen(CRASH_KERNEL)) == 0) {
-		crash_reserved_mem.start = base;
-		crash_reserved_mem.end = base + length - 1;
-		crash_reserved_mem.type = RANGE_RAM;
+		crash_kernel_mem.start = base;
+		crash_kernel_mem.end = base + length - 1;
+		crash_kernel_mem.type = RANGE_RAM;
 	}
 	else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0) {
 		return mem_regions_add(&usablemem_rgns,
@@ -407,5 +407,5 @@ int is_crashkernel_mem_reserved(void)
 {
 	kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL);
 
-	return crash_reserved_mem.start != crash_reserved_mem.end;
+	return crash_kernel_mem.start != crash_kernel_mem.end;
 }
-- 
1.9.1

  parent reply	other threads:[~2016-06-06 17:00 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 16:41 [PATCH kexec-tools v2 00/32] Keystone II updates for kexec tools Russell King - ARM Linux
2016-06-06 16:58 ` [PATCH kexec-tools v2 01/32] kdump: mmap() and munmap() only work on page-aligned quantites Russell King
2016-06-06 16:58 ` [PATCH kexec-tools v2 02/32] kdump: fix multiple program header entries Russell King
2016-06-06 16:58 ` [PATCH kexec-tools v2 03/32] kdump: actually write out the memory Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 04/32] kdump: fix kdump mapping Russell King
2016-06-07  2:05   ` Pratyush Anand
2016-06-06 16:59 ` [PATCH kexec-tools v2 05/32] arm: fix kdump to work on LPAE systems Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 06/32] kdump: print mmap() offset in hex Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 07/32] kexec: fix warnings caused by selecting 64-bit file IO on 32-bit platforms Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 08/32] kexec: add max_size to memory_ranges Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 09/32] kexec: phys_to_virt() must take unsigned long long Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 10/32] kexec: add generic helper to add to memory_regions Russell King
2016-06-08  1:13   ` Baoquan He
2016-06-08  1:22     ` Simon Horman
2016-06-09 16:18       ` [PATCH] Remove "max" parameter comment Russell King
2016-06-09 17:06         ` Pratyush Anand
2016-06-23  0:40         ` Simon Horman
2016-06-06 16:59 ` [PATCH kexec-tools v2 11/32] kexec: add mem_regions sorting implementation Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 12/32] kexec: add helper to exlude a region from a set of memory ranges Russell King
2016-06-07  4:55   ` Pratyush Anand
2016-06-06 16:59 ` [PATCH kexec-tools v2 13/32] arm: fix pointer signedness warning in kexec-uImage-arm.c Russell King
2016-06-06 16:59 ` [PATCH kexec-tools v2 14/32] arm: fix off-by-one on memory end Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 15/32] arm: fix get_kernel_stext_sym() to close its file Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 16/32] arm: fix ELF32/ELF64 check Russell King
2016-06-07  5:41   ` Pratyush Anand
2016-06-06 17:00 ` [PATCH kexec-tools v2 17/32] arm: return proper error for missing crash kernel Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 18/32] arm: report if crash kernel is out of bounds Russell King
2016-06-07  5:41   ` Pratyush Anand
2016-06-06 17:00 ` [PATCH kexec-tools v2 19/32] arm: add memory ranges debug Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 20/32] arm: add maximum number of memory ranges Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 21/32] arm: parse crash_reserved_mem early Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 22/32] arm: use generic mem_region sorting implementation Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 23/32] arm: move crash system RAM parsing earlier Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 24/32] arm: add support for platforms with boot memory aliases Russell King
2016-06-06 17:00 ` [PATCH kexec-tools v2 25/32] arm: crashdump needs boot alias of crash kernel region Russell King
2016-06-06 17:00 ` Russell King [this message]
2016-06-06 17:01 ` [PATCH kexec-tools v2 27/32] arm: add support for multiple reserved regions Russell King
2016-06-06 17:01 ` [PATCH kexec-tools v2 28/32] arm: add support for boot-time crash kernel resource Russell King
2016-06-06 17:01 ` [PATCH kexec-tools v2 29/32] arm: add debug of reserved and coredump memory ranges Russell King
2016-06-06 17:01 ` [PATCH kexec-tools v2 30/32] arm: fix type of phys_offset Russell King
2016-06-06 17:01 ` [PATCH kexec-tools v2 31/32] arm: clean up phys/page offset debug Russell King
2016-06-06 17:01 ` [PATCH kexec-tools v2 32/32] arm: report which ELF core format we will use Russell King
2016-06-08  0:27 ` [PATCH kexec-tools v2 00/32] Keystone II updates for kexec tools Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1b9xtZ-0003tw-VT@e0050434b2927.dyn.armlinux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).