linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <damm@opensource.se>
To: Rupesh S <rupeshs@myw.ltindia.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Why not kmalloc() ??
Date: Fri, 16 Jul 2004 13:34:42 +0200	[thread overview]
Message-ID: <1089977681.27006.90.camel@kubu.opensource.se> (raw)
In-Reply-To: <s0f7edc2.025@EMAIL>


On Fri, 2004-07-16 at 11:25, Rupesh S wrote:
> Hi,
>
> I just figured out that I need to use m8xx_cpm_hostalloc() to allocate memory for "buffer" that needs to be attached to the "Buffer Descriptor" of an  MPC8xx CPM peripheral (like IIC, SPI, SCC etc). Instead, if I try to use kmalloc() or a static memory allocation, my driver isn't working.
>
> 1) Can somebody throw some light on what exactly is the difference between m8xx_cpm_hostalloc() and kmalloc().

kmalloc allocates from the kernel memory pool, ie your sdram.
you usually have several megabytes of sdram.
hostalloc allocates memory from the internal dpram area in the mpc8xx
processor. a mpc8xx-processor usually has around 4-8 kilobyte dpram.

> 2) Why is the difference important in ppc linux ?

the dpram (dual port ram) is used to communicate with the cpm devices
such as scc:s and smc.s found inside processors from the mpc8xx family.
the powerpc core has access to one side, the cpm has access to the other
side of the dual port memory. sort of anyway.

consult your friendly mpc8xx manual for further info.

/magnus


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2004-07-16 11:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-16  9:25 Why not kmalloc() ?? Rupesh S
2004-07-16 10:25 ` kernel 2.4.26 doesn't seem to work with a MPC859T Pedro Aguilar
2004-07-16 11:34 ` Magnus Damm [this message]
2004-07-16 12:06   ` Why not kmalloc() ?? sanjeev ramachandran
2004-07-16 13:32     ` Dan Malek
2004-07-16 14:06       ` Mark Chambers
2004-07-16 15:42         ` Rune Torgersen
2004-07-16 19:03           ` Dan Malek
2004-07-16 19:02         ` Dan Malek
2004-07-16 13:29   ` Dan Malek
2004-07-16 11:46 ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2004-07-17  4:51 Rupesh S

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=1089977681.27006.90.camel@kubu.opensource.se \
    --to=damm@opensource.se \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=rupeshs@myw.ltindia.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).