LKML Archive on
help / color / mirror / Atom feed
From: Asgard <>
To: "Martyn Welch" <>,
Subject: Re: alloc_bootmem - Kernel panic
Date: Wed, 7 Feb 2007 21:24:20 +0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <F38DEABE0E171746B133C1ABBD142D9706325502@radmail.Radstone.Local>

On 2/7/07, Martyn Welch <> wrote:
> Which leads me to the question: what is the best method to reserve a large (~4MB) coherent buffer for DMA transfers?

May be you should to use alloc_pages with __GFP_DMA flag, and then use
page_address to get address of first allocated page.

> Is there any way of using alloc_bootmem from a driver (compiled into the kernel) without delving further into kernel code?

yes, i think:

-> (~/devel/learn/src/kernels/linux-2.6.19)
[asgard@midgard]$ find drivers/ -name "*" | xargs grep alloc_bootmem
drivers/char/vt.c:        vc_cons[currcons].d = vc =
alloc_bootmem(sizeof(struct vc_data));
drivers/char/vt.c:        vc->vc_screenbuf = (unsigned short
Binary file drivers/char/vt.o matches
Binary file drivers/char/built-in.o matches
Binary file drivers/firmware/dmi_scan.o matches
Binary file drivers/firmware/built-in.o matches
drivers/macintosh/smu.c:    smu = alloc_bootmem(sizeof(struct smu_device));
drivers/s390/char/con3215.c:        req = (struct raw3215_req *)
alloc_bootmem_low(sizeof(struct raw3215_req));
drivers/s390/char/con3215.c:        alloc_bootmem_low(sizeof(struct
drivers/s390/char/con3215.c:    raw->buffer = (char *)
drivers/s390/char/con3215.c:    raw->inbuf = (char *)
drivers/s390/char/con3270.c:    condev = (struct con3270 *)
alloc_bootmem_low(sizeof(struct con3270));
drivers/s390/char/con3270.c:    condev->read = raw3270_request_alloc_bootmem(0);
drivers/s390/char/con3270.c:    condev->kreset =
drivers/s390/char/con3270.c:        cbuf = (void *)
drivers/s390/char/raw3270.c:raw3270_request_alloc_bootmem(size_t size)
drivers/s390/char/raw3270.c:    rq = alloc_bootmem_low(sizeof(struct raw3270));
drivers/s390/char/raw3270.c:        rq->buffer = alloc_bootmem_low(size);
drivers/s390/char/raw3270.c:    rp = (struct raw3270 *)
alloc_bootmem_low(sizeof(struct raw3270));
drivers/s390/char/raw3270.c:    ascebc = (char *) alloc_bootmem(256);
drivers/s390/char/raw3270.h:struct raw3270_request
*raw3270_request_alloc_bootmem(size_t size);
drivers/s390/char/sclp_con.c:        page = alloc_bootmem_low_pages(PAGE_SIZE);
drivers/s390/char/sclp_vt220.c:            page =
drivers/serial/cpm_uart/cpm_uart_cpm2.c:        mem_addr = alloc_bootmem(memsz);
drivers/video/console/vgacon.c:    vgacon_scrollback =
Binary file drivers/video/console/vgacon.o matches
Binary file drivers/video/console/built-in.o matches
Binary file drivers/video/built-in.o matches
Binary file drivers/built-in.o matches

> Martyn
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star.The service is powered by MessageLabs.
> ________________________________________________________________________

  reply	other threads:[~2007-02-07 18:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 16:47 Martyn Welch
2007-02-07 18:24 ` Asgard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-02-07 13:41 Martyn Welch

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: alloc_bootmem - Kernel panic' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).