From owner-freebsd-acpi@FreeBSD.ORG Mon May 21 14:00:13 2007 Return-Path: X-Original-To: freebsd-acpi@hub.freebsd.org Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EF9516A400 for ; Mon, 21 May 2007 14:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 2A6CA13C469 for ; Mon, 21 May 2007 14:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l4LE0CpH057101 for ; Mon, 21 May 2007 14:00:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4LE0CE0057099; Mon, 21 May 2007 14:00:12 GMT (envelope-from gnats) Date: Mon, 21 May 2007 14:00:12 GMT Message-Id: <200705211400.l4LE0CE0057099@freefall.freebsd.org> To: freebsd-acpi@FreeBSD.org From: Marius Nuennerich Cc: Subject: Re: kern/112544: [acpi] [patch] Add High Precision Event Timer Driver for userland timer facility X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marius Nuennerich List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 14:00:13 -0000 The following reply was made to PR kern/112544; it has been noted by GNATS. From: Marius Nuennerich To: bug-followup@FreeBSD.org, takeharu1219@ybb.ne.jp Cc: Subject: Re: kern/112544: [acpi] [patch] Add High Precision Event Timer Driver for userland timer facility Date: Mon, 21 May 2007 15:25:32 +0200 Hi, I haven't read the whole patch yet. To me line 164 (of the first patch file) seems bogus. It tries to do the right thing (read-modify-write) but actually does not. HPET_OFFSET_ENABLE is the offset in the hpet datastructure. Should be like this: val = bus_read_4(sc->mem_res, HPET_OFFSET_ENABLE); bus_write_4(sc->mem_res, HPET_OFFSET_ENABLE, val | 1); And 1 should better HPET_ENABLE_ENABLE. Line 133 of the same patch does not even try to do a read-modify-write. However the documentation is clear that it should. This all applies to the driver in -current (1.8) as well. regards Marius