linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michel Lanners <mlan@cpu.lu>
To: benh@kernel.crashing.org
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Crash with BenH's 2.4.10/2.4.11-pre on 7600
Date: Mon, 8 Oct 2001 21:44:12 +0200 (CEST)	[thread overview]
Message-ID: <200110081944.VAA00811@piglet.grunz.lu> (raw)
In-Reply-To: <20011007230241.7484@smtp.wanadoo.fr>


Hi Ben,

On   8 Oct, this message from Benjamin Herrenschmidt echoed through cyberspace:
>>Loking closely at the kmalloc() code, it seems to crash in the first
>>test in kmem_cache_alloc_head(), where it accesses cachep->gfpflags.
>>That would mean it hit an unitialized entry in cache_sizes??
>
> Either that or there is some memory corruption going on. Could you
> try to compille without CONFIG_KTRAPS (see kernel hacking options) ?

Found it. Problem is with serial console. Here is the annotated
backtrace from a 2.4.10 kernel:

backtrace:
c023e324        find_OF_pci_device_filter
c0019cf0        __request_region
c023e618        request_OF_resource
c00f8470        chan_init
c00f88b0        probe_sccs
c020c2a8        serial_console_setup
c00145e4        register_console
c020ca54        mac_scc_console_init
c02031d0        console_init
c01f5674        start_kernel

The problem is that request_OF_resource (which calls kmalloc() ) is
called from probe_sccs, which in turn is called for the serial console,
i.e _very_ early in the boot process. At that time, the kmem system is
not yet initialized.

Here is the offending code out of macserial.c:

@@ -2401,6 +2368,11 @@
 #endif
        zss->dma_initted = 0;

+       zss->io_resource = request_OF_resource(ch, 0, NULL);
+       if (!zss->io_resource) {
+               printk(KERN_ERR "macserial: can't request IO resource !\n");
+               return -ENODEV;
+       }
        zs_chan->control = (volatile unsigned char *)
                ioremap(ch->addrs[0].address, 0x1000);
        zs_chan->data = zs_chan->control + 0x10;

Now up to others to find a solution ;-)

Cheers

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-10-08 19:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-07 19:20 Crash with BenH's 2.4.10/2.4.11-pre on 7600 Michel Lanners
2001-10-07 20:50 ` Michel Lanners
2001-10-07 23:02   ` Benjamin Herrenschmidt
2001-10-08 19:44     ` Michel Lanners [this message]
2001-10-08 21:24       ` Benjamin Herrenschmidt
2001-10-09  8:49       ` Geert Uytterhoeven

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=200110081944.VAA00811@piglet.grunz.lu \
    --to=mlan@cpu.lu \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.linuxppc.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).