From: Dan Malek <dan@embeddededge.com>
To: Prashant Alange <prashant.alange@gmail.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: How to disable dcache on MPC82xx platform
Date: Tue, 9 Aug 2005 12:37:43 -0400 [thread overview]
Message-ID: <e0e99d07a5f20187cf45caac1ee9fa10@embeddededge.com> (raw)
In-Reply-To: <6d145b42050809075718c70574@mail.gmail.com>
On Aug 9, 2005, at 10:57 AM, Prashant Alange wrote:
> Since the existing UART/ethernet drivers are using cpm_hostalloc() so
> I am also using the same function.
As I have said too many times before, cpm_hostalloc() is only used
to allocate small memory regions that would otherwise be wasteful
with the normal Linux memory allocators. This function does not
do anything special with the memory, aside from allowing us have
multiple drivers share a page for efficiency.
> Then can I use kmalloc() to alloc
> such huge memory.
Yes, and you should.
> If at all I have to configure BATx to just test how
> it behaves.
No, that's not all you have to do. It's not a trivial process
easily described here.
> ..... One more thing is that
> totally I am allocating about 1MB memory in a chunk of 200K.
I can't comprehend a reason why you need to allocate so much
space in a driver, especially for CPM devices. The driver is just
a temporary FIFO for data flowing to/from other consumer/producers
of the data in the system. If the software above a driver needs
that kind of buffering, it should manage that itself.
If you do need so much space, use the beauty of the CPM and
link multiple BDs with reasonable sized buffers more easily
managed by the existing Linux allocators.
The other alternative is just reserve memory using the 'mem='
start parameter so it isn't know to Linux, and manage entirely
yourself.
-- Dan
next prev parent reply other threads:[~2005-08-09 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-09 2:30 How to disable dcache on MPC82xx platform Prashant Alange
2005-08-09 14:37 ` Dan Malek
2005-08-09 14:57 ` Prashant Alange
2005-08-09 16:37 ` Dan Malek [this message]
2005-08-09 21:50 ` Prashant Alange
2005-08-09 22:28 ` Dan Malek
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=e0e99d07a5f20187cf45caac1ee9fa10@embeddededge.com \
--to=dan@embeddededge.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=prashant.alange@gmail.com \
/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).