From: Ralf Baechle <ralf@linux-mips.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Kevin Cernekee <cernekee@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix virt_to_phys() warnings
Date: Thu, 2 Jul 2009 09:26:54 +0100 [thread overview]
Message-ID: <20090702082654.GA14804@linux-mips.org> (raw)
In-Reply-To: <87bpo3bm0t.fsf@basil.nowhere.org>
On Thu, Jul 02, 2009 at 09:07:46AM +0200, Andi Kleen wrote:
> From: Andi Kleen <andi@firstfloor.org>
> Date: Thu, 02 Jul 2009 09:07:46 +0200
> To: Andrew Morton <akpm@linux-foundation.org>
> Cc: Kevin Cernekee <cernekee@gmail.com>, linux-kernel@vger.kernel.org,
> Ralf Baechle <ralf@linux-mips.org>
> Subject: Re: [PATCH] Fix virt_to_phys() warnings
> Content-Type: text/plain; charset=us-ascii
>
> Andrew Morton <akpm@linux-foundation.org> writes:
> >
> > #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
> >
> > thereby passing an `unsigned long' where a void* was expected.
> >
> >
> > So perhaps something along these lines:
>
> I'm not quite sure it's the case on MIPS, but I remember on x86 one of
> the reasons this was done as a macro was to avoid a include dependency
> loop with struct page.
The MIPS <asm/page.h> uses a forward declaration for the same reason since
a very long time. These days struct page is defined in <linux/mm_types.h>
but that file needs pgprot_t (which is defined in <asm/page.h> ...) to be
defined first so can't be included from the to of page.h.
Ralf
next prev parent reply other threads:[~2009-07-02 8:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 0:13 [PATCH] Fix virt_to_phys() warnings Kevin Cernekee
2009-07-02 5:46 ` Andrew Morton
2009-07-02 7:07 ` Andi Kleen
2009-07-02 8:26 ` Ralf Baechle [this message]
2009-07-02 10:40 ` Ralf Baechle
2009-07-02 16:25 ` Andrew Morton
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=20090702082654.GA14804@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=cernekee@gmail.com \
--cc=linux-kernel@vger.kernel.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