linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: sachinp@in.ibm.com
Cc: Olof Johansson <olof@lixom.net>,
	linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
	kexec@lists.infradead.org, Milton Miller II <miltonm@us.ibm.com>
Subject: Re: [Patch ] Kexec/Kdump support - POWER6
Date: Sat, 26 May 2007 08:43:07 +1000	[thread overview]
Message-ID: <1180132987.19517.9.camel@localhost.localdomain> (raw)
In-Reply-To: <4656A488.2020507@in.ibm.com>


>  
>  	/* 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, VRMA_HPTE_B_1TB,
> +						&dummy1, &dummy2);

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.

> +		if (lpar_rc == H_NOT_FOUND) {
> +			lpar_rc = plpar_pte_read_raw(0, i, &dword0, &dummy1);
> +			if (!lpar_rc && 
> +				(((dword0 >> 24) & VRMA_MASK) != VRMA_MASK))
> +				/* Can be hpte for 1TB Seg. So remove it */
> +				plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
> +		}
> +	}
>  }

In addition, I would recommend following Michael's advice and using
using the bulk remove Hcall whenever possible.

Cheers,
Ben.

  reply	other threads:[~2007-05-25 22:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 12:22 [Patch 0/2] Kexec/Kdump support POWER6 Sachin P. Sant
2007-05-22 12:24 ` [Patch 1/2] " Sachin P. Sant
2007-05-22 12:26   ` [Patch 2/2] " Sachin P. Sant
2007-05-22 15:34     ` Olof Johansson
2007-05-23  5:13       ` Sachin P. Sant
2007-05-23  5:14       ` Sachin P. Sant
2007-05-23  9:37       ` [Patch 2/2] Kexec/Kdump support - POWER6 Sachin P. Sant
2007-05-23 10:55         ` Paul Mackerras
2007-05-24 12:17           ` Mohan Kumar M
2007-05-24 14:21             ` Olof Johansson
2007-05-25  8:55               ` [Patch ] " Sachin P. Sant
2007-05-25 22:43                 ` Benjamin Herrenschmidt [this message]
2007-05-28 11:40                   ` Sachin P. Sant
2007-05-28 21:31                     ` Benjamin Herrenschmidt
2007-05-29  6:18                       ` Sachin P. Sant
2007-05-29  6:58                         ` Benjamin Herrenschmidt
2007-05-29 10:14                     ` Michael Ellerman
2007-05-29 11:06                       ` Stephen Rothwell

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=1180132987.19517.9.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=kexec@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=miltonm@us.ibm.com \
    --cc=olof@lixom.net \
    --cc=paulus@samba.org \
    --cc=sachinp@in.ibm.com \
    /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).