From: felixv1986@gmail.com (Felix Varghese)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel BUG while reading from SPI into static buffer
Date: Mon, 16 May 2011 11:25:32 +0530 [thread overview]
Message-ID: <BANLkTimNDi4upvUKfmgdxoaQxHPeuZJdUg@mail.gmail.com> (raw)
In-Reply-To: <20110513150851.GA13400@kroah.com>
On 13 May 2011 20:02, Mulyadi Santosa <mulyadi.santosa@gmail.com> wrote:
> Feel free to try to observer whether this statement is correct or
> not... and you should check the address of "buffer" when declared as
> static I guess....
I did, and here's the result:
Local Buffer - 0xc3a61edd
Static Buffer - 0xbf03eac1
So they indeed seem to be way apart in memory :).
On 13 May 2011 20:38, Greg KH <greg@kroah.com> wrote:
> Don't statically allocate memory for spi, you need to dynamically
> allocate it with 'kmalloc'.
>
> The fact that the first time didn't crash for you was just lucky.
I'm guessing you say this because static variables are not in DMA
capable memory. But how exactly do we figure out which part of memory
is DMA-capable and which isn't? Also, is this a restriction imposed by
the kernel or by the hardware?
Thanks & Regards,
Felix.
next prev parent reply other threads:[~2011-05-16 5:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 7:03 kernel BUG while reading from SPI into static buffer Felix Varghese
2011-05-13 14:32 ` Mulyadi Santosa
2011-05-13 14:33 ` Mulyadi Santosa
2011-05-13 15:08 ` Greg KH
2011-05-16 5:55 ` Felix Varghese [this message]
2011-05-16 14:17 ` Greg KH
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=BANLkTimNDi4upvUKfmgdxoaQxHPeuZJdUg@mail.gmail.com \
--to=felixv1986@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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;
as well as URLs for NNTP newsgroup(s).