svn commit: r257735 - in head/sys: conf mips/cavium

Warner Losh imp at FreeBSD.org
Wed Nov 6 05:26:17 UTC 2013


Author: imp
Date: Wed Nov  6 05:26:15 2013
New Revision: 257735
URL: http://svnweb.freebsd.org/changeset/base/257735

Log:
  Remove the gross hack for the Octeon Simple Executive to the least
  intrusive place for it to be: the octeon std file.
  Fix a comment while I'm here.
  Allow for future architectural specific flags.
  
  Reviewed by:	jmallet@

Modified:
  head/sys/conf/kern.pre.mk
  head/sys/mips/cavium/std.octeon1

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Wed Nov  6 04:38:49 2013	(r257734)
+++ head/sys/conf/kern.pre.mk	Wed Nov  6 05:26:15 2013	(r257735)
@@ -80,16 +80,17 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe
 
 CFLAGS=	${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
 CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
+CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100
+CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000
+.if ${MACHINE_CPUARCH} == "mips"
+CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000
+.endif
 .if ${COMPILER_TYPE} != "clang"
 CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
-.if ${MACHINE_CPUARCH} != "mips"
-CFLAGS+= --param inline-unit-growth=100
-CFLAGS+= --param large-function-growth=1000
-.else
-# XXX Actually a gross hack just for Octeon because of the Simple Executive.
-CFLAGS+= --param inline-unit-growth=10000
-CFLAGS+= --param large-function-growth=100000
-CFLAGS+= --param max-inline-insns-single=10000
+CFLAGS+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH}
+CFLAGS+= --param large-function-growth=${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH}
+.if defined(CFLAGS_ARCH_PARAMS)
+CFLAGS+=${CFLAGS_ARCH_PARAMS}
 .endif
 .endif
 WERROR?= -Werror
@@ -193,7 +194,7 @@ MKMODULESENV+=	WITHOUT_MODULES="${WITHOU
 MKMODULESENV+=	DEBUG_FLAGS="${DEBUG}"
 .endif
 
-# Are various things configured?
+# Detect knerel config options that force stack frames to be turned on.
 DDB_ENABLED!=	grep DDB opt_ddb.h || true ; echo
 DTR_ENABLED!=	grep KDTRACE_FRAME opt_kdtrace.h || true ; echo
 HWPMC_ENABLED!=	grep HWPMC opt_hwpmc_hooks.h || true ; echo

Modified: head/sys/mips/cavium/std.octeon1
==============================================================================
--- head/sys/mips/cavium/std.octeon1	Wed Nov  6 04:38:49 2013	(r257734)
+++ head/sys/mips/cavium/std.octeon1	Wed Nov  6 05:26:15 2013	(r257735)
@@ -3,3 +3,7 @@
 files	"../cavium/files.octeon1"
 machine	mips mips64
 cpu		CPU_CNMIPS
+
+makeoptions CFLAGS_PARAM_INLINE_UNIT_GROWTH=10000
+makeoptions CFLAGS_PARAM_LARGE_FUNCTION_GROWTH=100000
+makeoptions CFLAGS_ARCH_PARAMS="--param max-inline-insns-single=10000"


More information about the svn-src-head mailing list