linux-mips
[Top] [All Lists]

Re: TITAN GE driver

To: "Anoop P.A." <Anoop_P.A@pmc-sierra.com>
Subject: Re: TITAN GE driver
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 2 Jun 2010 15:15:51 +0100
Cc: linux-mips <linux-mips@linux-mips.org>
In-reply-to: <A7DEA48C84FD0B48AAAE33F328C0201404E2DCA0@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
References: <A7DEA48C84FD0B48AAAE33F328C0201404E2D834@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca> <20100528162722.GB7148@linux-mips.org> <A7DEA48C84FD0B48AAAE33F328C0201404E2DC94@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca> <20100602083255.GA23868@linux-mips.org> <A7DEA48C84FD0B48AAAE33F328C0201404E2DCA0@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.20 (2009-08-17)
On Wed, Jun 02, 2010 at 01:58:06AM -0700, Anoop P.A. wrote:

> [Anoop P.A.] You mean there are some flags available to force kmalloc to
> allocate memory below some address? I couldn't find one in kmalloc man
> pages.
> 
> BTW I am using 64 bit kernel.

There are:

 o GFP_DMA which usually means to allocate memory accessible to ISA DMA
   devices.
 o GFP_DMA32 which means memory in the low physical 4GB, that is memory
   accessible by 32-bit DMA devices.
 o GFP_HIGHMEM means any type of memory, even highmem.

All need to be explicitly supported by platform code which the existing
code doesn't.

Passing none of these flags would mean to allocate any non-highmem.  On
32-bit kernels that would be below 512MB physical but on 64-bit kernels
where there never is highmem it would just mean to allocate any memory.

I just hope the NIC isn't as braindead as you were describing but I got
no time to read up the docs again.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>