From owner-svn-src-head@FreeBSD.ORG Sat Mar 24 04:52:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 730841065670; Sat, 24 Mar 2012 04:52:19 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 541E78FC1C; Sat, 24 Mar 2012 04:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2O4qJh9012854; Sat, 24 Mar 2012 04:52:19 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2O4qJNS012850; Sat, 24 Mar 2012 04:52:19 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203240452.q2O4qJNS012850@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 24 Mar 2012 04:52:19 +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: r233408 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace mips mips/dtrace mips/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2012 04:52:19 -0000 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 + +#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 */