[Patch ] Kexec/Kdump support - POWER6

Michael Ellerman michael at ellerman.id.au
Tue May 29 20:14:44 EST 2007


On Mon, 2007-05-28 at 17:10 +0530, Sachin P. Sant wrote:
> Benjamin Herrenschmidt wrote:
> > If you're going to use the B (1T segment) bit instead of the bolted bit,
> > at least define a proper constant in line with the existing naming of
> > the hash table constants in mmu-hash64.h. I would suggest doing the same
> > with the VRMA_MASK/VALUE thing and calling it HPTE_V_VRMA_MASK or
> > something similar.
> >   
> Well i had used them properly in my previous patches. Don't know why
> i changed it in this patch :-( 
> 
> Here is the updated patch. 
> 
> >> +	}
> >>  }
> >>     
> > In addition, I would recommend following Michael's advice and using
> > using the bulk remove Hcall whenever possible.
> >   
> Yes will send out a separate patch to use bulk remove Hcall.
> 
> Thanks
> -Sachin
> 
> 
> Signed-off-by : Sachin Sant <sachinp at in.ibm.com>
> Signed-off-by : Mohan Kumar M <mohan at in.ibm.com>
> ---
> 
> 
> 
> 
> plain text document attachment (kexec-kdump-support-on-POWER6)
> * On Power machines supporting VRMA, Kexec/Kdump does not work.
> * Hypervisor stores VRMA mapping used by the OS, in the hpte hash tables.
> * Make sure these hpte entries are left untouched.
> *
> * This patch also adds plpar_pte_read_raw() on the lines of
> * plpar_pte_remove_raw().
> 
> Signed-off-by : Sachin Sant <sachinp at in.ibm.com>
> Signed-off-by : Mohan Kumar M <mohan at in.ibm.com>
> ---
> 
> diff -Naurp a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> --- a/arch/powerpc/platforms/pseries/lpar.c	2007-05-19 09:36:17.000000000 +0530
> +++ b/arch/powerpc/platforms/pseries/lpar.c	2007-05-28 16:49:46.000000000 +0530
> @@ -369,16 +369,30 @@ static long pSeries_lpar_hpte_remove(uns
>  	return -1;
>  }
>  
> +#define HPTE_V_1TB_SEG		ASM_CONST(0x4000000000000000)
> +#define HPTE_V_VRMA_MASK	ASM_CONST(0x4001ffffff)
> +
>  static void pSeries_lpar_hptab_clear(void)
>  {
>  	unsigned long size_bytes = 1UL << ppc64_pft_size;
>  	unsigned long hpte_count = size_bytes >> 4;
> -	unsigned long dummy1, dummy2;
> +	unsigned long dummy1, dummy2, dword0;
> +	long lpar_rc;
>  	int i;
>  
>  	/* TODO: Use bulk call */
> -	for (i = 0; i < hpte_count; i++)
> -		plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
> +	for (i = 0; i < hpte_count; i++) {
> +		/* dont remove HPTEs with VRMA mappings */
> +		lpar_rc = plpar_pte_remove_raw(H_ANDCOND, i, HPTE_V_1TB_SEG,
> +						&dummy1, &dummy2);
> +		if (lpar_rc == H_NOT_FOUND) {
> +			lpar_rc = plpar_pte_read_raw(0, i, &dword0, &dummy1);
> +			if (!lpar_rc && (((dword0 >> 24) & HPTE_V_VRMA_MASK) <xxxxxxx

You have trailing whitespace on that line.

Add this to your ~/.vimrc, you do use vim right :)

highlight RedundantWhitespace ctermbg=red guibg=red

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070529/457b1923/attachment.pgp>


More information about the Linuxppc-dev mailing list