linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Josh Boyer" <jwboyer@gmail.com>
Cc: chretien@enseirb.fr, linuxppc-dev@ozlabs.org
Subject: Re: ioremap and vmalloc
Date: Fri, 19 Sep 2008 11:12:22 -0600	[thread overview]
Message-ID: <fa686aa40809191012q76d1c450ye12094ac63bc68a7@mail.gmail.com> (raw)
In-Reply-To: <20080919165833.GD4492@yoda.jdub.homelinux.org>

On Fri, Sep 19, 2008 at 10:58 AM, Josh Boyer <jwboyer@gmail.com> wrote:
> On Fri, Sep 19, 2008 at 06:45:01PM +0200, =?ISO-8859-1?Q?S=E9bastien_Chr=E9tien_ wrote:
>> if I write :
>> ioremap(0x20000000,0x40000) and ioremap(0x20000000,0x50000)
>>
>> Will it crash ?
>
> I have no idea.  You haven't given us enough information to really answer
> that.

But I can say that the second ioremap() call makes the first ioremap()
both redundant and inefficient.  You're using exactly the same base
address so the same region is getting mapped twice.  Since the second
call uses a bigger region than the first then the kernel will probably
need to allocate another chunk of virtual address space to map it
instead of reusing the first mapping.

g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2008-09-19 17:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 11:15 ioremap and vmalloc Sébastien Chrétien
2008-09-19 13:49 ` Grant Likely
2008-09-19 16:34   ` Sébastien Chrétien
2008-09-19 16:38     ` Josh Boyer
2008-09-19 16:45       ` Sébastien Chrétien
2008-09-19 16:58         ` Josh Boyer
2008-09-19 17:12           ` Grant Likely [this message]
2008-09-19 17:47             ` Sébastien Chrétien
2008-09-19 17:52           ` Sébastien Chrétien
2008-09-22  5:28         ` Benjamin Herrenschmidt
2008-09-19 16:43     ` Grant Likely

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=fa686aa40809191012q76d1c450ye12094ac63bc68a7@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=chretien@enseirb.fr \
    --cc=jwboyer@gmail.com \
    --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).