All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Tollefson <kniht@linux.vnet.ibm.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Generalize hpte_decode()
Date: Thu, 10 May 2007 17:33:01 -0500	[thread overview]
Message-ID: <46439D9D.8080609@linux.vnet.ibm.com> (raw)
In-Reply-To: <17986.44428.934539.499645@cargo.ozlabs.ibm.com>

Paul Mackerras wrote:
> This adds the necessary support to hpte_decode() to handle 1TB
> segments and 16GB pages, and also removes an uninitialized value
> warning on avpn.
>
> We don't have any code to generate HPTEs for 1TB segments or 16GB
> pages yet, so this is mostly for completeness, and also to fix the
> warning.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
>
> diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
> index 7b7fe2d..7d722ee 100644
> --- a/arch/powerpc/mm/hash_native_64.c
> +++ b/arch/powerpc/mm/hash_native_64.c
> @@ -376,31 +376,28 @@ static void hpte_decode(hpte_t *hpte, unsigned long slot,
>  		}
>  	}
>
> -	/*
> -	 * FIXME, the code below works for 16M, 64K, and 4K pages as these
> -	 * fall under the p<=23 rules for calculating the virtual address.
> -	 * In the case of 16M pages, an extra bit is stolen from the AVPN
> -	 * field to achieve the requisite 24 bits.
> -	 *
> -	 * Does not work for 16G pages or 1 TB segments.
> -	 */
> +	/* This works for all page sizes, and for 256M and 1T segments */
>  	shift = mmu_psize_defs[size].shift;
> -	if (mmu_psize_defs[size].avpnm)
> -		avpnm_bits = __ilog2_u64(mmu_psize_defs[size].avpnm) + 1;
>   
The variable avpnm_bits doesn't appear to be used anymore.  Does it make 
sense to remove it's declaration?

Jon

      parent reply	other threads:[~2007-05-10 22:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10  5:28 [PATCH] Generalize hpte_decode() Paul Mackerras
2007-05-10  5:40 ` Benjamin Herrenschmidt
2007-05-10 22:33 ` Jon Tollefson [this message]

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=46439D9D.8080609@linux.vnet.ibm.com \
    --to=kniht@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.