From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: pmd_alloc() usage incorrect?
Date: Mon, 10 Oct 2005 11:37:45 +1000 [thread overview]
Message-ID: <1128908266.17365.107.camel@gaston> (raw)
In-Reply-To: <20051009202301.GC21977@colo.lackof.org>
On Sun, 2005-10-09 at 14:23 -0600, Grant Grundler wrote:
> Hi,
> I stumbled across what looks like incorrect code in
> arch/ppc/kernel/dma-mapping.c:
>
> static int __init dma_alloc_init(void)
> {
> ...
> do {
> pgd = pgd_offset(&init_mm, CONSISTENT_BASE);
> pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE);
> if (!pmd) {
> ...
>
> Doesn't pmd_alloc() want a pud_t * for the second parameter?
> ie also need to call pud_alloc() or the equivalent.
>
> I've very little clue how this works...just looking at different
> bits of code in my quest to understand it well enough to enable
> USE_HPPA_IOREMAP in include/asm-parisc/io.h.
In theory you are right... However, ppc32 uses a 2 level page tables, so
this doesn't matter, pud is folded into pgd (and pmd too in fact, you
probably don't need it neither). It would still be nicer to do the full
conversion to pud types though.
Ben.
prev parent reply other threads:[~2005-10-10 1:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-09 20:23 pmd_alloc() usage incorrect? Grant Grundler
2005-10-10 1:37 ` Benjamin Herrenschmidt [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=1128908266.17365.107.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=grundler@parisc-linux.org \
--cc=linuxppc-dev@ozlabs.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).