From owner-svn-src-all@FreeBSD.ORG Tue Nov 10 10:34:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C89B71065679; Tue, 10 Nov 2009 10:34:44 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B728A8FC14; Tue, 10 Nov 2009 10:34:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAAAYi35055977; Tue, 10 Nov 2009 10:34:44 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAAAYia3055971; Tue, 10 Nov 2009 10:34:44 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200911101034.nAAAYia3055971@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 10 Nov 2009 10:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199133 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 10:34:44 -0000 Author: des Date: Tue Nov 10 10:34:44 2009 New Revision: 199133 URL: http://svn.freebsd.org/changeset/base/199133 Log: Remove a bunch of code used to detect SMP on ((i386 && !pc98) || amd64) and offer to install an SMP kernel. The way this worked was: on supported platforms, code to read ACPI tables and BIOS MP tables was compiled into sysinstall, and if an SMP kernel config was present in the source tree when sysinstall was built, code that called it was also compiled. Since we haven't had SMP kernel configs in years, the latter was never compiled and the former never ran. This only removes dead and unreachable code; it does *not* remove the NCpus variable, nor the code that sets it to 1, nor the code that asks the user to select a kernel from a list. Discussed with: re@, randi@ and others Deleted: head/usr.sbin/sysinstall/acpi.c head/usr.sbin/sysinstall/acpidump.h head/usr.sbin/sysinstall/biosmptable.c Modified: head/usr.sbin/sysinstall/Makefile head/usr.sbin/sysinstall/dist.c head/usr.sbin/sysinstall/install.c head/usr.sbin/sysinstall/menus.c head/usr.sbin/sysinstall/sysinstall.8 Modified: head/usr.sbin/sysinstall/Makefile ============================================================================== --- head/usr.sbin/sysinstall/Makefile Tue Nov 10 09:46:52 2009 (r199132) +++ head/usr.sbin/sysinstall/Makefile Tue Nov 10 10:34:44 2009 (r199133) @@ -23,37 +23,6 @@ CFLAGS+= -I${.CURDIR}/../../gnu/lib/libd DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO} LDADD= -ldialog -lncurses -lutil -ldisk -lftpio -# -# When distributions have both UP and SMP kernels sysinstall -# will probe for the number of cpus on the target machine and -# automatically select which is appropriate. This can be overridden -# through the menus or both kernels can be installed (with the -# most "appropriate" one setup as /boot/kernel). For now this -# is done for i386 and amd64; for other systems support must be -# added to identify the cpu count if acpi and MPTable probing -# is insufficient. -# -# The unmber of cpus probed is passed through the environment in -# VAR_NCPUS ("ncpus") to scripts. -# -# Note that WITH_SMP is a compile time option that enables the -# builtin menus for the SMP kernel configuration. If this kernel -# is not built (see release/Makefile) then this should not be -# enabled as sysinstall may try to select an SMP kernel config -# where none is available. This option should not be needed--we -# should probe for an SMP kernel in the distribution but doing -# that is painful because of media changes and the structure of -# sysinstall so for now it's a priori. -# -.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "amd64" -SRCS+= acpi.c biosmptable.c -.if exists(${.CURDIR}/../../sys/${MACHINE}/conf/SMP) -CFLAGS+=-DWITH_SMP -.endif -DPADD+= ${LIBDEVINFO} -LDADD+= -ldevinfo -.endif - CLEANFILES= makedevs.c rtermcap CLEANFILES+= keymap.tmp keymap.h countries.tmp countries.h Modified: head/usr.sbin/sysinstall/dist.c ============================================================================== --- head/usr.sbin/sysinstall/dist.c Tue Nov 10 09:46:52 2009 (r199132) +++ head/usr.sbin/sysinstall/dist.c Tue Nov 10 10:34:44 2009 (r199133) @@ -99,9 +99,6 @@ static Distribution DistTable[] = { /* The kernel distributions */ static Distribution KernelDistTable[] = { DTE_TARBALL("GENERIC", &KernelDists, KERNEL_GENERIC, "/boot"), -#ifdef WITH_SMP - DTE_TARBALL("SMP", &KernelDists, KERNEL_SMP, "/boot"), -#endif DTE_END, }; @@ -207,12 +204,7 @@ distConfig(dialogMenuItem *self) int selectKernel(void) { -#ifdef WITH_SMP - /* select default kernel based on deduced cpu count */ - return NCpus > 1 ? DIST_KERNEL_SMP : DIST_KERNEL_GENERIC; -#else return DIST_KERNEL_GENERIC; -#endif } int Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Tue Nov 10 09:46:52 2009 (r199132) +++ head/usr.sbin/sysinstall/install.c Tue Nov 10 10:34:44 2009 (r199133) @@ -938,20 +938,12 @@ installFixupKernel(dialogMenuItem *self, /* All of this is done only as init, just to be safe */ if (RunningAsInit) { /* - * Install something as /boot/kernel. Prefer SMP - * over GENERIC--this should handle the case where - * both SMP and GENERIC are installed (otherwise we - * select the one kernel that was installed). + * Install something as /boot/kernel. * * NB: we assume any existing kernel has been saved * already and the /boot/kernel we remove is empty. */ vsystem("rm -rf /boot/kernel"); -#if WITH_SMP - if (dists & DIST_KERNEL_SMP) - vsystem("mv /boot/SMP /boot/kernel"); - else -#endif vsystem("mv /boot/GENERIC /boot/kernel"); } return DITEM_SUCCESS | DITEM_RESTORE; @@ -1255,11 +1247,6 @@ installVarDefaults(dialogMenuItem *self) variable_set2(SYSTEM_STATE, "init", 0); variable_set2(VAR_NEWFS_ARGS, "-b 16384 -f 2048", 0); variable_set2(VAR_CONSTERM, "NO", 0); -#if (defined(__i386__) && !defined(PC98)) || defined(__amd64__) - NCpus = acpi_detect(); - if (NCpus == -1) - NCpus = biosmptable_detect(); -#endif if (NCpus <= 0) NCpus = 1; snprintf(ncpus, sizeof(ncpus), "%u", NCpus); Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Tue Nov 10 09:46:52 2009 (r199132) +++ head/usr.sbin/sysinstall/menus.c Tue Nov 10 10:34:44 2009 (r199133) @@ -1031,10 +1031,6 @@ DMenu MenuKernelDistributions = { NULL, clearKernel, NULL, NULL, ' ', ' ', ' ' }, { " GENERIC", "GENERIC kernel configuration", dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_GENERIC }, -#ifdef WITH_SMP - { " SMP", "GENERIC symmetric multiprocessor kernel configuration", - dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_SMP }, -#endif { NULL } }, }; Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Tue Nov 10 09:46:52 2009 (r199132) +++ head/usr.sbin/sysinstall/sysinstall.8 Tue Nov 10 10:34:44 2009 (r199133) @@ -413,8 +413,6 @@ Possible distribution values are: The base binary distribution. .It Li GENERIC The GENERIC kernel. -.It Li SMP -A kernel suitable for multiple processor systems. .It Li doc Miscellaneous documentation .It Li games