Re: svn commit: r209129 - head/sys/arm/arm
In message: <20100616210344.47209...@bender> Andrew Turner writes: : On Sun, 13 Jun 2010 13:08:23 + (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.cSun 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 : and...@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 = 5632 (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 10 ] : Stopped at kdb_enter+0x44: ldrbr15, [r15, r15, ror r15]! : db> reset ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r209129 - head/sys/arm/arm
On 2010-06-16, at 11:03, Andrew Turner wrote: > On Sun, 13 Jun 2010 13:08:23 + (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. Thanks (and sorry for the breakage -- it wasn't seen on FDT-enabled platforms as they use their own rman(s)..), should be fixed in r209232. Rafal ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r209129 - head/sys/arm/arm
On Sun, 13 Jun 2010 13:08:23 + (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.cSun 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. 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 and...@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 = 5632 (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 10 ] Stopped at kdb_enter+0x44: ldrbr15, [r15, r15, ror r15]! db> reset Index: sys/arm/arm/nexus.c === --- sys/arm/arm/nexus.c (revision 209229) +++ sys/arm/arm/nexus.c (working copy) @@ -110,13 +110,6 @@ device_quiet(dev); /* suppress attach message for neatness */ - mem_rman.rm_start = 0; - mem_rman.rm_end = ~0u; - mem_rman.rm_type = RMAN_ARRAY; - mem_rman.rm_descr = "I/O memory addresses"; - if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0u)) - panic("nexus_probe mem_rman"); - return (BUS_PROBE_DEFAULT); } @@ -144,6 +137,13 @@ nexus_attach(device_t dev) { + mem_rman.rm_start = 0; + mem_rman.rm_end = ~0u; + mem_rman.rm_type = RMAN_ARRAY; + mem_rman.rm_descr = "I/O memory addresses"; + if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0u)) + panic("nexus_probe mem_rman"); + /* * First, deal with the children we know about already */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r209129 - head/sys/arm/arm
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.cSun Jun 13 13:02:43 2010(r209128) +++ head/sys/arm/arm/nexus.cSun 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); } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"