From owner-freebsd-bugs Thu Oct 5 9:40: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 36E1E37B66C for ; Thu, 5 Oct 2000 09:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA48599; Thu, 5 Oct 2000 09:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id ECB7937B502 for ; Thu, 5 Oct 2000 09:34:51 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id e93FTRY18629; Tue, 3 Oct 2000 10:29:27 -0500 (CDT) (envelope-from jlemon) Message-Id: <200010031529.e93FTRY18629@prism.flugsvamp.com> Date: Tue, 3 Oct 2000 10:29:27 -0500 (CDT) From: Jonathan Lemon Reply-To: jlemon@flugsvamp.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/21773: panic w/nexus + ata (ivar problem) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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