Date: Tue, 3 Oct 2000 10:29:27 -0500 (CDT) From: Jonathan Lemon <jlemon@flugsvamp.com> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/21773: panic w/nexus + ata (ivar problem) Message-ID: <200010031529.e93FTRY18629@prism.flugsvamp.com>
next in thread | raw e-mail | index | archive | help
>Number: 21773 >Category: kern >Synopsis: panic w/nexus + ata (ivar problem) >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 05 09:40:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Jonathan Lemon >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: -current as of Tue, Oct 2, 2000 >Description: After the nexus/ivar change around Sep 28, my kernel no longer boots. This seems to be a disagreement over how ivars are used in the kernel. Within nexus_alloc_resource(), we have the following: #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) struct nexus_device *ndev = DEVTONX(child); where ``child'' happens to be ata1. However, within ata/ata-all.c, There is the following statement: device_set_ivars(child, (void *)(uintptr_t) unit); So when nexus_alloc_resource() is called, it ends up treating the unit as a pointer. I'm not sure what the new world order mandates here; what is the legal usage of ivar? Additional debug infromation from the nexus_alloc_resource() stack frame: (kgdb) p *dev $4 = {ops = 0xc0a57000, link = {tqe_next = 0x0, tqe_prev = 0xc0721410}, parent = 0xc0721400, children = {tqh_first = 0xc0a6f300, tqh_last = 0xc0a6f184}, driver = 0xc02fb38c, devclass = 0xc0725300, unit = 0, nameunit = 0xc071d640 "nexus0", desc = 0x0, busy = 0, state = DS_ALIVE, devflags = 0, flags = 19, order = 0 '\000', pad = 0 '\000', ivars = 0x0, softc = 0xc071d620} (kgdb) p *child $5 = {ops = 0xc0a43000, link = {tqe_next = 0x0, tqe_prev = 0xc0a70804}, parent = 0xc0a70f00, children = {tqh_first = 0x0, tqh_last = 0xc0a70790}, driver = 0xc02f5ce4, devclass = 0xc0718ce0, unit = 1, nameunit = 0xc071d390 "ata1", desc = 0x0, busy = 0, state = DS_NOTPRESENT, devflags = 0, flags = 3, order = 0 '\000', pad = 0 '\000', ivars = 0x1, softc = 0xc0a70680} >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010031529.e93FTRY18629>