From owner-freebsd-amd64@FreeBSD.ORG Mon Jul 18 11:06:58 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A66A6106564A for ; Mon, 18 Jul 2011 11:06:58 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8B57B8FC1B for ; Mon, 18 Jul 2011 11:06:58 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6IB6wRQ026715 for ; Mon, 18 Jul 2011 11:06:58 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6IB6vIP026712 for freebsd-amd64@FreeBSD.org; Mon, 18 Jul 2011 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 18 Jul 2011 11:06:57 GMT Message-Id: <201107181106.p6IB6vIP026712@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-amd64@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-amd64@FreeBSD.org X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 11:06:58 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o amd64/157386 amd64 [powerd] Enabling powerd(8) with default settings on I o amd64/156464 amd64 fpsetprec does not work o amd64/156106 amd64 [boot] boot0 fails to start o amd64/156074 amd64 [hang] Removing CD-Rom from Lenovo T61p hangs system o amd64/155249 amd64 [build] 8.1 buildworld failure o amd64/155135 amd64 [boot] Does Not Boot On a Very Standard Hardware o amd64/154957 amd64 [boot] Install boot CD won't boot up - keeps rebooting o amd64/154629 amd64 [panic] Fatal trap 9: general protection fault while i o amd64/153935 amd64 [hang] system hangs while trying to do 'shutdown -h no o amd64/153831 amd64 [boot] CD bootloader won't on Tyan s2912G2nr o amd64/153496 amd64 [hyper-v] [install] Install on Hyper-V leaves corrupt o amd64/153372 amd64 [panic] kernel panic o amd64/153175 amd64 [amd64] Kernel Panic on only FreeBSD 8 amd64 o amd64/152874 amd64 [install] 8.1 install fails where 7.3 works due to lac o amd64/152430 amd64 [boot] HP ProLiant Microserver n36l cannot boot into i o amd64/151385 amd64 [boot] Installation hangs on MacBook o amd64/150170 amd64 [patch] [amd64] [headers] SIG_ATOMIC_MIN/SIG_ATOMIC_MA o amd64/145991 amd64 [NOTES] [patch] Add a requires line to /sys/amd64/conf o amd64/144405 amd64 [build] [patch] include /usr/obj/lib32 in cleanworld t s amd64/143173 amd64 [ata] Promise FastTrack TX4 + SATA DVD, installer can' f amd64/141413 amd64 [hang] Tyan 2881 m3289 SMDC freeze o amd64/141060 amd64 [install] Can't install 8.0-RELEASE on the server wher o amd64/140715 amd64 [boot] Dell M600 Blade fails to boot 7.2+ 64 bit o amd64/139998 amd64 [panic][net] 7.2 amd64 panic in rtrequest1_fib o amd64/139924 amd64 [boot] cd or dvd not load o amd64/137942 amd64 [pci] 8.0-BETA2 having problems with Asus M2N-SLI-delu o amd64/135265 amd64 [mpt] Boot from install cd hangs on HP DL160 G5 with L o amd64/135040 amd64 [ata] FreeBSD/amd64 does not (always) detect disk on S o amd64/133977 amd64 [panic] [ffs] "panic: ffs_blkfree: freeing free block" o amd64/133701 amd64 Recompiling the kernel with k8temp or smbios break GEO o amd64/132574 amd64 [boot] [hang] Freeze on bootstrap loader (CD) using AT o amd64/131456 amd64 [acpi] [ata] ACPI & ATA problems s amd64/131209 amd64 [panic] [bce] 7.1-STABLE amd64 crash - m0 NULL o amd64/130368 amd64 [hang] Switching from xorg to console locks up compute o amd64/129889 amd64 [boot] [hang] The booting process stops at the line mo o amd64/129426 amd64 [panic] FreeBSD 7.0 crash after subdiskXX: detached o amd64/129315 amd64 [em] amd64 motherboard: Intel DG965WH motherboard comp o amd64/128765 amd64 [install] Install CD loads to Install choices but stop o amd64/127640 amd64 [amd64] gcc(1) will not build shared libraries with -f o amd64/125002 amd64 [install] amd64, SATA hard disks not detected o amd64/124432 amd64 [panic] 7.0-STABLE panic: invalbuf: dirty bufs o amd64/122549 amd64 7.0-RELEASE-amd64-bootonly.iso doesn't work w/ serial o amd64/120202 amd64 [amd64] [patch] [panic] kernel panic at start_all_aps, o amd64/117296 amd64 [ata] I don`t see second SATA IDE on VIA VT8237A o amd64/116620 amd64 [hang] ifconfig spins when creating carp(4) device on s amd64/115815 amd64 [ata] [request] Gigabyte GA-M61P-S3 Motherboard unsupp o amd64/115194 amd64 LCD screen remains blank after Dell XPS M1210 lid is c o amd64/91405 amd64 [asr] [panic] Kernel panic caused by asr on 6.0-amd64 48 problems total. From owner-freebsd-amd64@FreeBSD.ORG Mon Jul 18 16:40:10 2011 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AFEE1065674 for ; Mon, 18 Jul 2011 16:40:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D350C8FC15 for ; Mon, 18 Jul 2011 16:40:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6IGe9rX055552 for ; Mon, 18 Jul 2011 16:40:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6IGe9jk055551; Mon, 18 Jul 2011 16:40:09 GMT (envelope-from gnats) Resent-Date: Mon, 18 Jul 2011 16:40:09 GMT Resent-Message-Id: <201107181640.p6IGe9jk055551@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-amd64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Roelof Wobben Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C60BA1065672 for ; Mon, 18 Jul 2011 16:37:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id ACAE78FC18 for ; Mon, 18 Jul 2011 16:37:28 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6IGbSr8054299 for ; Mon, 18 Jul 2011 16:37:28 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p6IGbSUB054298; Mon, 18 Jul 2011 16:37:28 GMT (envelope-from nobody) Message-Id: <201107181637.p6IGbSUB054298@red.freebsd.org> Date: Mon, 18 Jul 2011 16:37:28 GMT From: Roelof Wobben To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 X-Mailman-Approved-At: Mon, 18 Jul 2011 18:25:20 +0000 Cc: Subject: amd64/159012: totem cannot be build X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 16:40:10 -0000 >Number: 159012 >Category: amd64 >Synopsis: totem cannot be build >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 18 16:40:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Roelof Wobben >Release: Freebsd 8.2 >Organization: >Environment: FreeBSD tamara.private 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I try to build Gnome2 from ports. Then I saw this error message when totem is being build %graphics.attrib; ^ format ()IMPLIED ^ Entity: Line 1 : parser error. Content error in the external subset %graphics.attrib; ^ Entity : line 4 : format ()IMPLIED ^ unable to parse it/totem.xml gmake[2]: [totem.it.omf] error 1 gmake[2]: leaving directory "usr/ports/multimedia/totem/work/totem 2.32.0/help >How-To-Repeat: 1) goto /usr/ports/x11/gnome 2) make install clean >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-amd64@FreeBSD.ORG Mon Jul 18 21:12:43 2011 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76AEF1065672; Mon, 18 Jul 2011 21:12:43 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4F9308FC12; Mon, 18 Jul 2011 21:12:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6ILChE7010051; Mon, 18 Jul 2011 21:12:43 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6ILChc1010047; Mon, 18 Jul 2011 21:12:43 GMT (envelope-from linimon) Date: Mon, 18 Jul 2011 21:12:43 GMT Message-Id: <201107182112.p6ILChc1010047@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-amd64@FreeBSD.org, gnome@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: ports/159012: multimedia/totem cannot be build X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 21:12:43 -0000 Old Synopsis: totem cannot be build New Synopsis: multimedia/totem cannot be build Responsible-Changed-From-To: freebsd-amd64->gnome Responsible-Changed-By: linimon Responsible-Changed-When: Mon Jul 18 21:12:03 UTC 2011 Responsible-Changed-Why: Make this a ports PR, fix synopsis, and assign. http://www.freebsd.org/cgi/query-pr.cgi?pr=159012 From owner-freebsd-amd64@FreeBSD.ORG Tue Jul 19 14:49:05 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DC30106566C for ; Tue, 19 Jul 2011 14:49:05 +0000 (UTC) (envelope-from callumgibson@optusnet.com.au) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 83E488FC08 for ; Tue, 19 Jul 2011 14:49:04 +0000 (UTC) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p6JBKbM2004120 for ; Tue, 19 Jul 2011 21:20:37 +1000 Received: from omma.gibson.athome (c122-106-15-156.rivrw1.nsw.optusnet.com.au [122.106.15.156]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with SMTP id p6JBKXIA005464 for ; Tue, 19 Jul 2011 21:20:34 +1000 Received: (qmail 51972 invoked by uid 107); 19 Jul 2011 21:20:33 +1000 Date: 19 Jul 2011 21:20:33 +1000 Date: Tue, 19 Jul 2011 21:20:33 +1000 From: Callum Gibson To: freebsd-stable@freebsd.org Message-ID: <20110719112033.GA51765@omma.gibson.athome> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-amd64@freebsd.org Subject: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2011 14:49:05 -0000 Hi, I've just noticed and tracked down a regression in x86/cpufreq/powernow.c (on amd64) which was first mentioned here: http://lists.freebsd.org/pipermail/freebsd-current/2011-March/023509.html although no followup seems to have occurred. Symptoms are that powerd stops working because the dev.cpu.0.freq OID is no longer gettable nor settable. This seems to have been caused by the following revision: http://svnweb.freebsd.org/base?view=revision&revision=222148 which was in turn an MFC of r221102, so I guess the problem exists on -current as well, although I can't confirm that since I don't run it. Reverting the change fixes the problem and powerd will work again. Also other utilities, such as xacpim, work properly. I'm running a ML-40 Turion laptop (HP Compaq nx6125). regards, Callum -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ From owner-freebsd-amd64@FreeBSD.ORG Tue Jul 19 16:05:02 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 6D380106566B; Tue, 19 Jul 2011 16:05:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-stable@FreeBSD.org Date: Tue, 19 Jul 2011 12:04:51 -0400 User-Agent: KMail/1.6.2 References: <20110719112033.GA51765@omma.gibson.athome> In-Reply-To: <20110719112033.GA51765@omma.gibson.athome> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201107191204.53865.jkim@FreeBSD.org> Cc: Callum Gibson , freebsd-amd64@freebsd.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2011 16:05:02 -0000 On Tuesday 19 July 2011 07:20 am, Callum Gibson wrote: > Hi, > I've just noticed and tracked down a regression in > x86/cpufreq/powernow.c (on amd64) which was first mentioned here: > > http://lists.freebsd.org/pipermail/freebsd-current/2011-March/02350 >9.html > > although no followup seems to have occurred. > > Symptoms are that powerd stops working because the dev.cpu.0.freq > OID is no longer gettable nor settable. > > This seems to have been caused by the following revision: > http://svnweb.freebsd.org/base?view=revision&revision=222148 > which was in turn an MFC of r221102, so I guess the problem exists > on -current as well, although I can't confirm that since I don't > run it. > > Reverting the change fixes the problem and powerd will work again. > Also other utilities, such as xacpim, work properly. > > I'm running a ML-40 Turion laptop (HP Compaq nx6125). HP again... Can you please show me verbose boot messages? Thanks, Jung-uk Kim From owner-freebsd-amd64@FreeBSD.ORG Wed Jul 20 00:35:53 2011 Return-Path: Delivered-To: amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D5C5106566B; Wed, 20 Jul 2011 00:35:53 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id D44E68FC0C; Wed, 20 Jul 2011 00:35:52 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.4) with ESMTP id p6K0Zq3q030081; Tue, 19 Jul 2011 20:35:52 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.4/Submit) id p6K0Zqad030071; Wed, 20 Jul 2011 00:35:52 GMT (envelope-from tinderbox@freebsd.org) Date: Wed, 20 Jul 2011 00:35:52 GMT Message-Id: <201107200035.p6K0Zqad030071@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 00:35:53 -0000 TB --- 2011-07-19 21:50:00 - tinderbox 2.7 running on freebsd-current.sentex.ca TB --- 2011-07-19 21:50:00 - starting HEAD tinderbox run for amd64/amd64 TB --- 2011-07-19 21:50:00 - cleaning the object tree TB --- 2011-07-19 21:50:48 - cvsupping the source tree TB --- 2011-07-19 21:50:48 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/amd64/amd64/supfile TB --- 2011-07-19 21:51:01 - building world TB --- 2011-07-19 21:51:01 - MAKEOBJDIRPREFIX=/obj TB --- 2011-07-19 21:51:01 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2011-07-19 21:51:01 - TARGET=amd64 TB --- 2011-07-19 21:51:01 - TARGET_ARCH=amd64 TB --- 2011-07-19 21:51:01 - TZ=UTC TB --- 2011-07-19 21:51:01 - __MAKE_CONF=/dev/null TB --- 2011-07-19 21:51:01 - cd /src TB --- 2011-07-19 21:51:01 - /usr/bin/make -B buildworld >>> World build started on Tue Jul 19 21:51:02 UTC 2011 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> stage 5.1: building 32 bit shim libraries >>> World build completed on Wed Jul 20 00:23:10 UTC 2011 TB --- 2011-07-20 00:23:10 - generating LINT kernel config TB --- 2011-07-20 00:23:10 - cd /src/sys/amd64/conf TB --- 2011-07-20 00:23:10 - /usr/bin/make -B LINT TB --- 2011-07-20 00:23:10 - building LINT kernel TB --- 2011-07-20 00:23:10 - MAKEOBJDIRPREFIX=/obj TB --- 2011-07-20 00:23:10 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2011-07-20 00:23:10 - TARGET=amd64 TB --- 2011-07-20 00:23:10 - TARGET_ARCH=amd64 TB --- 2011-07-20 00:23:10 - TZ=UTC TB --- 2011-07-20 00:23:10 - __MAKE_CONF=/dev/null TB --- 2011-07-20 00:23:10 - cd /src TB --- 2011-07-20 00:23:10 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Wed Jul 20 00:23:10 UTC 2011 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/net80211/ieee80211_output.c cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/net80211/ieee80211_phy.c cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/net80211/ieee80211_power.c cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/net80211/ieee80211_proto.c /src/sys/net80211/ieee80211_proto.c: In function 'ieee80211_csa_completeswitch': /src/sys/net80211/ieee80211_proto.c:1541: error: 'vap' undeclared (first use in this function) /src/sys/net80211/ieee80211_proto.c:1541: error: (Each undeclared identifier is reported only once /src/sys/net80211/ieee80211_proto.c:1541: error: for each function it appears in.) *** Error code 1 Stop in /obj/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2011-07-20 00:35:51 - WARNING: /usr/bin/make returned exit code 1 TB --- 2011-07-20 00:35:51 - ERROR: failed to build lint kernel TB --- 2011-07-20 00:35:51 - 7791.32 user 1519.26 system 9950.78 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-amd64-amd64.full From owner-freebsd-amd64@FreeBSD.ORG Wed Jul 20 00:38:33 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88FA21065672 for ; Wed, 20 Jul 2011 00:38:33 +0000 (UTC) (envelope-from callumgibson@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9488FC17 for ; Wed, 20 Jul 2011 00:38:32 +0000 (UTC) Received: from omma.gibson.athome (c122-106-15-156.rivrw1.nsw.optusnet.com.au [122.106.15.156]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with SMTP id p6K0cU0q016042 for ; Wed, 20 Jul 2011 10:38:31 +1000 Received: (qmail 74874 invoked by uid 107); 20 Jul 2011 10:38:30 +1000 Date: 20 Jul 2011 10:38:30 +1000 Date: Wed, 20 Jul 2011 10:38:30 +1000 From: Callum Gibson To: Jung-uk Kim Message-ID: <20110720003830.GA68380@omma.gibson.athome> References: <20110719112033.GA51765@omma.gibson.athome> <201107191204.53865.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107191204.53865.jkim@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 00:38:33 -0000 On 19Jul11 12:04, Jung-uk Kim wrote: }On Tuesday 19 July 2011 07:20 am, Callum Gibson wrote: }> I've just noticed and tracked down a regression in }> x86/cpufreq/powernow.c (on amd64) which was first mentioned here: }> }> http://lists.freebsd.org/pipermail/freebsd-current/2011-March/02350 }>9.html }> }> although no followup seems to have occurred. }> }> Symptoms are that powerd stops working because the dev.cpu.0.freq }> OID is no longer gettable nor settable. }[snip] } }HP again... Can you please show me verbose boot messages? I've put them in http://members.optusnet.com.au/callumgibson/verboseboot.out for you. This is a boot (and shutdown) of the kernel which exhibits the problem (hence kernel.old in output). (On the plus side, this HP laptop now suspends and resumes properly after 5 years. Not sure when that started happening.) regards, Callum -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ From owner-freebsd-amd64@FreeBSD.ORG Wed Jul 20 23:29:12 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id E90DD1065679; Wed, 20 Jul 2011 23:29:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-stable@FreeBSD.org Date: Wed, 20 Jul 2011 19:28:34 -0400 User-Agent: KMail/1.6.2 References: <20110719112033.GA51765@omma.gibson.athome> In-Reply-To: <20110719112033.GA51765@omma.gibson.athome> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_1S2JOs5PZu1wWD6" Message-Id: <201107201928.54079.jkim@FreeBSD.org> Cc: Callum Gibson , freebsd-amd64@freebsd.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 23:29:12 -0000 --Boundary-00=_1S2JOs5PZu1wWD6 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 19 July 2011 07:20 am, Callum Gibson wrote: > Hi, > I've just noticed and tracked down a regression in > x86/cpufreq/powernow.c (on amd64) which was first mentioned here: > > http://lists.freebsd.org/pipermail/freebsd-current/2011-March/02350 >9.html > > although no followup seems to have occurred. The above thread is irrelevant. It was an Intel processor. > Symptoms are that powerd stops working because the dev.cpu.0.freq > OID is no longer gettable nor settable. > > This seems to have been caused by the following revision: > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D222148 > which was in turn an MFC of r221102, so I guess the problem exists > on -current as well, although I can't confirm that since I don't > run it. > > Reverting the change fixes the problem and powerd will work again. > Also other utilities, such as xacpim, work properly. > > I'm running a ML-40 Turion laptop (HP Compaq nx6125). =46rom your dmesg output, I see that the processor speed was not=20 calibrated properly. ML-40's max. core freq. is 2,200 MHz according=20 to its specification but it was probed at 2,282 MHz, which is too=20 high. I think that's the problem. Can you please try the attached=20 patch? Jung-uk Kim --Boundary-00=_1S2JOs5PZu1wWD6 Content-Type: text/plain; charset="iso-8859-1"; name="kern_cpu.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kern_cpu.diff" Index: sys/kern/kern_cpu.c =================================================================== --- sys/kern/kern_cpu.c (revision 224231) +++ sys/kern/kern_cpu.c (working copy) @@ -159,16 +159,21 @@ cpufreq_attach(device_t dev) CF_MTX_INIT(&sc->lock); sc->curr_level.total_set.freq = CPUFREQ_VAL_UNKNOWN; SLIST_INIT(&sc->saved_freq); - /* Try to get nominal CPU freq to use it as maximum later if needed */ - sc->max_mhz = cpu_get_nominal_mhz(dev); - /* If that fails, try to measure the current rate */ - if (sc->max_mhz <= 0) { - pc = cpu_get_pcpu(dev); - if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) - sc->max_mhz = rate / 1000000; - else - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + if (sc->max_mhz == CPUFREQ_VAL_UNKNOWN) { + /* Try to get nominal CPU freq to use it as maximum later. */ + sc->max_mhz = cpu_get_nominal_mhz(dev); + /* If that fails, try to measure the current rate */ + if (sc->max_mhz <= 0) { + pc = cpu_get_pcpu(dev); + if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) + sc->max_mhz = rate / 1000000; + else + sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + } } + if (sc->max_mhz == CPUFREQ_VAL_UNKNOWN) + CF_DEBUG("unknown max frequency for %s\n", + device_get_nameunit(dev)); /* * Only initialize one set of sysctls for all CPUs. In the future, @@ -1001,7 +1006,9 @@ int cpufreq_register(device_t dev) { struct cpufreq_softc *sc; + struct cf_setting *sets; device_t cf_dev, cpu_dev; + int error, max, set_count, type; /* Add a sysctl to get each driver's settings separately. */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), @@ -1009,14 +1016,29 @@ cpufreq_register(device_t dev) OID_AUTO, "freq_settings", CTLTYPE_STRING | CTLFLAG_RD, dev, 0, cpufreq_settings_sysctl, "A", "CPU frequency driver settings"); + /* Get settings from the device and find maximum if possible. */ + max = CPUFREQ_VAL_UNKNOWN; + if (CPUFREQ_DRV_TYPE(dev, &type) == 0 && + (type & CPUFREQ_TYPE_MASK) == CPUFREQ_TYPE_ABSOLUTE) { + set_count = MAX_SETTINGS; + sets = malloc(set_count * sizeof(*sets), M_TEMP, M_NOWAIT); + if (sets != NULL) { + if (CPUFREQ_DRV_SETTINGS(dev, sets, &set_count) == 0 && + set_count > 0) + max = sets[0].freq; + free(sets, M_TEMP); + } + } + /* * Add only one cpufreq device to each CPU. Currently, all CPUs * must offer the same levels and be switched at the same time. */ cpu_dev = device_get_parent(dev); - if ((cf_dev = device_find_child(cpu_dev, "cpufreq", -1))) { + cf_dev = device_find_child(cpu_dev, "cpufreq", -1); + if (cf_dev != NULL) { sc = device_get_softc(cf_dev); - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + sc->max_mhz = max; return (0); } @@ -1025,8 +1047,12 @@ cpufreq_register(device_t dev) if (cf_dev == NULL) return (ENOMEM); device_quiet(cf_dev); - - return (device_probe_and_attach(cf_dev)); + error = device_probe(cf_dev); + if (error != 0) + return (error); + sc = device_get_softc(cf_dev); + sc->max_mhz = max; + return (device_attach(cf_dev)); } int --Boundary-00=_1S2JOs5PZu1wWD6-- From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 21 02:28:23 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48916106566C for ; Thu, 21 Jul 2011 02:28:23 +0000 (UTC) (envelope-from callumgibson@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id BEE3F8FC13 for ; Thu, 21 Jul 2011 02:28:22 +0000 (UTC) Received: from omma.gibson.athome (c122-106-15-156.rivrw1.nsw.optusnet.com.au [122.106.15.156]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with SMTP id p6L2SJuX025329 for ; Thu, 21 Jul 2011 12:28:19 +1000 Received: (qmail 20173 invoked by uid 107); 21 Jul 2011 12:28:19 +1000 Date: 21 Jul 2011 12:28:19 +1000 Date: Thu, 21 Jul 2011 12:28:19 +1000 From: Callum Gibson To: Jung-uk Kim Message-ID: <20110721022818.GA17771@omma.gibson.athome> References: <20110719112033.GA51765@omma.gibson.athome> <201107201928.54079.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107201928.54079.jkim@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 02:28:23 -0000 On 20Jul11 19:28, Jung-uk Kim wrote: }From your dmesg output, I see that the processor speed was not }calibrated properly. ML-40's max. core freq. is 2,200 MHz according }to its specification but it was probed at 2,282 MHz, which is too }high. I think that's the problem. Can you please try the attached }patch? Yes, I have seen core freq wobble around for most of the time I've owned it, but usually close to 2200. This morning (with my reverted powernow.c) I had: dev.cpu.0.freq_levels: 3080/35000 2800/29000 2520/24000 2240/20000 1120/9000 which I don't believe I've seen before. Anyway... With your new patch applied (and powernow.c changed back to r222148) I get exact freq levels: dev.cpu.0.freq_levels: 2200/35000 2000/29000 1800/24000 1600/20000 800/9000 However, dev.cpu.0.freq OID is still missing from sysctl output. As another data point, with your new patch applied, but the old powernow.c, (which I booted into mistakenly first time), I did have dev.cpu.0.freq, but the freq levels weren't exact. Here is a new verbose boot output with a cleaned and built kernel, 8-STABLE as at time=1311028656 and your patch applied: http://members.optusnet.com.au/callumgibson/verboseboot2.out regards, Callum -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 21 16:07:50 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id E4594106564A; Thu, 21 Jul 2011 16:07:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-stable@FreeBSD.org Date: Thu, 21 Jul 2011 12:07:38 -0400 User-Agent: KMail/1.6.2 References: <20110719112033.GA51765@omma.gibson.athome> <201107201928.54079.jkim@FreeBSD.org> <20110721022818.GA17771@omma.gibson.athome> In-Reply-To: <20110721022818.GA17771@omma.gibson.athome> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201107211207.41663.jkim@FreeBSD.org> Cc: Callum Gibson , freebsd-amd64@freebsd.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 16:07:50 -0000 On Wednesday 20 July 2011 10:28 pm, Callum Gibson wrote: > On 20Jul11 19:28, Jung-uk Kim wrote: > }From your dmesg output, I see that the processor speed was not > }calibrated properly. ML-40's max. core freq. is 2,200 MHz > according }to its specification but it was probed at 2,282 MHz, > which is too }high. I think that's the problem. Can you please > try the attached }patch? > > Yes, I have seen core freq wobble around for most of the time I've > owned it, but usually close to 2200. This morning (with my reverted > powernow.c) I had: dev.cpu.0.freq_levels: 3080/35000 2800/29000 > 2520/24000 2240/20000 1120/9000 which I don't believe I've seen > before. Anyway... > > With your new patch applied (and powernow.c changed back to > r222148) I get exact freq levels: > > dev.cpu.0.freq_levels: 2200/35000 2000/29000 1800/24000 1600/20000 > 800/9000 That's better. :-) > However, dev.cpu.0.freq OID is still missing from sysctl output. > > As another data point, with your new patch applied, but the old > powernow.c, (which I booted into mistakenly first time), I did have > dev.cpu.0.freq, but the freq levels weren't exact. > > Here is a new verbose boot output with a cleaned and built kernel, > 8-STABLE as at time=1311028656 and your patch applied: > > http://members.optusnet.com.au/callumgibson/verboseboot2.out Can you please do "set debug.cpufreq.verbose=1" from loader prompt and show me the dmesg output? I want to see intial settings. You can reset it from command line with "sysctl debug.cpufreq.verbose=0" later. Thanks, Jung-uk Kim From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 21 17:48:20 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8940C1065670; Thu, 21 Jul 2011 17:48:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5E9A38FC13; Thu, 21 Jul 2011 17:48:20 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 148D846B0A; Thu, 21 Jul 2011 13:48:20 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9D7A08A02E; Thu, 21 Jul 2011 13:48:19 -0400 (EDT) From: John Baldwin To: freebsd-amd64@freebsd.org Date: Thu, 21 Jul 2011 13:48:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <20110719112033.GA51765@omma.gibson.athome> <201107201928.54079.jkim@FreeBSD.org> <20110721022818.GA17771@omma.gibson.athome> In-Reply-To: <20110721022818.GA17771@omma.gibson.athome> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201107211348.18954.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 21 Jul 2011 13:48:19 -0400 (EDT) Cc: Callum Gibson , freebsd-stable@freebsd.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 17:48:20 -0000 On Wednesday, July 20, 2011 10:28:19 pm Callum Gibson wrote: > On 20Jul11 19:28, Jung-uk Kim wrote: > }From your dmesg output, I see that the processor speed was not > }calibrated properly. ML-40's max. core freq. is 2,200 MHz according > }to its specification but it was probed at 2,282 MHz, which is too > }high. I think that's the problem. Can you please try the attached > }patch? > > Yes, I have seen core freq wobble around for most of the time I've owned it, > but usually close to 2200. Possibly try disabling legacy USB in your BIOS as a test? -- John Baldwin From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 21 20:56:03 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E451065690 for ; Thu, 21 Jul 2011 20:56:03 +0000 (UTC) (envelope-from callumgibson@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id A20BC8FC22 for ; Thu, 21 Jul 2011 20:56:02 +0000 (UTC) Received: from omma.gibson.athome (c122-106-15-156.rivrw1.nsw.optusnet.com.au [122.106.15.156]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with SMTP id p6LKu0Ju025846 for ; Fri, 22 Jul 2011 06:56:01 +1000 Received: (qmail 52729 invoked by uid 107); 22 Jul 2011 06:56:00 +1000 Date: 22 Jul 2011 06:56:00 +1000 Date: Fri, 22 Jul 2011 06:56:00 +1000 From: Callum Gibson To: Jung-uk Kim Message-ID: <20110721205600.GA52261@omma.gibson.athome> References: <20110719112033.GA51765@omma.gibson.athome> <201107201928.54079.jkim@FreeBSD.org> <20110721022818.GA17771@omma.gibson.athome> <201107211207.41663.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107211207.41663.jkim@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 20:56:03 -0000 On 21Jul11 12:07, Jung-uk Kim wrote: }Can you please do "set debug.cpufreq.verbose=1" from loader prompt and }show me the dmesg output? I want to see intial settings. You can }reset it from command line with "sysctl debug.cpufreq.verbose=0" }later. http://members.optusnet.com.au/callumgibson/boot_verboser.out Also, as suggested by jhb@, with legacy usb disabled: http://members.optusnet.com.au/callumgibson/boot_verboser_nousb.out and dev.cpu.0.freq reappears! Spooky. Is that a solution or a workaround? I noticed this disables usb keyboard support at the boot menus. C -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 21 21:53:56 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id B83A0106567B; Thu, 21 Jul 2011 21:53:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-amd64@FreeBSD.org Date: Thu, 21 Jul 2011 17:53:39 -0400 User-Agent: KMail/1.6.2 References: <20110719112033.GA51765@omma.gibson.athome> <201107211207.41663.jkim@FreeBSD.org> <20110721205600.GA52261@omma.gibson.athome> In-Reply-To: <20110721205600.GA52261@omma.gibson.athome> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_m/JKO1yz80K9iDR" Message-Id: <201107211753.42373.jkim@FreeBSD.org> Cc: Callum Gibson , freebsd-stable@freebsd.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 21:53:56 -0000 --Boundary-00=_m/JKO1yz80K9iDR Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday 21 July 2011 04:56 pm, Callum Gibson wrote: > On 21Jul11 12:07, Jung-uk Kim wrote: > }Can you please do "set debug.cpufreq.verbose=1" from loader prompt > and }show me the dmesg output? I want to see intial settings. You > can }reset it from command line with "sysctl > debug.cpufreq.verbose=0" }later. > > http://members.optusnet.com.au/callumgibson/boot_verboser.out > > Also, as suggested by jhb@, with legacy usb disabled: > http://members.optusnet.com.au/callumgibson/boot_verboser_nousb.out > and dev.cpu.0.freq reappears! Spooky. Is that a solution or a > workaround? I noticed this disables usb keyboard support at the > boot menus. It is a workaround. Please try the attached patch. Jung-uk Kim --Boundary-00=_m/JKO1yz80K9iDR Content-Type: text/plain; charset="iso-8859-1"; name="kern_cpu2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kern_cpu2.diff" Index: sys/kern/kern_cpu.c =================================================================== --- sys/kern/kern_cpu.c (revision 224245) +++ sys/kern/kern_cpu.c (working copy) @@ -157,17 +157,18 @@ cpufreq_attach(device_t dev) sysctl_ctx_init(&sc->sysctl_ctx); TAILQ_INIT(&sc->all_levels); CF_MTX_INIT(&sc->lock); - sc->curr_level.total_set.freq = CPUFREQ_VAL_UNKNOWN; SLIST_INIT(&sc->saved_freq); /* Try to get nominal CPU freq to use it as maximum later if needed */ - sc->max_mhz = cpu_get_nominal_mhz(dev); - /* If that fails, try to measure the current rate */ - if (sc->max_mhz <= 0) { - pc = cpu_get_pcpu(dev); - if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) - sc->max_mhz = rate / 1000000; - else - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + if (sc->max_mhz == CPUFREQ_VAL_UNKNOWN) { + sc->max_mhz = cpu_get_nominal_mhz(dev); + /* If that fails, try to measure the current rate */ + if (sc->max_mhz <= 0) { + pc = cpu_get_pcpu(dev); + if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) + sc->max_mhz = rate / 1000000; + else + sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + } } /* @@ -1000,8 +1001,11 @@ out: int cpufreq_register(device_t dev) { + struct cf_setting set; + struct cf_setting *sets; struct cpufreq_softc *sc; device_t cf_dev, cpu_dev; + int error, freq, max, set_count, type; /* Add a sysctl to get each driver's settings separately. */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), @@ -1009,14 +1013,34 @@ cpufreq_register(device_t dev) OID_AUTO, "freq_settings", CTLTYPE_STRING | CTLFLAG_RD, dev, 0, cpufreq_settings_sysctl, "A", "CPU frequency driver settings"); + /* Get settings from the device and find current and maximum frequencies */ + freq = max = CPUFREQ_VAL_UNKNOWN; + if (CPUFREQ_DRV_TYPE(dev, &type) == 0 && + (type & CPUFREQ_TYPE_MASK) == CPUFREQ_TYPE_ABSOLUTE) { + if (CPUFREQ_DRV_GET(dev, &set) == 0) + freq = set.freq; + set_count = MAX_SETTINGS; + sets = malloc(set_count * sizeof(*sets), M_TEMP, M_NOWAIT); + if (sets != NULL) { + if (CPUFREQ_DRV_SETTINGS(dev, sets, &set_count) == 0 && + set_count > 0) + max = sets[0].freq; + free(sets, M_TEMP); + } + } + /* * Add only one cpufreq device to each CPU. Currently, all CPUs * must offer the same levels and be switched at the same time. */ cpu_dev = device_get_parent(dev); - if ((cf_dev = device_find_child(cpu_dev, "cpufreq", -1))) { + cf_dev = device_find_child(cpu_dev, "cpufreq", -1); + if (cf_dev != NULL) { sc = device_get_softc(cf_dev); - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + if (sc->curr_level.total_set.freq == CPUFREQ_VAL_UNKNOWN) + sc->curr_level.total_set.freq = freq; + if (sc->max_mhz == CPUFREQ_VAL_UNKNOWN) + sc->max_mhz = max; return (0); } @@ -1025,8 +1049,13 @@ cpufreq_register(device_t dev) if (cf_dev == NULL) return (ENOMEM); device_quiet(cf_dev); - - return (device_probe_and_attach(cf_dev)); + error = device_probe(cf_dev); + if (error != 0) + return (error); + sc = device_get_softc(cf_dev); + sc->curr_level.total_set.freq = freq; + sc->max_mhz = max; + return (device_attach(cf_dev)); } int --Boundary-00=_m/JKO1yz80K9iDR-- From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 21 21:56:23 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2719E106566B for ; Thu, 21 Jul 2011 21:56:23 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id 0D3538FC15 for ; Thu, 21 Jul 2011 21:56:22 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta09.emeryville.ca.mail.comcast.net with comcast id AkdT1h0061zF43QA9ljAUG; Thu, 21 Jul 2011 21:43:10 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta24.emeryville.ca.mail.comcast.net with comcast id Alie1h0011t3BNj8kliegN; Thu, 21 Jul 2011 21:42:39 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id B8CE4102C36; Thu, 21 Jul 2011 14:43:10 -0700 (PDT) Date: Thu, 21 Jul 2011 14:43:10 -0700 From: Jeremy Chadwick To: Callum Gibson Message-ID: <20110721214310.GA74656@icarus.home.lan> References: <20110719112033.GA51765@omma.gibson.athome> <201107201928.54079.jkim@FreeBSD.org> <20110721022818.GA17771@omma.gibson.athome> <201107211207.41663.jkim@FreeBSD.org> <20110721205600.GA52261@omma.gibson.athome> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110721205600.GA52261@omma.gibson.athome> User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Thu, 21 Jul 2011 22:09:04 +0000 Cc: freebsd-stable@FreeBSD.org, freebsd-amd64@FreeBSD.org, Jung-uk Kim Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 21:56:23 -0000 On Fri, Jul 22, 2011 at 06:56:00AM +1000, Callum Gibson wrote: > On 21Jul11 12:07, Jung-uk Kim wrote: > }Can you please do "set debug.cpufreq.verbose=1" from loader prompt and > }show me the dmesg output? I want to see intial settings. You can > }reset it from command line with "sysctl debug.cpufreq.verbose=0" > }later. > > http://members.optusnet.com.au/callumgibson/boot_verboser.out > > Also, as suggested by jhb@, with legacy usb disabled: > http://members.optusnet.com.au/callumgibson/boot_verboser_nousb.out > and dev.cpu.0.freq reappears! Spooky. Is that a solution or a workaround? > I noticed this disables usb keyboard support at the boot menus. "Legacy USB" support is a horribly-named BIOS option. What the option actually does, without getting into the technicalities, is make your USB keyboard work inside of environments where there is no USB driver. The most commonly-used examples are bootloader/bootstraps and MS-DOS. The BIOS itself (meaning the firmware/BIOS, not "the BIOS as in a piece of legacy technology") has a tiny USB stack in it. That's how your USB keyboard is able to work (e.g. to press Del or F2 to get into the BIOS itself), and how you're able to boot from USB-attached devices. You should keep "Legacy USB" enabled if you want your keyboard to work in bootloaders/bootstraps. If enabling this feature breaks something else, that sounds like a bug in the vendor BIOS to me, and you should contact the vendor or motherboard manufacturer to inform them of the bug. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | From owner-freebsd-amd64@FreeBSD.ORG Fri Jul 22 11:13:08 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4F491065686 for ; Fri, 22 Jul 2011 11:13:08 +0000 (UTC) (envelope-from callumgibson@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 290918FC23 for ; Fri, 22 Jul 2011 11:13:07 +0000 (UTC) Received: from omma.gibson.athome (c122-106-15-156.rivrw1.nsw.optusnet.com.au [122.106.15.156]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with SMTP id p6MBD5KL000661 for ; Fri, 22 Jul 2011 21:13:06 +1000 Received: (qmail 77318 invoked by uid 107); 22 Jul 2011 21:13:05 +1000 Date: 22 Jul 2011 21:13:05 +1000 Date: Fri, 22 Jul 2011 21:13:05 +1000 From: Callum Gibson To: Jung-uk Kim Message-ID: <20110722111305.GB76391@omma.gibson.athome> References: <20110719112033.GA51765@omma.gibson.athome> <201107211207.41663.jkim@FreeBSD.org> <20110721205600.GA52261@omma.gibson.athome> <201107211753.42373.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107211753.42373.jkim@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2011 11:13:08 -0000 On 21Jul11 17:53, Jung-uk Kim wrote: }> }> http://members.optusnet.com.au/callumgibson/boot_verboser_nousb.out }> and dev.cpu.0.freq reappears! Spooky. Is that a solution or a }> workaround? I noticed this disables usb keyboard support at the }> boot menus. } }It is a workaround. Please try the attached patch. Sorry, no improvement that I can see. See verbose output: http://members.optusnet.com.au/callumgibson/boot_verboser2.out C -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ From owner-freebsd-amd64@FreeBSD.ORG Fri Jul 22 12:16:54 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 424CC1065675; Fri, 22 Jul 2011 12:16:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 16CC58FC15; Fri, 22 Jul 2011 12:16:54 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id AB8F246B03; Fri, 22 Jul 2011 08:16:53 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 49DBC8A02C; Fri, 22 Jul 2011 08:16:53 -0400 (EDT) From: John Baldwin To: freebsd-stable@freebsd.org Date: Fri, 22 Jul 2011 08:16:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <20110719112033.GA51765@omma.gibson.athome> <20110721205600.GA52261@omma.gibson.athome> <20110721214310.GA74656@icarus.home.lan> In-Reply-To: <20110721214310.GA74656@icarus.home.lan> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201107220816.52901.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 22 Jul 2011 08:16:53 -0400 (EDT) Cc: Attilio Rao , Callum Gibson , freebsd-amd64@freebsd.org, Jeremy Chadwick Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2011 12:16:54 -0000 On Thursday, July 21, 2011 5:43:10 pm Jeremy Chadwick wrote: > On Fri, Jul 22, 2011 at 06:56:00AM +1000, Callum Gibson wrote: > > On 21Jul11 12:07, Jung-uk Kim wrote: > > }Can you please do "set debug.cpufreq.verbose=1" from loader prompt and > > }show me the dmesg output? I want to see intial settings. You can > > }reset it from command line with "sysctl debug.cpufreq.verbose=0" > > }later. > > > > http://members.optusnet.com.au/callumgibson/boot_verboser.out > > > > Also, as suggested by jhb@, with legacy usb disabled: > > http://members.optusnet.com.au/callumgibson/boot_verboser_nousb.out > > and dev.cpu.0.freq reappears! Spooky. Is that a solution or a workaround? > > I noticed this disables usb keyboard support at the boot menus. > > "Legacy USB" support is a horribly-named BIOS option. > > What the option actually does, without getting into the technicalities, > is make your USB keyboard work inside of environments where there is no > USB driver. The most commonly-used examples are bootloader/bootstraps > and MS-DOS. > > The BIOS itself (meaning the firmware/BIOS, not "the BIOS as in a piece > of legacy technology") has a tiny USB stack in it. That's how your > USB keyboard is able to work (e.g. to press Del or F2 to get into the > BIOS itself), and how you're able to boot from USB-attached devices. > > You should keep "Legacy USB" enabled if you want your keyboard to work > in bootloaders/bootstraps. If enabling this feature breaks something > else, that sounds like a bug in the vendor BIOS to me, and you should > contact the vendor or motherboard manufacturer to inform them of the > bug. It's a known issue that the Legacy USB option can break our TSC calibration code causing an inflated value of the TSC frequency. The issue is that the legacy USB code is often very dumb. It is implemented via polling in SMI#. It appears that each interrupt from the ISA timer triggers an SMI# that polls the USB bus looking for any keyboards and checking for any pending keyboard events) that it can then use to trigger simulated PS/2 keyboard actions. The problem is that we calibrate the TSC using this algorithm: - grab the TSC - spin on the ISA timer waiting for it to run for a second - grab the TSC The issue is that the SMI# fires at the same time we want to be execuiting step 3, and step 3 is deferred while the SMI# handler runs. As a result, the TSC delta ends up being "1 second + time of an SMI# to poll USB". We have a hack fix for this at work that originally came from Attilio Rao. This is a patch for it relative to 8. It disables interrupt generation for the ISA timer while we calibrate the TSC (which disables the SMI# temporarily): Index: x86/isa/clock.c =================================================================== --- x86/isa/clock.c (.../mirror/FreeBSD/stable/8/sys) (revision 224114) +++ x86/isa/clock.c (.../stable/8/sys) (revision 224114) @@ -119,7 +119,7 @@ static unsigned i8254_get_timecount(struct timecounter *tc); static unsigned i8254_simple_get_timecount(struct timecounter *tc); -static void set_i8254_freq(u_int freq, int intr_freq); +static void set_i8254_freq(u_int freq, int intr_freq, int freerun); static struct timecounter i8254_timecounter = { i8254_get_timecount, /* get_timecount */ @@ -447,15 +447,32 @@ #endif } +/* + * XXX: This is a gross hack to workaround USB legacy emulation. For + * some systems, the USB legacy emulation is implemented by a periodic + * SMI# triggered by the i8254. The resulting SMI# could cause the + * DELAY() to run too long resulting in the TSC being miscalibrated. + * The workaround is to disable i8254 interrupts while calibrating the + * TSC. + */ +void +DELAY_TSCCAL(int n) +{ + + set_i8254_freq(i8254_freq, hz, 1); + DELAY(n); + set_i8254_freq(i8254_freq, hz, 0); +} + static void -set_i8254_freq(u_int freq, int intr_freq) +set_i8254_freq(u_int freq, int intr_freq, int freerun) { int new_i8254_real_max_count; i8254_timecounter.tc_frequency = freq; mtx_lock_spin(&clock_lock); i8254_freq = freq; - if (using_lapic_timer != LAPIC_CLOCK_NONE) + if (using_lapic_timer != LAPIC_CLOCK_NONE || freerun) new_i8254_real_max_count = 0x10000; else new_i8254_real_max_count = TIMER_DIV(intr_freq); @@ -508,7 +525,7 @@ { mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_NOPROFILE); - set_i8254_freq(i8254_freq, hz); + set_i8254_freq(i8254_freq, hz, 0); } void @@ -517,7 +534,7 @@ atrtc_start(); - set_i8254_freq(i8254_freq, hz); + set_i8254_freq(i8254_freq, hz, 0); tc_init(&i8254_timecounter); init_TSC(); @@ -565,7 +582,7 @@ i8254_timecounter.tc_get_timecount = i8254_simple_get_timecount; i8254_timecounter.tc_counter_mask = 0xffff; - set_i8254_freq(i8254_freq, hz); + set_i8254_freq(i8254_freq, hz, 0); } /* @@ -627,7 +644,7 @@ freq = i8254_freq; error = sysctl_handle_int(oidp, &freq, 0, req); if (error == 0 && req->newptr != NULL) - set_i8254_freq(freq, hz); + set_i8254_freq(freq, hz, 0); return (error); } Index: amd64/include/clock.h =================================================================== --- amd64/include/clock.h (.../mirror/FreeBSD/stable/8/sys) (revision 224114) +++ amd64/include/clock.h (.../stable/8/sys) (revision 224114) @@ -32,10 +70,11 @@ /* * Driver to clock driver interface. */ void startrtclock(void); void init_TSC(void); void init_TSC_tc(void); +void DELAY_TSCCAL(int n); #define HAS_TIMER_SPKR 1 int timer_spkr_acquire(void); Index: amd64/amd64/tsc.c =================================================================== --- amd64/amd64/tsc.c (.../mirror/FreeBSD/stable/8/sys) (revision 224114) +++ amd64/amd64/tsc.c (.../stable/8/sys) (revision 224114) @@ -87,7 +92,7 @@ printf("Calibrating TSC clock ... "); tscval[0] = rdtsc(); - DELAY(1000000); + DELAY_TSCCAL(1000000); tscval[1] = rdtsc(); tsc_freq = tscval[1] - tscval[0]; -- John Baldwin From owner-freebsd-amd64@FreeBSD.ORG Fri Jul 22 21:58:19 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 28598106566C; Fri, 22 Jul 2011 21:58:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Callum Gibson Date: Fri, 22 Jul 2011 17:57:58 -0400 User-Agent: KMail/1.6.2 References: <20110719112033.GA51765@omma.gibson.athome> <201107211753.42373.jkim@FreeBSD.org> <20110722111305.GB76391@omma.gibson.athome> In-Reply-To: <20110722111305.GB76391@omma.gibson.athome> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_pJfKOvpaM48NZ7P" Message-Id: <201107221758.01272.jkim@FreeBSD.org> Cc: freebsd-stable@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2011 21:58:19 -0000 --Boundary-00=_pJfKOvpaM48NZ7P Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 22 July 2011 07:13 am, Callum Gibson wrote: > On 21Jul11 17:53, Jung-uk Kim wrote: > }> > }> > http://members.optusnet.com.au/callumgibson/boot_verboser_nousb.out > }> and dev.cpu.0.freq reappears! Spooky. Is that a solution or a }> > workaround? I noticed this disables usb keyboard support at the }> > boot menus. > } > }It is a workaround. Please try the attached patch. > > Sorry, no improvement that I can see. See verbose output: > > http://members.optusnet.com.au/callumgibson/boot_verboser2.out Please try the attached patch. If it doesn't work, I need to see "acpidump -dt" output. Jung-uk Kim --Boundary-00=_pJfKOvpaM48NZ7P Content-Type: text/plain; charset="iso-8859-1"; name="kern_cpu3.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kern_cpu3.diff" Index: sys/kern/kern_cpu.c =================================================================== --- sys/kern/kern_cpu.c (revision 224271) +++ sys/kern/kern_cpu.c (working copy) @@ -145,9 +145,7 @@ static int cpufreq_attach(device_t dev) { struct cpufreq_softc *sc; - struct pcpu *pc; device_t parent; - uint64_t rate; int numdevs; CF_DEBUG("initializing %s\n", device_get_nameunit(dev)); @@ -157,18 +155,7 @@ cpufreq_attach(device_t dev) sysctl_ctx_init(&sc->sysctl_ctx); TAILQ_INIT(&sc->all_levels); CF_MTX_INIT(&sc->lock); - sc->curr_level.total_set.freq = CPUFREQ_VAL_UNKNOWN; SLIST_INIT(&sc->saved_freq); - /* Try to get nominal CPU freq to use it as maximum later if needed */ - sc->max_mhz = cpu_get_nominal_mhz(dev); - /* If that fails, try to measure the current rate */ - if (sc->max_mhz <= 0) { - pc = cpu_get_pcpu(dev); - if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) - sc->max_mhz = rate / 1000000; - else - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; - } /* * Only initialize one set of sysctls for all CPUs. In the future, @@ -500,6 +487,7 @@ cf_get_method(device_t dev, struct cf_level *level goto out; } } + CF_DEBUG("get freq failed, estimated freq %d\n", (int)rate); error = ENXIO; out: @@ -551,17 +539,23 @@ cf_levels_method(device_t dev, struct cf_level *le * provide settings for informational purposes only. */ error = CPUFREQ_DRV_TYPE(devs[i], &type); - if (error || (type & CPUFREQ_FLAG_INFO_ONLY)) { - if (error == 0) { - CF_DEBUG("skipping info-only driver %s\n", - device_get_nameunit(devs[i])); - } + if (error) continue; - } set_count = MAX_SETTINGS; error = CPUFREQ_DRV_SETTINGS(devs[i], sets, &set_count); if (error || set_count == 0) continue; + if ((type & CPUFREQ_TYPE_MASK) == CPUFREQ_TYPE_ABSOLUTE && + sc->max_mhz < sets[0].freq) { + CF_DEBUG("setting max freq %d from %s\n", + sets[0].freq, device_get_nameunit(devs[i])); + sc->max_mhz = sets[0].freq; + } + if ((type & CPUFREQ_FLAG_INFO_ONLY) != 0) { + CF_DEBUG("skipping info-only driver %s\n", + device_get_nameunit(devs[i])); + continue; + } /* Add the settings to our absolute/relative lists. */ switch (type & CPUFREQ_TYPE_MASK) { @@ -867,8 +861,9 @@ cpufreq_dup_set(struct cpufreq_softc *sc, struct c static int cpufreq_curr_sysctl(SYSCTL_HANDLER_ARGS) { + struct cf_level level; + struct cf_level *levels; struct cpufreq_softc *sc; - struct cf_level *levels; int count, devcount, error, freq, i, n; device_t *devs; @@ -876,10 +871,10 @@ cpufreq_curr_sysctl(SYSCTL_HANDLER_ARGS) sc = oidp->oid_arg1; levels = sc->levels_buf; - error = CPUFREQ_GET(sc->dev, &levels[0]); + error = CPUFREQ_GET(sc->dev, &level); if (error) goto out; - freq = levels[0].total_set.freq; + freq = level.total_set.freq; error = sysctl_handle_int(oidp, &freq, 0, req); if (error != 0 || req->newptr == NULL) goto out; @@ -1000,8 +995,11 @@ out: int cpufreq_register(device_t dev) { + struct cf_setting set; + struct cf_setting *sets; struct cpufreq_softc *sc; device_t cf_dev, cpu_dev; + int error, freq, max, set_count, type; /* Add a sysctl to get each driver's settings separately. */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), @@ -1009,14 +1007,34 @@ cpufreq_register(device_t dev) OID_AUTO, "freq_settings", CTLTYPE_STRING | CTLFLAG_RD, dev, 0, cpufreq_settings_sysctl, "A", "CPU frequency driver settings"); + /* Get settings from the device and find current and maximum frequencies */ + freq = max = CPUFREQ_VAL_UNKNOWN; + if (CPUFREQ_DRV_TYPE(dev, &type) == 0 && + (type & CPUFREQ_TYPE_MASK) == CPUFREQ_TYPE_ABSOLUTE) { + if (CPUFREQ_DRV_GET(dev, &set) == 0) + freq = set.freq; + set_count = MAX_SETTINGS; + sets = malloc(set_count * sizeof(*sets), M_TEMP, M_NOWAIT); + if (sets != NULL) { + if (CPUFREQ_DRV_SETTINGS(dev, sets, &set_count) == 0 && + set_count > 0) + max = sets[0].freq; + free(sets, M_TEMP); + } + } + /* * Add only one cpufreq device to each CPU. Currently, all CPUs * must offer the same levels and be switched at the same time. */ cpu_dev = device_get_parent(dev); - if ((cf_dev = device_find_child(cpu_dev, "cpufreq", -1))) { + cf_dev = device_find_child(cpu_dev, "cpufreq", -1); + if (cf_dev != NULL) { sc = device_get_softc(cf_dev); - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + if (sc->curr_level.total_set.freq == CPUFREQ_VAL_UNKNOWN) + sc->curr_level.total_set.freq = freq; + if (sc->max_mhz < max) + sc->max_mhz = max; return (0); } @@ -1025,8 +1043,13 @@ cpufreq_register(device_t dev) if (cf_dev == NULL) return (ENOMEM); device_quiet(cf_dev); - - return (device_probe_and_attach(cf_dev)); + error = device_probe(cf_dev); + if (error) + return (error); + sc = device_get_softc(cf_dev); + sc->curr_level.total_set.freq = freq; + sc->max_mhz = max; + return (device_attach(cf_dev)); } int --Boundary-00=_pJfKOvpaM48NZ7P-- From owner-freebsd-amd64@FreeBSD.ORG Sat Jul 23 08:13:07 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 403C71065672 for ; Sat, 23 Jul 2011 08:13:07 +0000 (UTC) (envelope-from callumgibson@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id B4EC58FC12 for ; Sat, 23 Jul 2011 08:13:06 +0000 (UTC) Received: from omma.gibson.athome (c122-106-15-156.rivrw1.nsw.optusnet.com.au [122.106.15.156]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with SMTP id p6N8D4Nq009920 for ; Sat, 23 Jul 2011 18:13:04 +1000 Received: (qmail 14529 invoked by uid 107); 23 Jul 2011 18:13:04 +1000 Date: 23 Jul 2011 18:13:04 +1000 Date: Sat, 23 Jul 2011 18:13:04 +1000 From: Callum Gibson To: John Baldwin Message-ID: <20110723081304.GA14172@omma.gibson.athome> References: <20110719112033.GA51765@omma.gibson.athome> <20110721205600.GA52261@omma.gibson.athome> <20110721214310.GA74656@icarus.home.lan> <201107220816.52901.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107220816.52901.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Attilio Rao , freebsd-stable@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2011 08:13:07 -0000 On 22Jul11 08:16, John Baldwin wrote: }The problem is that we calibrate the TSC using this algorithm: } } - grab the TSC } - spin on the ISA timer waiting for it to run for a second } - grab the TSC } }The issue is that the SMI# fires at the same time we want to be execuiting }step 3, and step 3 is deferred while the SMI# handler runs. As a result, the }TSC delta ends up being "1 second + time of an SMI# to poll USB". We have a }hack fix for this at work that originally came from Attilio Rao. This is a }patch for it relative to 8. It disables interrupt generation for the ISA }timer while we calibrate the TSC (which disables the SMI# temporarily): Thanks, John. The hack works as intended, but I guess it's not a "real" solution which is why you haven't committed it? C -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ From owner-freebsd-amd64@FreeBSD.ORG Sat Jul 23 08:21:20 2011 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66946106576F for ; Sat, 23 Jul 2011 08:21:20 +0000 (UTC) (envelope-from callumgibson@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id DD2B68FC16 for ; Sat, 23 Jul 2011 08:21:19 +0000 (UTC) Received: from omma.gibson.athome (c122-106-15-156.rivrw1.nsw.optusnet.com.au [122.106.15.156]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with SMTP id p6N8L83P014257 for ; Sat, 23 Jul 2011 18:21:09 +1000 Received: (qmail 14814 invoked by uid 107); 23 Jul 2011 18:21:08 +1000 Date: 23 Jul 2011 18:21:08 +1000 Date: Sat, 23 Jul 2011 18:21:08 +1000 From: Callum Gibson To: Jung-uk Kim Message-ID: <20110723082108.GB14172@omma.gibson.athome> References: <20110719112033.GA51765@omma.gibson.athome> <201107211753.42373.jkim@FreeBSD.org> <20110722111305.GB76391@omma.gibson.athome> <201107221758.01272.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107221758.01272.jkim@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2011 08:21:20 -0000 On 22Jul11 17:57, Jung-uk Kim wrote: }Please try the attached patch. If it doesn't work, I need to see }"acpidump -dt" output. Sorry, no difference. Given jhb's response is there any point pursuing this further? Seems to be a "known issue" with legacy usb that perhaps can't be fixed. In any case, acpidump output here: http://members.optusnet.com.au/callumgibson/acpidump.out.gz C -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ From owner-freebsd-amd64@FreeBSD.ORG Sat Jul 23 08:47:24 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 000E3106566C for ; Sat, 23 Jul 2011 08:47:23 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [76.96.30.16]) by mx1.freebsd.org (Postfix) with ESMTP id D8B3B8FC15 for ; Sat, 23 Jul 2011 08:47:23 +0000 (UTC) Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta01.emeryville.ca.mail.comcast.net with comcast id BLmp1h0021HpZEsA1LnLLq; Sat, 23 Jul 2011 08:47:20 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta14.emeryville.ca.mail.comcast.net with comcast id BLnP1h0011t3BNj8aLnPRf; Sat, 23 Jul 2011 08:47:24 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 5BA78102C36; Sat, 23 Jul 2011 01:47:21 -0700 (PDT) Date: Sat, 23 Jul 2011 01:47:21 -0700 From: Jeremy Chadwick To: Callum Gibson Message-ID: <20110723084721.GA7931@icarus.home.lan> References: <20110719112033.GA51765@omma.gibson.athome> <20110721205600.GA52261@omma.gibson.athome> <20110721214310.GA74656@icarus.home.lan> <201107220816.52901.jhb@freebsd.org> <20110723081304.GA14172@omma.gibson.athome> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110723081304.GA14172@omma.gibson.athome> User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Sat, 23 Jul 2011 12:50:28 +0000 Cc: Attilio Rao , freebsd-amd64@freebsd.org, freebsd-stable@freebsd.org Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2011 08:47:24 -0000 On Sat, Jul 23, 2011 at 06:13:04PM +1000, Callum Gibson wrote: > On 22Jul11 08:16, John Baldwin wrote: > }The problem is that we calibrate the TSC using this algorithm: > } > } - grab the TSC > } - spin on the ISA timer waiting for it to run for a second > } - grab the TSC > } > }The issue is that the SMI# fires at the same time we want to be execuiting > }step 3, and step 3 is deferred while the SMI# handler runs. As a result, the > }TSC delta ends up being "1 second + time of an SMI# to poll USB". We have a > }hack fix for this at work that originally came from Attilio Rao. This is a > }patch for it relative to 8. It disables interrupt generation for the ISA > }timer while we calibrate the TSC (which disables the SMI# temporarily): > > Thanks, John. The hack works as intended, but I guess it's not a "real" > solution which is why you haven't committed it? This sort of thing is going to have to get dealt with officially sooner or later, hack-fix or elegant solution either way[1]. More and more systems are using native USB keyboards, and most system BIOSes I've seen (from multiple vendors, specifically Supermicro, Lenovo, Asus, Dell, HP, and Gigabyte[2]) are defaulting to having these options enabled (and rightfully so). If the hack-fix has repercussions, it would be helpful to know what those are or how those might manifest themselves. Otherwise, has anyone taken a look at how Linux addresses this problem? To my knowledge GRUB and similar bootstraps do not have a native USB stack, so I'm left wondering how they deal with this. [1]: I'm in no way saying "Hey! Fix this! {contributes nothing}", I'm simply pointing out that we're at a point where we really don't have much of a choice. The more I read technical explanations from John the more hate x86 architecture. ;-) [2]: On a couple Gigabyte boards I have the default values for said option is enabled (for both keyboard and mouse). -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |