Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 1999 17:28:17 +0200 (CEST)
From:      des@yes.no
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   i386/12187: [PATCH] option FAILSAFE is misnamed
Message-ID:  <199906131528.RAA38003@des.follo.net>

next in thread | raw e-mail | index | archive | help

>Number:         12187
>Category:       i386
>Synopsis:       [PATCH] option FAILSAFE is misnamed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 13 08:30:02 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Dag-Erling Smørgrav
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Yes Interactive
>Environment:

FreeBSD 3.2-STABLE and 4.0-CURRENT

>Description:

The FAILSAFE option is misnamed. It is described as follows in LINT:

| # When this is set, be extra conservative in various parts of the kernel
| # and choose functionality over speed (on the widest variety of systems).
| options         FAILSAFE

and in GENERIC:

options         FAILSAFE                #Be conservative

All it actually does is clear the NO_LOCK bit of CCR1 on Cyrix CPUs,
*if* option CPU_CYRIX_NO_LOCK is not defined. If neither FAILSAFE nor
CPU_CYRIX_NO_LOCK is defined, the NO_LOCK bit is left untouched.

>How-To-Repeat:

$ find /usr/src/sys -type f -name '*.[ch]' | xargs grep FAILSAFE

>Fix:
	
Apply the following patch:

Index: sys/alpha/conf/GENERIC
===================================================================
RCS file: /home/ncvs/src/sys/alpha/conf/GENERIC,v
retrieving revision 1.24
diff -u -r1.24 GENERIC
--- GENERIC	1999/06/05 13:29:56	1.24
+++ GENERIC	1999/06/13 15:21:49
@@ -44,7 +44,6 @@
 options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
 options		SCSI_DELAY=15000	#Be pessimistic about Joe SCSI device
 options		UCONSOLE		#Allow users to grab the console
-options		FAILSAFE		#Be conservative
 
 # Platform chipsets
 controller	cia0
Index: sys/alpha/conf/SIMOS
===================================================================
RCS file: /home/ncvs/src/sys/alpha/conf/SIMOS,v
retrieving revision 1.3
diff -u -r1.3 SIMOS
--- SIMOS	1998/09/26 14:49:26	1.3
+++ SIMOS	1999/06/13 15:21:59
@@ -32,7 +32,6 @@
 options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
 options		SCSI_DELAY=100		#Be pessimistic about Joe SCSI device
 options		UCONSOLE		#Allow users to grab the console
-options		FAILSAFE		#Be conservative
 
 config		kernel	root on da0
 
Index: sys/conf/options
===================================================================
RCS file: /home/ncvs/src/sys/conf/options,v
retrieving revision 1.141
diff -u -r1.141 options
--- options	1999/06/05 13:57:07	1.141
+++ options	1999/06/13 15:19:54
@@ -52,7 +52,6 @@
 DDB_UNATTENDED	opt_ddb.h
 GDB_REMOTE_CHAT	opt_ddb.h
 DEVFS
-FAILSAFE
 HW_WDOG
 KTRACE
 MD5
Index: sys/i386/conf/GENERIC
===================================================================
RCS file: /home/ncvs/src/sys/i386/conf/GENERIC,v
retrieving revision 1.172
diff -u -r1.172 GENERIC
--- GENERIC	1999/05/21 04:37:35	1.172
+++ GENERIC	1999/06/13 15:19:34
@@ -38,7 +38,6 @@
 options		COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]
 options		SCSI_DELAY=15000	#Be pessimistic about Joe SCSI device
 options		UCONSOLE		#Allow users to grab the console
-options		FAILSAFE		#Be conservative
 options		USERCONFIG		#boot -c editor
 options		VISUAL_USERCONFIG	#visual boot -c editor
 
Index: sys/i386/conf/LINT
===================================================================
RCS file: /home/ncvs/src/sys/i386/conf/LINT,v
retrieving revision 1.605
diff -u -r1.605 LINT
--- LINT	1999/06/01 18:18:36	1.605
+++ LINT	1999/06/13 15:19:27
@@ -56,10 +56,6 @@
 options		MAXDSIZ="(256*1024*1024)"
 options		DFLDSIZ="(256*1024*1024)"
 
