mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Torsten Kaiser" <just.for.lkml@googlemail.com>
To: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
Cc: linux-kernel@vger.kernel.org,
	linux1394-devel@lists.sourceforge.net,
	"Jens Axboe" <jens.axboe@oracle.com>
Subject: Re: 2.6.24-rc1-54866f032307063776b4eff7eadb131d47f9f9b4 fails to boot: kernel BUG at include/linux/scatterlist.h:49!
Date: Sat, 3 Nov 2007 14:14:53 +0100	[thread overview]
Message-ID: <64bb37e0711030614q4be3a2b6j5d3c55b26cb07030@mail.gmail.com> (raw)
In-Reply-To: <472BA567.8040301@s5r6.in-berlin.de>

On 11/2/07, Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
> Torsten Kaiser wrote:
> > Both 2.6.24-rc1 and the current git version fail to boot for me:
> >
> > [   57.182205] ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[16]
> > MMIO=[effff800-efffffff]  Max Packet=
> > [2048]  IR/IT contexts=[4/8]
> > [   57.194032] eth1394: eth2: IPv4 over IEEE 1394 (fw-host0)
> > [   57.199527] ------------[ cut here ]------------
> > [   57.204154] kernel BUG at include/linux/scatterlist.h:49!
>
> To which extent do you need IEEE 1394 drivers?

Using eth1394 as primary network connection on this computer.
So switching to the new stack is currently not an option, or did I
missing something?
(I also have a firewire disk, but that is not used right now)

> > from gdb:
> > 0xffffffff80463512 is in dma_region_alloc (include/linux/scatterlist.h:49).
> > 44               * In order for the low bit stealing approach to work, pages
> > 45               * must be aligned at a 32-bit boundary as a minimum.
> > 46               */
> > 47              BUG_ON((unsigned long) page & 0x03);
> > 48      #ifdef CONFIG_DEBUG_SG
> > 49              BUG_ON(sg->sg_magic != SG_MAGIC);
> > 50      #endif
> > 51              sg->page_link = page_link | (unsigned long) page;
> > 52      }
> > 53
>
> Uh oh...

Looking that calltrace upwards, it seems replacing the
memset(dma->sglist,...) with sg_init_table(...) would fix the BUG_ON()
as that inits the SG_MAGIC. But I do not trust myself to fixing all
the iterators correctly to convert this completely to the new API.

What I noticed trying to find the definition of sg_dma_address() is
that all architectures seem to implement identical macros for
sg_dma_address() and sg_dma_length(). The only difference is that some
archs call their fields different.

But I stopped looking if unifiying all names was possible when I found
swiotlb_map_sg() in lib/swiotlb.c...

Why is there a comment about using "sg_dma_{address,length}(SG)" to
obtain the "appropriate dma address and length" when I see no instance
of this macros there? Instead there are direct accesses to sg->length
and sg->dma_length. And the field dma_length only exists in some
arches! (alpha, ia64, powerpc only if __powerpc64__ is defined,
sparc64 and the 64bit variant of x86)
On the other hand I can't find any other "iova_length" in the hole
tree apart from include/asm-parisc/scatterlist.h...

... so I can't really make sense of the sg mechanism and abstain from
trying to fix this myself.

Torsten

  parent reply	other threads:[~2007-11-03 13:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02 22:03 Torsten Kaiser
2007-11-02 22:32 ` Stefan Richter
2007-11-02 23:16   ` Stefan Richter
2007-11-03  7:03     ` Jens Axboe
2007-11-03 13:14   ` Torsten Kaiser [this message]
2007-11-03 14:42     ` Stefan Richter
2007-11-03 16:04       ` Jens Axboe
2007-11-04  8:44         ` Jens Axboe
2007-11-04 10:51           ` Torsten Kaiser
2007-11-04 12:08             ` [PATCH 1/3 2.6.24-rc1-gitX] ieee1394: iso and async streams: s/g list fix Stefan Richter
2007-11-04 12:09               ` [PATCH 2/3 2.6.24-rc1-gitX] ieee1394: sbp2: " Stefan Richter
2007-11-04 12:10                 ` [PATCH 3/3 2.6.24-rc1-gitX] firewire: fw-sbp2: " Stefan Richter
2007-11-04 12:27                 ` [PATCH 2/3 2.6.24-rc1-gitX] ieee1394: sbp2: " Stefan Richter
2007-11-04 13:03             ` 2.6.24-rc1-54866f032307063776b4eff7eadb131d47f9f9b4 fails to boot: kernel BUG at include/linux/scatterlist.h:49! Jens Axboe
2007-11-04 13:19               ` Stefan Richter
2007-11-04 13:26                 ` Jens Axboe
     [not found]                   ` <tkrat.4947ae1f5baa964f@s5r6.in-berlin.de>
     [not found]                     ` <tkrat.2a470664250af864@s5r6.in-berlin.de>
     [not found]                       ` <tkrat.29809d64b9426d9a@s5r6.in-berlin.de>
2008-02-01 21:31                         ` [PATCH] ieee1394: sbp2: fix bogus s/g access change Stefan Richter
2007-11-04 14:53               ` 2.6.24-rc1-54866f032307063776b4eff7eadb131d47f9f9b4 fails to boot: kernel BUG at include/linux/scatterlist.h:49! Torsten Kaiser

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=64bb37e0711030614q4be3a2b6j5d3c55b26cb07030@mail.gmail.com \
    --to=just.for.lkml@googlemail.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /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

Powered by JetHome