From: Franck Bui-Huu <franck.bui-huu@innova-card.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bootmem.c clean up bad pfn convertions
Date: Mon, 11 Apr 2005 10:22:51 +0200 [thread overview]
Message-ID: <425A33DB.1060302@innova-card.com> (raw)
In-Reply-To: <1113004359.16633.6.camel@localhost>
Dave Hansen wrote:
>The only arch with phys_to_pfn() defined is UML, so the patch simply
>won't compile anything but UML on current kernels (unless I'm missing
>something).
>
>
oops, I forgot to send the part of the patch that defines these macros,
sorry.
>Could you try to give us a more complete description of your problem? I
>know your memory doesn't start at 0x0, but what problems does that
>cause? Does the mem_map[] allocation blow up, etc...
>
>
yes, it actually intends to solve that.
>If it's just mem_map[], That calculation could be fixed pretty easily.
>Something like
>
>+#ifdef CONFIG_CRAZY_MIPS_FOO_MEM_MAP_START...
>+extern unsigned long mem_map_start_pfn
>+#else
>+#define mem_map_start_pfn 0UL
>+#endif
>-#define pfn_to_page(pfn) (mem_map + (pfn))
>+#define pfn_to_page(pfn) (mem_map + (pfn) - mem_map_start_pfn)
>
>
>
>
This is another solution indeed...But you will have to define another
constant which
will be used for virtual to physical address convertion. In my case I have
#define phys_to_pfn(x) (((x) - PHYS_START) >> PAGE_SHIFT)
#define pa(x) ((x) - PAGE_OFFSET + PHYS_START)
and "pfn_to_page" stays untouch.
But I expect your solution easier to implement since as you said
previously no arch
defines "phys_to_pfn".
Thanks
Franck.
-------------------------------------------------------------------------------
Come to visit Innova Card at CTST (Las Vegas, April 11-14, 2005) on booth 559
and Cards Asia (Singapore, April 27-29, 2005) on booth 4A04 !
links:
- www.ctst.com
- www.worldofcards.biz/2005/cardsa_SG/
-------------------------------------------------------------------------------
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system.
Innova Card will not therefore be liable for the message if modified.
prev parent reply other threads:[~2005-04-11 8:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-08 13:32 [PATCH] bootmem.c clean up bad pfn convertions Franck Bui-Huu
2005-04-08 23:52 ` Dave Hansen
2005-04-11 8:22 ` Franck Bui-Huu [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=425A33DB.1060302@innova-card.com \
--to=franck.bui-huu@innova-card.com \
--cc=haveblue@us.ibm.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