From: Joel Schopp <jschopp@austin.ibm.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: linux-mm <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Use of __pa() with CONFIG_NONLINEAR
Date: Wed, 28 Jul 2004 11:20:06 -0500 [thread overview]
Message-ID: <4107D236.9090601@austin.ibm.com> (raw)
In-Reply-To: <1090965630.15847.575.camel@nighthawk>
> This is the largest and hardest to maintain part of the CONFIG_NONLINEAR
> patch at this point, and I'd love to start merging bits of it back in.
> Would anybody object to a patch that just does this for a bunch of
> architectures?
I like the idea but would suggest a comment with the #defines to better
explain why there are two names for the same thing, how they might in
fact be different things in the future, and which one to use where.
>
> --- include/asm-i386/page.h.orig 2004-07-27 14:31:09.000000000 -0700
> +++ include/asm-i386/page.h 2004-07-27 14:31:36.000000000 -0700
> @@ -128,8 +128,10 @@ static __inline__ int get_order(unsigned
> #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
> #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE)
> #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
> -#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
> -#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
> +#define __boot_pa(x) ((unsigned long)(x)-PAGE_OFFSET)
> +#define __boot_va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
> +#define __pa(x) __boot_pa(x)
> +#define __va(x) __boot_va(x)
> #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
> #ifndef CONFIG_DISCONTIGMEM
> #define pfn_to_page(pfn) (mem_map + (pfn))
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-07-28 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-27 22:00 Dave Hansen
2004-07-28 16:20 ` Joel Schopp [this message]
2004-07-28 18:16 ` Mike Kravetz
2004-07-28 19:47 ` Martin J. Bligh
2004-07-28 20:13 ` Dave Hansen
2004-07-28 20:15 ` Martin J. Bligh
2004-07-28 20:23 ` Dave Hansen
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=4107D236.9090601@austin.ibm.com \
--to=jschopp@austin.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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