Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1301873 > unrolled thread

[PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with GART

Started byToshi Kani <toshi.kani@hpe.com>
First post2016-01-05 20:00 +0100
Last post2016-01-07 13:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with GART Toshi Kani <toshi.kani@hpe.com> - 2016-01-05 20:00 +0100
    Re: [PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with  GART Dave Young <dyoung@redhat.com> - 2016-01-07 13:40 +0100

#1301873 — [PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with GART

FromToshi Kani <toshi.kani@hpe.com>
Date2016-01-05 20:00 +0100
Subject[PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with GART
Message-ID<qNEZQ-6P2-21@gated-at.bofh.it>
There is no longer any driver inserting a "GART" region in the kernel
since 'commit 707d4eefbdb3 ("Revert "[PATCH] Insert GART region into
resource map"")' was made.

Remove the call to walk_iomem_res() with "GART", its callback function,
and GART-specific variables set by the callback.

Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Young <dyoung@redhat.com>
Cc: Minfei Huang <mhuang@redhat.com>
Cc: x86@kernel.org
Cc: kexec@lists.infradead.org
Link: http://lkml.kernel.org/r/<20160104110427.GA2965@dhcp-128-65.nay.redhat.com>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
---
 arch/x86/kernel/crash.c |   37 +------------------------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 082373b..f5069e7 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -56,10 +56,9 @@ struct crash_elf_data {
 	struct kimage *image;
 	/*
 	 * Total number of ram ranges we have after various adjustments for
-	 * GART, crash reserved region etc.
+	 * crash reserved region, etc.
 	 */
 	unsigned int max_nr_ranges;
-	unsigned long gart_start, gart_end;
 
 	/* Pointer to elf header */
 	void *ehdr;
@@ -190,17 +189,6 @@ static int get_nr_ram_ranges_callback(u64 start, u64 end, void *arg)
 	return 0;
 }
 
-static int get_gart_ranges_callback(u64 start, u64 end, void *arg)
-{
-	struct crash_elf_data *ced = arg;
-
-	ced->gart_start = start;
-	ced->gart_end = end;
-
-	/* Not expecting more than 1 gart aperture */
-	return 1;
-}
-
 
 /* Gather all the required information to prepare elf headers for ram regions */
 static void fill_up_crash_elf_data(struct crash_elf_data *ced,
@@ -215,22 +203,6 @@ static void fill_up_crash_elf_data(struct crash_elf_data *ced,
 
 	ced->max_nr_ranges = nr_ranges;
 
-	/*
-	 * We don't create ELF headers for GART aperture as an attempt
-	 * to dump this memory in second kernel leads to hang/crash.
-	 * If gart aperture is present, one needs to exclude that region
-	 * and that could lead to need of extra phdr.
-	 */
-	walk_iomem_res("GART", IORESOURCE_MEM, 0, -1,
-				ced, get_gart_ranges_callback);
-
-	/*
-	 * If we have gart region, excluding that could potentially split
-	 * a memory range, resulting in extra header. Account for  that.
-	 */
-	if (ced->gart_end)
-		ced->max_nr_ranges++;
-
 	/* Exclusion of crash region could split memory ranges */
 	ced->max_nr_ranges++;
 
@@ -339,13 +311,6 @@ static int elf_header_exclude_ranges(struct crash_elf_data *ced,
 			return ret;
 	}
 
-	/* Exclude GART region */
-	if (ced->gart_end) {
-		ret = exclude_mem_range(cmem, ced->gart_start, ced->gart_end);
-		if (ret)
-			return ret;
-	}
-
 	return ret;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1303539 — Re: [PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with GART

FromDave Young <dyoung@redhat.com>
Date2016-01-07 13:40 +0100
SubjectRe: [PATCH v3 15/17] x86/kexec: Remove walk_iomem_res() call with GART
Message-ID<qOi1c-86g-9@gated-at.bofh.it>
In reply to#1301873
On 01/05/16 at 11:54am, Toshi Kani wrote:
> There is no longer any driver inserting a "GART" region in the kernel
> since 'commit 707d4eefbdb3 ("Revert "[PATCH] Insert GART region into
> resource map"")' was made.
> 
> Remove the call to walk_iomem_res() with "GART", its callback function,
> and GART-specific variables set by the callback.
> 
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Minfei Huang <mhuang@redhat.com>
> Cc: x86@kernel.org
> Cc: kexec@lists.infradead.org
> Link: http://lkml.kernel.org/r/<20160104110427.GA2965@dhcp-128-65.nay.redhat.com>
> Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> ---
>  arch/x86/kernel/crash.c |   37 +------------------------------------
>  1 file changed, 1 insertion(+), 36 deletions(-)
> 
> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> index 082373b..f5069e7 100644
> --- a/arch/x86/kernel/crash.c
> +++ b/arch/x86/kernel/crash.c
> @@ -56,10 +56,9 @@ struct crash_elf_data {
>  	struct kimage *image;
>  	/*
>  	 * Total number of ram ranges we have after various adjustments for
> -	 * GART, crash reserved region etc.
> +	 * crash reserved region, etc.
>  	 */
>  	unsigned int max_nr_ranges;
> -	unsigned long gart_start, gart_end;
>  
>  	/* Pointer to elf header */
>  	void *ehdr;
> @@ -190,17 +189,6 @@ static int get_nr_ram_ranges_callback(u64 start, u64 end, void *arg)
>  	return 0;
>  }
>  
> -static int get_gart_ranges_callback(u64 start, u64 end, void *arg)
> -{
> -	struct crash_elf_data *ced = arg;
> -
> -	ced->gart_start = start;
> -	ced->gart_end = end;
> -
> -	/* Not expecting more than 1 gart aperture */
> -	return 1;
> -}
> -
>  
>  /* Gather all the required information to prepare elf headers for ram regions */
>  static void fill_up_crash_elf_data(struct crash_elf_data *ced,
> @@ -215,22 +203,6 @@ static void fill_up_crash_elf_data(struct crash_elf_data *ced,
>  
>  	ced->max_nr_ranges = nr_ranges;
>  
> -	/*
> -	 * We don't create ELF headers for GART aperture as an attempt
> -	 * to dump this memory in second kernel leads to hang/crash.
> -	 * If gart aperture is present, one needs to exclude that region
> -	 * and that could lead to need of extra phdr.
> -	 */
> -	walk_iomem_res("GART", IORESOURCE_MEM, 0, -1,
> -				ced, get_gart_ranges_callback);
> -
> -	/*
> -	 * If we have gart region, excluding that could potentially split
> -	 * a memory range, resulting in extra header. Account for  that.
> -	 */
> -	if (ced->gart_end)
> -		ced->max_nr_ranges++;
> -
>  	/* Exclusion of crash region could split memory ranges */
>  	ced->max_nr_ranges++;
>  
> @@ -339,13 +311,6 @@ static int elf_header_exclude_ranges(struct crash_elf_data *ced,
>  			return ret;
>  	}
>  
> -	/* Exclude GART region */
> -	if (ced->gart_end) {
> -		ret = exclude_mem_range(cmem, ced->gart_start, ced->gart_end);
> -		if (ret)
> -			return ret;
> -	}
> -
>  	return ret;
>  }
>  

Reviewed-by: Dave Young <dyoung@redhat.com>

Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web