From owner-cvs-all@FreeBSD.ORG Tue Nov 13 23:00:26 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66A0316A41B; Tue, 13 Nov 2007 23:00:26 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5E60113C4BE; Tue, 13 Nov 2007 23:00:26 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lADN0OVU073238; Tue, 13 Nov 2007 23:00:24 GMT (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lADN0Ofn073237; Tue, 13 Nov 2007 23:00:24 GMT (envelope-from peter) Message-Id: <200711132300.lADN0Ofn073237@repoman.freebsd.org> From: Peter Wemm Date: Tue, 13 Nov 2007 23:00:24 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/i386/i386 locore.s machdep.c mp_machdep.c pmap.c src/sys/i386/include pmap.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2007 23:00:26 -0000 peter 2007-11-13 23:00:24 UTC FreeBSD src repository Modified files: sys/i386/i386 locore.s machdep.c mp_machdep.c pmap.c sys/i386/include pmap.h Log: Drastically simplify the i386 pcpu backend by merging parts of the amd64 mechanism over. Instead of page table hackery that isn't actually needed, just use 'struct pcpu __pcpu[MAXCPU]' for backing like all the other platforms do. Get rid of 'struct privatespace' and a while mess of #ifdef SMP garbage that set it up. As a bonus, this returns the 4MB of KVA that we stole to implement it the old way. This also allows you to read the pcpu data for each cpu when reading a minidump. Background information: Originally, pcpu stuff was implemented as having per-cpu page tables and magic to make different data structures appear at the same actual address. In order to share page tables, we switched to using the GDT and %fs/%gs to access it. But we still did the evil magic to set it up for the old way. The "idle stacks" are not used for the idle process anymore and are just used for a few functions during bootup, then ignored. (excercise for reader: free these afterwards). Revision Changes Path 1.189 +0 -65 src/sys/i386/i386/locore.s 1.661 +2 -9 src/sys/i386/i386/machdep.c 1.282 +22 -45 src/sys/i386/i386/mp_machdep.c 1.598 +0 -10 src/sys/i386/i386/pmap.c 1.129 +1 -12 src/sys/i386/include/pmap.h