From: Andrew Morton <akpm@linux-foundation.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-arch@vger.kernel.org,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Linux/m68k <linux-m68k@vger.kernel.org>
Subject: Re: [PATCH] initrd: Fix virtual/physical mix-up in overwrite test
Date: Tue, 18 Dec 2007 12:31:19 -0800 [thread overview]
Message-ID: <20071218123119.54262974.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0712182051050.24841@anakin>
On Tue, 18 Dec 2007 20:52:07 +0100 (CET) Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, 18 Dec 2007, Andrew Morton wrote:
> > On Sun, 16 Dec 2007 11:51:00 +0100 (CET) Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On recent kernels, I get the following error when using an initrd:
> > >
> > > | initrd overwritten (0x00b78000 < 0x07668000) - disabling it.
> > >
> > > My Amiga 4000 has 12 MiB of RAM at physical address 0x07400000 (virtual
> > > 0x00000000).
> > > The initrd is located at the end of RAM: 0x00b78000 - 0x00c00000 (virtual).
> > > The overwrite test compares the (virtual) initrd location to the (physical)
> > > first available memory location, which fails.
> > >
> > > This patch converts initrd_start to a page frame number, so it can be safely
> > > compared with min_low_pfn.
> > >
> > > Before the introduction of discontiguous memory support on m68k
> > > (12d810c1b8c2b913d48e629e2b5c01d105029839), min_low_pfn was just left
> > > untouched by the m68k-specific code (zero, I guess), and everything worked
> > > fine.
> >
> > breaks x86.
> >
> > init/main.c: In function 'start_kernel':
> > init/main.c:601: error: implicit declaration of function 'virt_to_pfn'
> > init/main.c:603: warning: format '%08lx' expects type 'long unsigned int', but argument 2 has type 'int'
>
> Interestingly, virt_to_pfn() exists on a few architectures only :-(
>
> So what's the correct portable construct to use instead?
>
I guess page_to_pfn(virt_to_page(addr))?
next prev parent reply other threads:[~2007-12-18 20:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-16 10:51 [PATCH] initrd: Fix virtual/physical mix-up in overwrite test Geert Uytterhoeven
2007-12-17 4:14 ` Roman Zippel
2007-12-18 11:01 ` Andrew Morton
2007-12-18 19:52 ` Geert Uytterhoeven
2007-12-18 20:31 ` Andrew Morton [this message]
2007-12-23 10:43 ` Geert Uytterhoeven
2008-06-15 14:07 ` Geert Uytterhoeven
2008-06-16 1:11 ` Andrew Morton
2008-06-16 6:20 ` Geert Uytterhoeven
2008-06-16 7:04 ` Geert Uytterhoeven
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=20071218123119.54262974.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@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