From: Dave Hansen <dave@linux.vnet.ibm.com>
To: benh@kernel.crashing.org
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: Should ppc32 use CONFIG_HIGHPTE or not?
Date: Fri, 01 May 2009 11:37:03 -0700 [thread overview]
Message-ID: <1241203023.29485.218.camel@nimitz> (raw)
arch/powerpc/mm/pgtable_32.c has the following function:
pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
{
struct page *ptepage;
#ifdef CONFIG_HIGHPTE
gfp_t flags = GFP_KERNEL | __GFP_HIGHMEM | __GFP_REPEAT | __GFP_ZERO;
#else
gfp_t flags = GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO;
#endif
...
But there's no trace of CONFIG_HIGHPTE anywhere in arch/powerpc. But,
the one and only definition on 32-bit of pte_offset_map() (in
arch/powerpc/include/asm/pgtable-ppc32.h) seems to have HIGHPTE
semantics:
#define pte_offset_map(dir, addr) \
((pte_t *) kmap_atomic(pmd_page(*(dir)), KM_PTE0) + pte_index(addr))
#define pte_offset_map_nested(dir, addr) \
((pte_t *) kmap_atomic(pmd_page(*(dir)), KM_PTE1) + pte_index(addr))
So, it looks like ppc32 never actually allocates highmem pte pages, but
it *does* go to the trouble of at least trying to kmap_atomic() them.
Should we just give ppc32 unconditional direct-mapped ptes? Or, should
we remove that #ifdef and let it allocate them in highmem when it can
since we also have the code to support that?
-- Dave
next reply other threads:[~2009-05-01 18:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-01 18:37 Dave Hansen [this message]
2009-05-01 20:14 ` Should ppc32 use CONFIG_HIGHPTE or not? Benjamin Herrenschmidt
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=1241203023.29485.218.camel@nimitz \
--to=dave@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--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 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).