Subject: allocating non-cached memory in the kernel

From: Stuart Adams <[email-masked]>
Date: Thu, 24 Feb 2000 09:55:21 -0500

How do I allocate a non-cached/non-buffered chunk of
 memory in the kernel ?? (an equivalent of kmalloc)

Thanks !
   Stuart

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Philip Blundell <[email-masked]>
Date: Thu, 24 Feb 2000 19:26:29 +0000

> memory in the kernel ?? (an equivalent of kmalloc)

There is no direct equivalent.  In 2.3 kernels, see the routines in 
arch/arm/mm/consistent.c.  For 2.2 you will probably have to provide your own 
implementation using __get_free_page and __ioremap.

p.

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Fri, 25 Feb 2000 08:08:02 +0000 (GMT)

> implementation using __get_free_page and __ioremap.

Please note that in 2.3 kernels, that consistent API is currently subject to
change, and is unofficial.  ie, just because it exists, it does not mean it
should be used.

The correct API is to use the PCI consistent macros, but with a NULL pci_dev.
Please see linux/Documentation/DMA-mapping.txt for more information.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |