public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Kmalloc from ethernet driver
@ 2005-07-22 18:40 mkhoyila
  2005-07-22 18:42 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: mkhoyila @ 2005-07-22 18:40 UTC (permalink / raw)
  To: ecos-discuss

I am trying to use Kmalloc from my ethernet driver. Is this the proper way
to allocate memory to my buffers?

If so, how should I access the slab.h file from my driver code? I need
specific #include<> please. I tried #include <linux/slab.h> and did not
find the file. thank.

MHK


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Kmalloc from ethernet driver
  2005-07-22 18:40 [ECOS] Kmalloc from ethernet driver mkhoyila
@ 2005-07-22 18:42 ` Andrew Lunn
       [not found]   ` <61740.63.87.1.243.1122061800.squirrel@webmail.uci.edu>
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2005-07-22 18:42 UTC (permalink / raw)
  To: mkhoyila; +Cc: ecos-discuss

On Fri, Jul 22, 2005 at 11:42:04AM -0700, mkhoyila@uci.edu wrote:
> I am trying to use Kmalloc from my ethernet driver. Is this the proper way
> to allocate memory to my buffers?
> 
> If so, how should I access the slab.h file from my driver code? I need
> specific #include<> please. I tried #include <linux/slab.h> and did not
> find the file. thank.

Is this an eCos question or a Linux question?

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Kmalloc from ethernet driver
       [not found]   ` <61740.63.87.1.243.1122061800.squirrel@webmail.uci.edu>
@ 2005-07-22 19:50     ` mkhoyila
  2005-07-22 21:35     ` Andrew Lunn
  1 sibling, 0 replies; 4+ messages in thread
From: mkhoyila @ 2005-07-22 19:50 UTC (permalink / raw)
  To: ecos-discuss

> Yes, this is an eCos question. Can I use Kmalloc in my driver? If not how
> to you allocate memory to dma buffer pool? I there another way to allocate
> memory to the dma buffers? Thanks.
>
> MHK
>
>> On Fri, Jul 22, 2005 at 11:42:04AM -0700, mkhoyila@uci.edu wrote:
>>> I am trying to use Kmalloc from my ethernet driver. Is this the proper
>>> way
>>> to allocate memory to my buffers?
>>>
>>> If so, how should I access the slab.h file from my driver code? I need
>>> specific #include<> please. I tried #include <linux/slab.h> and did not
>>> find the file. thank.
>>
>> Is this an eCos question or a Linux question?
>>
>>         Andrew
>>
>
>



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Kmalloc from ethernet driver
       [not found]   ` <61740.63.87.1.243.1122061800.squirrel@webmail.uci.edu>
  2005-07-22 19:50     ` mkhoyila
@ 2005-07-22 21:35     ` Andrew Lunn
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2005-07-22 21:35 UTC (permalink / raw)
  To: mkhoyila; +Cc: eCos Disuss

On Fri, Jul 22, 2005 at 12:50:00PM -0700, mkhoyila@uci.edu wrote:
> Yes, this is an eCos question. Can I use Kmalloc in my driver? If not how
> to you allocate memory to dma buffer pool? I there another way to allocate
> memory to the dma buffers? Thanks.

Nope. kmalloc is a linux function. It does not exist in eCos. 

Take a look at other device drivers which use dma. It also depends a
lot on the target processor and what restrictions it places on
DMA'able memory, setting up the cache controller etc.

Another thing to be aware of. You cannot port a Linux device driver to
eCos because of license issues. Linux is GPL were as eCos is a
modified version of the GPL. If you port a Linux device driver its GPL
license infects the rest of eCos and the application so everything
becomes GPL. You then have to give out the sources to your application
which might not be what you want.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-22 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-22 18:40 [ECOS] Kmalloc from ethernet driver mkhoyila
2005-07-22 18:42 ` Andrew Lunn
     [not found]   ` <61740.63.87.1.243.1122061800.squirrel@webmail.uci.edu>
2005-07-22 19:50     ` mkhoyila
2005-07-22 21:35     ` Andrew Lunn

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 read-only IMAP folder(s) and NNTP newsgroup(s).