From: Adrian McMenamin <adrian@newgolddream.dyndns.info>
To: Adrian McMenamin <lkmladrian@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-sh <linux-sh@vger.kernel.org>
Subject: Re: Bug: Latest (rc2 and beyond) kernel fails on Dreamcast
Date: Tue, 20 Jan 2009 21:20:21 +0000 [thread overview]
Message-ID: <1232486421.6794.3.camel@localhost.localdomain> (raw)
In-Reply-To: <8b67d60901201240u37341a72oa33159a28f4db674@mail.gmail.com>
On Tue, 2009-01-20 at 20:40 +0000, Adrian McMenamin wrote:
> 2009/1/20 Paul Mundt <lethal@linux-sh.org>:
> > On Mon, Jan 19, 2009 at 10:33:57PM +0000, Adrian McMenamin wrote:
> >> 2009/1/19 Adrian McMenamin <lkmladrian@gmail.com>:
> >> > I haven't had time to look at this, but the most up to date kernel
> >> > (and the one of around a week ago also) fails to boot, seemingly
> >> > seeking an IP address for the 8139too based NIC.
> >>
> >> > [ 4.664236] Sending DHCP requests .<3>eth0: PCI Bus error 2200.
> >> > [ 4.669582] eth0: PCI Bus error 2200.
> >>
> >> And the bisection reveals the following:
> >>
> >> adrian@bossclass:~/linux-2.6$ git bisect bad
> >> 58c6d3dfe436eb8cfb451981d8fdc9044eaf42da is first bad commit
> >> commit 58c6d3dfe436eb8cfb451981d8fdc9044eaf42da
> >> Author: Johannes Weiner <hannes@cmpxchg.org>
> >> Date: Tue Jan 6 14:43:10 2009 -0800
> >>
> >> dma-coherent: catch oversized requests to dma_alloc_from_coherent()
> >>
>
>
>
> >
> > The dreamcast uses a 32kB coherent area for PCI DMA, which all of the
> > 8139too allocations should fit under just fine. What does
> > dma_alloc_from_coherent() say the requested size is, vs the per-device
> > memory size for each allocation?
> >
>
> Hmmm...
>
> >From printks I stuck in the code
>
> [ 3.641267] Size is 0x1800, mem->size is 0x8
> [ 3.644996] Size is 0x2810, mem->size is 0x8
>
> The sizes are correct - the first is the TX buffer, the second RX, but
> I have no idea why mem->size is set so low, I assume that is a bug
> somewhere else in the Dreamcast code. Any clues gratefully received.
> --
Actually, it looks to me that the patch was wrong.
This is from kernel/dma-coherent.c
dev->dma_mem->size = pages;
Yet this is the test applied in dma_alloc_from_coherent:
if (unlikely(size > mem->size))
Should surely be:
if (unlikely (size > (mem->size >> PAGE_SHIFT)))
Will patch that and try it
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-01-20 21:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 0:26 Bug: Latest (rc2 and beyond) kernel fails on Dreamcast Adrian McMenamin
2009-01-19 0:26 ` Adrian McMenamin
2009-01-19 22:33 ` Adrian McMenamin
2009-01-20 0:48 ` Paul Mundt
2009-01-20 0:48 ` Paul Mundt
2009-01-20 20:40 ` Adrian McMenamin
2009-01-20 20:40 ` Adrian McMenamin
2009-01-20 21:20 ` Adrian McMenamin [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=1232486421.6794.3.camel@localhost.localdomain \
--to=adrian@newgolddream.dyndns.info \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=lkmladrian@gmail.com \
/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.