-# When this is set, be extra conservative in various parts of the kernel
-# and choose functionality over speed (on the widest variety of systems).
-options		FAILSAFE
-
 # Options for the VM subsystem
 #options	PQ_NOOPT		# No coloring
 options		PQ_LARGECACHE		# color for 512k/16k cache
@@ -144,8 +140,8 @@
 # mapped mode.  Default is 2-way set associative mode.
 #
 # CPU_CYRIX_NO_LOCK enables weak locking for the entire address space
-# of Cyrix 6x86 and 6x86MX CPUs.  If this option is not set and
-# FAILESAFE is defined, NO_LOCK bit of CCR1 is cleared.  (NOTE 3)
+# of Cyrix 6x86 and 6x86MX CPUs by setting the NO_LOCK bit of CCR1.
+# Otherwise, the NO_LOCK bit of CCR1 is cleared.  (NOTE 3)
 #
 # CPU_DISABLE_5X86_LSSER disables load store serialize (i.e. enables
 # reorder).  This option should not be used if you use memory mapped
Index: sys/i386/conf/options.i386
===================================================================
RCS file: /home/ncvs/src/sys/i386/conf/options.i386,v
retrieving revision 1.116
diff -u -r1.116 options.i386
--- options.i386	1999/06/06 22:45:04	1.116
+++ options.i386	1999/06/13 15:18:12
@@ -43,6 +43,7 @@
 CPU_BLUELIGHTNING_FPU_OP_CACHE	opt_cpu.h
 CPU_BLUELIGHTNING_3X		opt_cpu.h
 CPU_BTB_EN			opt_cpu.h
+CPU_CYRIX_NO_LOCK		opt_cpu.h
 CPU_DIRECT_MAPPED_CACHE		opt_cpu.h
 CPU_DISABLE_5X86_LSSER		opt_cpu.h
 CPU_FASTER_5X86_FPU		opt_cpu.h
Index: sys/i386/i386/initcpu.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/initcpu.c,v
retrieving revision 1.17
diff -u -r1.17 initcpu.c
--- initcpu.c	1999/01/16 13:41:33	1.17
+++ initcpu.c	1999/06/13 15:18:03
@@ -30,7 +30,6 @@
  */
 
 #include "opt_cpu.h"
-#include "opt_failsafe.h"
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -315,10 +314,8 @@
 #ifdef CPU_CYRIX_NO_LOCK
 	write_cyrix_reg(CCR1, read_cyrix_reg(CCR1) | CCR1_NO_LOCK);
 #else
-#ifdef FAILSAFE
 	write_cyrix_reg(CCR1, read_cyrix_reg(CCR1) & ~CCR1_NO_LOCK);
 #endif
-#endif
 
 	/* Initialize CCR2. */
 #ifdef CPU_SUSP_HLT
@@ -398,9 +395,7 @@
 #ifdef CPU_CYRIX_NO_LOCK
 	write_cyrix_reg(CCR1, read_cyrix_reg(CCR1) | CCR1_NO_LOCK);
 #else
-#ifdef FAILSAFE
 	write_cyrix_reg(CCR1, read_cyrix_reg(CCR1) & ~CCR1_NO_LOCK);
-#endif
 #endif
 
 	/* Initialize CCR2. */
Index: sys/pc98/conf/GENERIC98
===================================================================
RCS file: /home/ncvs/src/sys/pc98/conf/GENERIC98,v
retrieving revision 1.75
diff -u -r1.75 GENERIC98
--- GENERIC98	1999/05/10 09:00:28	1.75
+++ GENERIC98	1999/06/13 15:23:57
@@ -44,7 +44,6 @@
 #options		EPSON_MEMWIN		#EPSON memory window support
 options		UCONSOLE		#Allow users to grab the console
 #options		LINE30
-options		FAILSAFE		#Be conservative
 options		USERCONFIG		#boot -c editor
 options		VISUAL_USERCONFIG	#visual boot -c editor
 

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906131528.RAA38003>