From: David Brownell <david-b@pacbell.net>
To: dedekind@infradead.org
Cc: linux-mtd@lists.infradead.org, trimarchimichael@yahoo.it,
Andrew Morton <akpm@linux-foundation.org>,
dwmw2@infradead.org, jwboyer@gmail.com, rmk@arm.linux.org.uk
Subject: Re: [patch 02/13] jffs2 summary allocation: don't use vmalloc()
Date: Wed, 30 Jul 2008 23:57:52 -0700 [thread overview]
Message-ID: <200807302357.53204.david-b@pacbell.net> (raw)
In-Reply-To: <1217482661.9048.74.camel@sauron>
On Wednesday 30 July 2008, Artem Bityutskiy wrote:
> Can SPI driver detect if the memory was kmalloc()'ed or vmalloc()'ed?
The general driver policy is to use one or the other and never mix
them. Pretty much like always calling with a lock held, or never;
or always calling in contexts that can sleep, etc. (kmalloc and
siblings being an exception, with gfp_t.)
For clarity: the stack in question is like
jffs2, ubifs, etc
mtd_dataflash or m25p80
spi_master (generally SOC-specific) sometimes using DMA
... talking to flash chip using 4 wire signaling ...
Inputs to the SPI stack are required to be DMA-safe -- vmalloc bad.
Not all the SPI controllers support DMA either.
Inputs to the MTD layer have previously been unspecified, but now seem
to be assumed to be DMA-unsafe -- vmalloc ok.
> Or if not, we could add one more argument to read()/write() which tells
> whether the memory is contiguous or not. Then the driver would chose how
> to deal with the buffer.
Is updating all the MTD users in such a way a real possibility?
- Dave
next prev parent reply other threads:[~2008-07-31 6:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 19:34 [patch 02/13] jffs2 summary allocation: don't use vmalloc() akpm
2008-07-30 22:39 ` David Brownell
2008-07-30 22:46 ` Andrew Morton
2008-07-31 5:10 ` David Brownell
2008-07-31 5:37 ` Artem Bityutskiy
2008-07-31 6:57 ` David Brownell [this message]
2008-07-31 8:03 ` Artem Bityutskiy
2008-07-31 5:15 ` Artem Bityutskiy
2008-07-31 6:56 ` David Brownell
2008-07-31 8:00 ` Artem Bityutskiy
2008-07-31 8:48 ` David Woodhouse
2008-07-31 9:09 ` David Woodhouse
2008-07-31 7:33 ` David Woodhouse
2008-07-31 8:21 ` David Brownell
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=200807302357.53204.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=dedekind@infradead.org \
--cc=dwmw2@infradead.org \
--cc=jwboyer@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=rmk@arm.linux.org.uk \
--cc=trimarchimichael@yahoo.it \
/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