linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] MIPS:KDUMP: set a right value to kexec_indirection_page variable
@ 2014-07-31 11:42 Wei.Yang
  2014-08-04  3:46 ` Yang,Wei
  2014-08-25 14:42 ` Ralf Baechle
  0 siblings, 2 replies; 4+ messages in thread
From: Wei.Yang @ 2014-07-31 11:42 UTC (permalink / raw)
  To: ralf; +Cc: Wei.Yang, linux-mips, linux-kernel

From: Yang Wei <Wei.Yang@windriver.com>

Since there is not indirection page in crash type, so the vaule of the head
field of kimage structure is not equal to the address of indirection page but
IND_DONE. so we have to set kexec_indirection_page variable to the address of
the head field of image structure.

Signed-off-by: Yang Wei <Wei.Yang@windriver.com>

          Hi Ralf,

		  Please help me take a look at this patch, I have already verified it on Cavium 6100EVB board.

		  Thanks
		  Wei
---
 arch/mips/kernel/machine_kexec.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 992e184..531b70d 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -71,8 +71,13 @@ machine_kexec(struct kimage *image)
 	kexec_start_address =
 		(unsigned long) phys_to_virt(image->start);
 
-	kexec_indirection_page =
-		(unsigned long) phys_to_virt(image->head & PAGE_MASK);
+	if (image->type == KEXEC_TYPE_DEFAULT) {
+		kexec_indirection_page =
+			(unsigned long) phys_to_virt(image->head & PAGE_MASK);
+	} else {
+		kexec_indirection_page = (unsigned long)&image->head;
+	}
+	
 
 	memcpy((void*)reboot_code_buffer, relocate_new_kernel,
 	       relocate_new_kernel_size);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] MIPS:KDUMP: set a right value to kexec_indirection_page variable
  2014-07-31 11:42 [PATCH v1] MIPS:KDUMP: set a right value to kexec_indirection_page variable Wei.Yang
@ 2014-08-04  3:46 ` Yang,Wei
  2014-08-08  1:39   ` Yang,Wei
  2014-08-25 14:42 ` Ralf Baechle
  1 sibling, 1 reply; 4+ messages in thread
From: Yang,Wei @ 2014-08-04  3:46 UTC (permalink / raw)
  To: Wei.Yang, ralf; +Cc: linux-mips, linux-kernel

ping.

BR,
Wei
On 07/31/2014 07:42 PM, Wei.Yang@windriver.com wrote:
> From: Yang Wei <Wei.Yang@windriver.com>
>
> Since there is not indirection page in crash type, so the vaule of the head
> field of kimage structure is not equal to the address of indirection page but
> IND_DONE. so we have to set kexec_indirection_page variable to the address of
> the head field of image structure.
>
> Signed-off-by: Yang Wei <Wei.Yang@windriver.com>
>
>            Hi Ralf,
>
> 		  Please help me take a look at this patch, I have already verified it on Cavium 6100EVB board.
>
> 		  Thanks
> 		  Wei
> ---
>   arch/mips/kernel/machine_kexec.c |    9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
> index 992e184..531b70d 100644
> --- a/arch/mips/kernel/machine_kexec.c
> +++ b/arch/mips/kernel/machine_kexec.c
> @@ -71,8 +71,13 @@ machine_kexec(struct kimage *image)
>   	kexec_start_address =
>   		(unsigned long) phys_to_virt(image->start);
>   
> -	kexec_indirection_page =
> -		(unsigned long) phys_to_virt(image->head & PAGE_MASK);
> +	if (image->type == KEXEC_TYPE_DEFAULT) {
> +		kexec_indirection_page =
> +			(unsigned long) phys_to_virt(image->head & PAGE_MASK);
> +	} else {
> +		kexec_indirection_page = (unsigned long)&image->head;
> +	}
> +	
>   
>   	memcpy((void*)reboot_code_buffer, relocate_new_kernel,
>   	       relocate_new_kernel_size);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] MIPS:KDUMP: set a right value to kexec_indirection_page variable
  2014-08-04  3:46 ` Yang,Wei
@ 2014-08-08  1:39   ` Yang,Wei
  0 siblings, 0 replies; 4+ messages in thread
From: Yang,Wei @ 2014-08-08  1:39 UTC (permalink / raw)
  To: Yang,Wei, Wei.Yang, ralf; +Cc: linux-mips, linux-kernel

Ralf,

What do you think of this patch?

Thanks
Wei
On 08/04/2014 11:46 AM, Yang,Wei wrote:
> ping.
>
> BR,
> Wei
> On 07/31/2014 07:42 PM, Wei.Yang@windriver.com wrote:
>> From: Yang Wei <Wei.Yang@windriver.com>
>>
>> Since there is not indirection page in crash type, so the vaule of 
>> the head
>> field of kimage structure is not equal to the address of indirection 
>> page but
>> IND_DONE. so we have to set kexec_indirection_page variable to the 
>> address of
>> the head field of image structure.
>>
>> Signed-off-by: Yang Wei <Wei.Yang@windriver.com>
>>
>>            Hi Ralf,
>>
>>           Please help me take a look at this patch, I have already 
>> verified it on Cavium 6100EVB board.
>>
>>           Thanks
>>           Wei
>> ---
>>   arch/mips/kernel/machine_kexec.c |    9 +++++++--
>>   1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/mips/kernel/machine_kexec.c 
>> b/arch/mips/kernel/machine_kexec.c
>> index 992e184..531b70d 100644
>> --- a/arch/mips/kernel/machine_kexec.c
>> +++ b/arch/mips/kernel/machine_kexec.c
>> @@ -71,8 +71,13 @@ machine_kexec(struct kimage *image)
>>       kexec_start_address =
>>           (unsigned long) phys_to_virt(image->start);
>>   -    kexec_indirection_page =
>> -        (unsigned long) phys_to_virt(image->head & PAGE_MASK);
>> +    if (image->type == KEXEC_TYPE_DEFAULT) {
>> +        kexec_indirection_page =
>> +            (unsigned long) phys_to_virt(image->head & PAGE_MASK);
>> +    } else {
>> +        kexec_indirection_page = (unsigned long)&image->head;
>> +    }
>> +
>>         memcpy((void*)reboot_code_buffer, relocate_new_kernel,
>>              relocate_new_kernel_size);
>
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] MIPS:KDUMP: set a right value to kexec_indirection_page variable
  2014-07-31 11:42 [PATCH v1] MIPS:KDUMP: set a right value to kexec_indirection_page variable Wei.Yang
  2014-08-04  3:46 ` Yang,Wei
@ 2014-08-25 14:42 ` Ralf Baechle
  1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2014-08-25 14:42 UTC (permalink / raw)
  To: Wei.Yang; +Cc: linux-mips, linux-kernel

On Thu, Jul 31, 2014 at 07:42:29PM +0800, Wei.Yang@windriver.com wrote:

> From: Yang Wei <Wei.Yang@windriver.com>
> 
> Since there is not indirection page in crash type, so the vaule of the head
> field of kimage structure is not equal to the address of indirection page but
> IND_DONE. so we have to set kexec_indirection_page variable to the address of
> the head field of image structure.

Applied, thanks.

Your patch applies to 3.8-stable and newer only.  If you happen to have
patches for older kernels, I'd appreciate if you post them.

Thanks,

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-25 14:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 11:42 [PATCH v1] MIPS:KDUMP: set a right value to kexec_indirection_page variable Wei.Yang
2014-08-04  3:46 ` Yang,Wei
2014-08-08  1:39   ` Yang,Wei
2014-08-25 14:42 ` Ralf Baechle

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).