All of lore.kernel.org
 help / color / mirror / Atom feed
From: Songmao Tian <tiansm@lemote.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Dajie Tan <jiankemeng@gmail.com>, linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] 16K page size in 32 bit kernel
Date: Wed, 01 Aug 2007 08:47:41 +0800	[thread overview]
Message-ID: <46AFD82D.9070304@lemote.com> (raw)
In-Reply-To: <20070731204532.GA22036@linux-mips.org>

Ralf Baechle wrote:
> On Tue, Jul 31, 2007 at 09:49:34PM +0800, Songmao Tian wrote:
>
>   
>> I think the following is more complete?
>>
>> #ifdef CONFIG_64BIT_PHYS_ADDR
>> -#define PGDIR_SHIFT    21
>> +#define PGDIR_SHIFT    (PAGE_SHIFT + (PAGE_SHIFT + PTE_ORDER - 3))
>> #else
>> -#define PGDIR_SHIFT    22
>> +#define PGDIR_SHIFT    (PAGE_SHIFT + (PAGE_SHIFT + PTE_ORDER - 2))
>> #endif
>>     
>
> Better suggestion :-)
>
>   Ralf
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
> diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
> index 2fbd47e..ff29485 100644
> --- a/include/asm-mips/pgtable-32.h
> +++ b/include/asm-mips/pgtable-32.h
> @@ -43,11 +43,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
>   */
>  
>  /* PGDIR_SHIFT determines what a third-level page table entry can map */
> -#ifdef CONFIG_64BIT_PHYS_ADDR
> -#define PGDIR_SHIFT	21
> -#else
> -#define PGDIR_SHIFT	22
> -#endif
> +#define PGDIR_SHIFT	(2 * PAGE_SHIFT + PTE_ORDER - PTE_T_LOG2)
>  #define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
>  #define PGDIR_MASK	(~(PGDIR_SIZE-1))
>  
>
>
>   

Sure:)

Tian

      reply	other threads:[~2007-08-01  0:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 13:09 [PATCH] 16K page size in 32 bit kernel Dajie Tan
2007-07-31  9:37 ` Songmao Tian
2007-07-31  9:37   ` Songmao Tian
2007-07-31 10:00 ` Ralf Baechle
2007-07-31 13:49   ` Songmao Tian
2007-07-31 20:45     ` Ralf Baechle
2007-08-01  0:47       ` Songmao Tian [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=46AFD82D.9070304@lemote.com \
    --to=tiansm@lemote.com \
    --cc=jiankemeng@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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.