From: Matthieu CASTET <matthieu.castet@parrot.com>
To: JiSheng Zhang <jszhang3@gmail.com>
Cc: "Artem.Bityutskiy@nokia.com" <Artem.Bityutskiy@nokia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"rmk@arm.linux.org.uk" <rmk@arm.linux.org.uk>,
"adrian.hunter@nokia.com" <adrian.hunter@nokia.com>
Subject: Re: [UBI UBIFS] replace vmalloc with kmalloc
Date: Fri, 7 Aug 2009 11:14:57 +0200 [thread overview]
Message-ID: <4A7BF091.5040605@parrot.com> (raw)
In-Reply-To: <2df346410908070202i6c16008ckc145559a474129c6@mail.gmail.com>
JiSheng Zhang a écrit :
> If nandflash driver use DMA to support UBI and UBIFS i/o, there will
> be panic like
> the following. This is because UBI and UBIFS use vmalloced buffer
> somewhere while
> nandflash driver put the buffer under DMA and DMA support doesn't like vmalloced
> memory.
> [ 412.369280] UBIFS: default file-system created
> [ 412.374879] Unable to handle kernel NULL pointer dereference at
> virtual address 00000000
> [ 412.383177] UBIFS: background thread "ubifs_bgt0_0" started, PID 887
> [ 412.389656] pgd = c0004000
> [ 412.392419] [00000000] *pgd=00000000
> [ 412.396117] Internal error: Oops: 817 [#1] PREEMPT
>
> Yes, I know kmalloc may fail when memory get fragmented, but I grep the UBI and
> UBIFS's source, there are six .c files and seven .c files using
> vmalloc, the function
> which call vmalloc are all called during the ubi being attached and
> the volume being
> mounted. In embedded system, this mainly happen during kernel boot, it
> should succeed.
>
> After replacing vmalloc with kmalloc, ubi and ubifs runs fine on my
> board. I can alos upload
> a patch.
>
> Comments are welcomed!
>
mtd is not DMA safe. So patching UBI and UBIFS is not enought.
Matthieu
WARNING: multiple messages have this Message-ID (diff)
From: Matthieu CASTET <matthieu.castet@parrot.com>
To: JiSheng Zhang <jszhang3@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"Artem.Bityutskiy@nokia.com" <Artem.Bityutskiy@nokia.com>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rmk@arm.linux.org.uk" <rmk@arm.linux.org.uk>,
"adrian.hunter@nokia.com" <adrian.hunter@nokia.com>
Subject: Re: [UBI UBIFS] replace vmalloc with kmalloc
Date: Fri, 7 Aug 2009 11:14:57 +0200 [thread overview]
Message-ID: <4A7BF091.5040605@parrot.com> (raw)
In-Reply-To: <2df346410908070202i6c16008ckc145559a474129c6@mail.gmail.com>
JiSheng Zhang a écrit :
> If nandflash driver use DMA to support UBI and UBIFS i/o, there will
> be panic like
> the following. This is because UBI and UBIFS use vmalloced buffer
> somewhere while
> nandflash driver put the buffer under DMA and DMA support doesn't like vmalloced
> memory.
> [ 412.369280] UBIFS: default file-system created
> [ 412.374879] Unable to handle kernel NULL pointer dereference at
> virtual address 00000000
> [ 412.383177] UBIFS: background thread "ubifs_bgt0_0" started, PID 887
> [ 412.389656] pgd = c0004000
> [ 412.392419] [00000000] *pgd=00000000
> [ 412.396117] Internal error: Oops: 817 [#1] PREEMPT
>
> Yes, I know kmalloc may fail when memory get fragmented, but I grep the UBI and
> UBIFS's source, there are six .c files and seven .c files using
> vmalloc, the function
> which call vmalloc are all called during the ubi being attached and
> the volume being
> mounted. In embedded system, this mainly happen during kernel boot, it
> should succeed.
>
> After replacing vmalloc with kmalloc, ubi and ubifs runs fine on my
> board. I can alos upload
> a patch.
>
> Comments are welcomed!
>
mtd is not DMA safe. So patching UBI and UBIFS is not enought.
Matthieu
next prev parent reply other threads:[~2009-08-07 9:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 9:02 [UBI UBIFS] replace vmalloc with kmalloc JiSheng Zhang
2009-08-07 9:02 ` JiSheng Zhang
2009-08-07 9:14 ` Matthieu CASTET [this message]
2009-08-07 9:14 ` Matthieu CASTET
2009-08-07 9:20 ` Adrian Hunter
2009-08-07 9:20 ` Adrian Hunter
2009-08-07 9:44 ` Russell King
2009-08-07 9:44 ` Russell King
2009-08-07 14:26 ` Josh Boyer
2009-08-07 14:26 ` Josh Boyer
2009-08-07 15:28 ` JiSheng Zhang
2009-08-07 15:28 ` JiSheng Zhang
2009-08-09 5:35 ` Artem Bityutskiy
2009-08-09 5:35 ` Artem Bityutskiy
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=4A7BF091.5040605@parrot.com \
--to=matthieu.castet@parrot.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=adrian.hunter@nokia.com \
--cc=dwmw2@infradead.org \
--cc=jszhang3@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=rmk@arm.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.