Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Mar 2012 04:52:19 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233408 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace mips mips/dtrace mips/sys
Message-ID:  <201203240452.q2O4qJNS012850@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Sat Mar 24 04:52:18 2012
New Revision: 233408
URL: http://svn.freebsd.org/changeset/base/233408

Log:
  Add MIPS support to cddl/contrib part:
  
  - header and stub .c file for fasttrap module. It's not supported on
      MIPS yet, but there is no way to disable support completely
  - Do as amd64 trying to limit allocated memory

Added:
  head/sys/cddl/contrib/opensolaris/uts/mips/
  head/sys/cddl/contrib/opensolaris/uts/mips/dtrace/
  head/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c   (contents, props changed)
  head/sys/cddl/contrib/opensolaris/uts/mips/sys/
  head/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h   (contents, props changed)
Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Sat Mar 24 01:47:33 2012	(r233407)
+++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Sat Mar 24 04:52:18 2012	(r233408)
@@ -235,7 +235,7 @@ static dtrace_dynvar_t	dtrace_dynhash_si
 static struct mtx	dtrace_unr_mtx;
 MTX_SYSINIT(dtrace_unr_mtx, &dtrace_unr_mtx, "Unique resource identifier", MTX_DEF);
 int		dtrace_in_probe;	/* non-zero if executing a probe */
-#if defined(__i386__) || defined(__amd64__)
+#if defined(__i386__) || defined(__amd64__) || defined(__mips__)
 uintptr_t	dtrace_in_probe_addr;	/* Address of invop when already in probe */
 #endif
 #endif
@@ -10659,7 +10659,7 @@ err:
 #else
 	int i;
 
-#if defined(__amd64__)
+#if defined(__amd64__) || defined(__mips__)
 	/*
 	 * FreeBSD isn't good at limiting the amount of memory we
 	 * ask to malloc, so let's place a limit here before trying

Added: head/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c	Sat Mar 24 04:52:18 2012	(r233408)
@@ -0,0 +1,30 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+
+/*
+ *	XXX: Placeholder for MIPS fasttrap code
+ */

Added: head/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h	Sat Mar 24 04:52:18 2012	(r233408)
@@ -0,0 +1,48 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_FASTTRAP_ISA_H
+#define	_FASTTRAP_ISA_H
+
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
+#include <sys/types.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+/*
+ *  XXXDTRACE: placehodler for MIPS fasttrap stuff
+ */
+
+typedef	uint32_t	fasttrap_instr_t;
+#define	FASTTRAP_SUNWDTRACE_SIZE	64
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _FASTTRAP_ISA_H */



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