From owner-freebsd-current Sat Sep 1 13:38:23 2001 Delivered-To: freebsd-current@freebsd.org Received: from freebsd.org.ru (sweet.etrust.ru [194.84.67.5]) by hub.freebsd.org (Postfix) with ESMTP id C39E937B40B for ; Sat, 1 Sep 2001 13:38:18 -0700 (PDT) Received: by freebsd.org.ru (Postfix, from userid 1000) id 5C53522F; Sun, 2 Sep 2001 00:38:16 +0400 (MSD) Date: Sun, 2 Sep 2001 00:38:16 +0400 From: "Sergey A. Osokin" To: Mitsuru IWASAKI Cc: current@FreeBSD.org Subject: Re: panic on current ACPI Message-ID: <20010902003816.A40883@freebsd.org.ru> Reply-To: osa@FreeBSD.org.ru References: <20010901232504F.iwasaki@jp.FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20010901232504F.iwasaki@jp.FreeBSD.org> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Sep 01, 2001 at 11:25:04PM +0900, Mitsuru IWASAKI wrote: > Hi, I've noticed that the recent CURRENT got panic on some machines > if we have `device acpica' in kernel config. > > ---- > ata0: at 0x1f0 irq 14 on atapci0 > > > Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x28 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xc058ed3c > stack pointer = 0x10:0xc05c6be0 > frame pointer = 0x10:0xc05c6be0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 (swapper) > kernel: type 12 trap, code=0 > Stopped at acpi_timer_get_timecount+0x08: movl 0x28(%eax),%edx > ---- > > I think that this is because acpi_timer device is identified twice, > so I've just made a quick fix for this so that acpi_timer_identify() > is called only once. > > I hope more proper fixes would be made... > > Thanks > > Index: acpi_timer.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/acpica/acpi_timer.c,v > retrieving revision 1.10 > diff -u -r1.10 acpi_timer.c > --- acpi_timer.c 5 Aug 2001 23:20:32 -0000 1.10 > +++ acpi_timer.c 1 Sep 2001 12:04:14 -0000 > @@ -55,7 +55,7 @@ > #define _COMPONENT ACPI_SYSTEM > MODULE_NAME("TIMER") > > -static device_t acpi_timer_dev; > +static device_t acpi_timer_dev = NULL; > struct resource *acpi_timer_reg; > #define TIMER_READ bus_space_read_4(rman_get_bustag(acpi_timer_reg), \ > rman_get_bushandle(acpi_timer_reg), \ > @@ -122,6 +122,9 @@ > return_VOID; > > if (AcpiGbl_FADT == NULL) > + return_VOID; > + > + if (acpi_timer_dev != NULL) > return_VOID; > > if ((dev = BUS_ADD_CHILD(parent, 0, "acpi_timer", 0)) == NULL) { > > I have the same problem. Your patch works for me. Thanks. -- Rgdz, /"\ Sergey Osokin aka oZZ, \ / ASCII RIBBON CAMPAIGN osa@freebsd.org.ru X AGAINST HTML MAIL http://freebsd.org.ru/~osa/ / \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message