From owner-cvs-src-old@FreeBSD.ORG Fri Nov 13 13:07:14 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E88410656A9 for ; Fri, 13 Nov 2009 13:07:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7A38FC0C for ; Fri, 13 Nov 2009 13:07:14 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nADD7DlC050384 for ; Fri, 13 Nov 2009 13:07:13 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nADD7DXk050383 for cvs-src-old@freebsd.org; Fri, 13 Nov 2009 13:07:13 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200911131307.nADD7DXk050383@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Fri, 13 Nov 2009 13:07:01 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 initcpu.c machdep.c src/sys/amd64/include md_var.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2009 13:07:14 -0000 kib 2009-11-13 13:07:01 UTC FreeBSD src repository Modified files: sys/amd64/amd64 initcpu.c machdep.c sys/amd64/include md_var.h Log: SVN rev 199253 on 2009-11-13 13:07:01Z by kib Amd64 init_secondary() calls initializecpu() while curthread is still not properly set up. r199067 added the call to TUNABLE_INT_FETCH() to initializecpu() that results in hang because AP are started when kernel environment is already dynamic and thus needs to acquire mutex, that is too early in AP start sequence to work. Extract the code that should be executed only once, because it sets up global variables, from initializecpu() to initializecpucache(), and call the later only from hammer_time() executed on BSP. Now, TUNABLE_INT_FETCH() is done only once at BSP at the early boot stage. In collaboration with: Mykola Dzham Reviewed by: jhb Tested by: ed, battlez Revision Changes Path 1.59 +5 -0 src/sys/amd64/amd64/initcpu.c 1.712 +1 -0 src/sys/amd64/amd64/machdep.c 1.87 +1 -0 src/sys/amd64/include/md_var.h