From: "Ho Lee" <flylist@linuxkernel.net>
To: "Chris Elston" <chris.elston@radstone.co.uk>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: MTD Mapping driver - out of vmalloc space
Date: Fri, 8 Apr 2005 10:51:05 -0700 [thread overview]
Message-ID: <013c01c53c63$8b4e98e0$0d02a8c0@acting> (raw)
In-Reply-To: F38DEABE0E171746B133C1ABBD142D9703691AFD@radmail.Radstone.Local
Hi Chris,
How about setting PAGE_OFFSET to 0x80000000, that is 2G/2G split?
It would make enough virtual address space. I've never tried on PPC,
so I don't know the side effect of this.
-- Ho
----- Original Message -----
From: "Chris Elston" <chris.elston@radstone.co.uk>
To: <linuxppc-embedded@ozlabs.org>
Sent: Friday, April 08, 2005 7:42 AM
Subject: MTD Mapping driver - out of vmalloc space
Dear all,
I'm writing an MTD mapping driver for a board with (up to) 512M SDRAM, and
(up to) 256M Flash and I've hit a bit of a problem. The standard way to write
a mapping driver seems to be to map the whole of the Flash into kernel virtual
memory space. While this is not a problem for small Flash devices, I'm hitting
the limit of the vmalloc space.
So I decided to modify my mapping driver to work through a smaller virtual
addressing window.
Basically, all reads/writes are redirected through my custom functions which
first ensure that the correct physical address range is mapped into virtual
space and then drop through to the standard read/write functions. The mapping
is achieved using ioremap/iounmap calls. (code attached)
David Woodhouse pointed out that this approach is not viable because the reads
and writes must be atomic - and ioremap can potentially sleep. So I'm stuck as
to how to proceed.
Ideally what I'd like is to be able to allocate a block of virtual addresses at
init time and then dynamically modify the physical address range that it refers to.
Since I wouldn't be requesting any more vmalloc space - just changing the mapping
for the space I have got - I'd hopefully be able to make this a non-blocking
operation. Unfortunately I have no idea how to go about this - or even if it's
possible :)
Thanks in advance,
Chris.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--------------------------------------------------------------------------------
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
next prev parent reply other threads:[~2005-04-08 18:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-08 14:42 MTD Mapping driver - out of vmalloc space Chris Elston
2005-04-08 17:51 ` Ho Lee [this message]
2005-04-08 18:39 ` Matt Porter
2005-04-08 18:39 ` Mark A. Greer
2005-04-08 18:48 ` Eugene Surovegin
-- strict thread matches above, loose matches on Subject: below --
2005-04-12 10:07 Chris Elston
2005-04-15 5:45 ` Jörn Engel
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='013c01c53c63$8b4e98e0$0d02a8c0@acting' \
--to=flylist@linuxkernel.net \
--cc=chris.elston@radstone.co.uk \
--cc=linuxppc-embedded@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).