From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: VM Kernel bug with CONFIG_DEBUG_VM
Date: Wed, 7 Aug 2013 13:10:59 -0700 [thread overview]
Message-ID: <20130807201059.GT16694@cbox> (raw)
In-Reply-To: <CACVXFVNt5j6cJGkRJuUv-yS+wqXN+Hzx2R7jY-2DPkxsNPkdcQ@mail.gmail.com>
On Wed, Aug 07, 2013 at 03:50:42PM +0800, Ming Lei wrote:
> On Wed, Aug 7, 2013 at 1:41 PM, Christoffer Dall
> <christoffer.dall@linaro.org> wrote:
> > Hi all,
> >
> > I've found that booting a recent kernel (and as far back as 3.9 at
> > least) I get a kernel bug during boot with VM debugging enabled. I
> > haven't had time to dig further into it, but wanted to check if this is
> > a known issue?
>
> Remember Catalin introduced the flush_dcache_page() to fix
> cache incoherency problem when PIO reading from USB mass
> storage device to mapped page, so the flush should not need
> for pages not in page cache.
>
> Care to test below patch to see if the problem can be fixed?
>
> diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
> index 2facee5..9d47c71 100644
> --- a/drivers/usb/host/isp1760-hcd.c
> +++ b/drivers/usb/host/isp1760-hcd.c
> @@ -707,8 +707,12 @@ __acquires(priv->lock)
> void *ptr;
> for (ptr = urb->transfer_buffer;
> ptr < urb->transfer_buffer + urb->transfer_buffer_length;
> - ptr += PAGE_SIZE)
> - flush_dcache_page(virt_to_page(ptr));
> + ptr += PAGE_SIZE) {
> + struct page *page = virt_to_page(ptr);
> + if (PageSlab(page))
> + break;
> + flush_dcache_page(page);
> + }
> }
>
> /* complete() can reenter this HCD */
>
Yep, that fixes it. Thanks!!
-Christoffer
prev parent reply other threads:[~2013-08-07 20:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 5:41 VM Kernel bug with CONFIG_DEBUG_VM Christoffer Dall
2013-08-07 7:50 ` Ming Lei
2013-08-07 20:10 ` Christoffer Dall [this message]
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=20130807201059.GT16694@cbox \
--to=christoffer.dall@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).