From owner-svn-src-all@FreeBSD.ORG Wed Jun 16 21:34:38 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F841065670; Wed, 16 Jun 2010 21:34:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 57F668FC12; Wed, 16 Jun 2010 21:34:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o5GLPgEm057756; Wed, 16 Jun 2010 15:25:47 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 16 Jun 2010 15:25:47 -0600 (MDT) Message-Id: <20100616.152547.756786594356063577.imp@bsdimp.com> To: andrew@fubar.geek.nz From: "M. Warner Losh" In-Reply-To: <20100616210344.47209ff2@bender> References: <201006131308.o5DD8NTA033564@svn.freebsd.org> <20100616210344.47209ff2@bender> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, raj@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209129 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2010 21:34:38 -0000 In message: <20100616210344.47209ff2@bender> Andrew Turner writes: : On Sun, 13 Jun 2010 13:08:23 +0000 (UTC) : Rafal Jaworowski wrote: : : > Author: raj : > Date: Sun Jun 13 13:08:23 2010 : > New Revision: 209129 : > URL: http://svn.freebsd.org/changeset/base/209129 : > : > Log: : > Improve style. : > : > Modified: : > head/sys/arm/arm/nexus.c : > : > Modified: head/sys/arm/arm/nexus.c : > ============================================================================== : > --- head/sys/arm/arm/nexus.c Sun Jun 13 13:02:43 2010 : > (r209128) +++ head/sys/arm/arm/nexus.c Sun Jun 13 13:08:23 : > 2010 (r209129) @@ -107,6 +107,7 @@ static devclass_t : > nexus_devclass; static int : > nexus_probe(device_t dev) : > { : > + : > device_quiet(dev); /* suppress attach message for : > neatness */ : > mem_rman.rm_start = 0; : > @@ -116,7 +117,7 @@ nexus_probe(device_t dev) : > if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, : > ~0u)) panic("nexus_probe mem_rman"); : > : > - return (0); : > + return (BUS_PROBE_DEFAULT); : Changing the return value of nexus_probe from 0 to BUS_PROBE_DEFAULT : causes the following panic for me when the s3c24x0 driver calls : rman_init. The attached patch fixes it by moving the call to rman_init : from nexus_probe to nexus_attach. The reason is that softc is reset between probe/attach when a number that isn't 0 is returned, but doesn't when 0 is returned. Warner : Andrew : : KDB: debugger backends: ddb : KDB: current backend: ddb : Copyright (c) 1992-2010 The FreeBSD Project. : Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 : The Regents of the University of California. All rights : reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. : FreeBSD 9.0-CURRENT #10 r209128M: Wed Jun 16 20:47:22 NZST 2010 : andrew@bender:/usr/obj/arm/home/andrew/freebsd/svn/head/sys/LN2410SBC : arm WARNING: WITNESS option enabled, expect reduced performance. : CPU: ARM920T rev 0 (ARM9TDMI core) : DC enabled IC enabled WB enabled LABT : 16KB/32B 64-way Instruction cache : 16KB/32B 64-way write-back-locking-A Data cache : real memory = 67108864 (64 MB) : avail memory = 56320000 (53 MB) : s3c24x00 on motherboard : s3c24x00: Found S3C2410A CPU (Chip ID: 0x32410002) : s3c24x00: fclk 202 MHz hclk 101 MHz pclk 50 MHz : panic: Bad tailq NEXT(0xc068eab8->tqh_last) != NULL : KDB: enter: panic : [ thread pid 0 tid 100000 ] : Stopped at kdb_enter+0x44: ldrb r15, [r15, r15, ror r15]! : db> reset