From owner-svn-src-head@freebsd.org Wed Sep 6 03:19:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E972E0A83F; Wed, 6 Sep 2017 03:19:54 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84D6D7CE3D; Wed, 6 Sep 2017 03:19:54 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v863JrkV013811; Wed, 6 Sep 2017 03:19:53 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v863JqQL013804; Wed, 6 Sep 2017 03:19:52 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201709060319.v863JqQL013804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 6 Sep 2017 03:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323206 - in head/sys: cddl/dev/dtrace/mips cddl/dev/fbt/mips mips/conf modules/dtrace modules/dtrace/dtraceall X-SVN-Group: head X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: in head/sys: cddl/dev/dtrace/mips cddl/dev/fbt/mips mips/conf modules/dtrace modules/dtrace/dtraceall X-SVN-Commit-Revision: 323206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 06 Sep 2017 03:19:55 -0000 Author: lidl Date: Wed Sep 6 03:19:52 2017 New Revision: 323206 URL: https://svnweb.freebsd.org/changeset/base/323206 Log: Enable dtrace support for mips64 and the ERL kernel config Turn on the required options in the ERL config file, and ensure that the fbt module is listed as a dependency for mips in the modules/dtrace/dtraceall/dtraceall.c file. PR: 220346 Reviewed by: gnn, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12227 Modified: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S head/sys/cddl/dev/dtrace/mips/dtrace_subr.c head/sys/cddl/dev/fbt/mips/fbt_isa.c head/sys/mips/conf/ERL head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/dtraceall/Makefile head/sys/modules/dtrace/dtraceall/dtraceall.c Modified: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Wed Sep 6 03:19:52 2017 (r323206) @@ -37,8 +37,6 @@ #include #include -#include "assym.s" - .set noreorder # Noreorder is default style! /* Modified: head/sys/cddl/dev/dtrace/mips/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Wed Sep 6 03:19:52 2017 (r323206) @@ -50,6 +50,8 @@ extern int (*dtrace_invop_jump_addr)(struct trapframe extern dtrace_id_t dtrace_probeid_error; int dtrace_invop(uintptr_t, struct trapframe *, uintptr_t); +void dtrace_invop_init(void); +void dtrace_invop_uninit(void); typedef struct dtrace_invop_hdlr { int (*dtih_func)(uintptr_t, struct trapframe *, uintptr_t); Modified: head/sys/cddl/dev/fbt/mips/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/mips/fbt_isa.c Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/cddl/dev/fbt/mips/fbt_isa.c Wed Sep 6 03:19:52 2017 (r323206) @@ -82,7 +82,6 @@ fbt_provide_module_function(linker_file_t lf, int symi linker_symval_t *symval, void *opaque) { fbt_probe_t *fbt, *retfbt; - uint32_t *target, *start; uint32_t *instr, *limit; const char *name; char *modname; Modified: head/sys/mips/conf/ERL ============================================================================== --- head/sys/mips/conf/ERL Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/mips/conf/ERL Wed Sep 6 03:19:52 2017 (r323206) @@ -86,14 +86,15 @@ options PRINTF_BUFR_SIZE=128 # Prevent printf output options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework -#options KDTRACE_FRAME # Ensure frames are compiled in -#options KDTRACE_HOOKS # Kernel DTrace hooks -options INCLUDE_CONFIG_FILE # Include this file in kernel +options KDTRACE_FRAME # Ensure frames are compiled in +options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # Kernel ELF linker loads CTF data +options INCLUDE_CONFIG_FILE # Include this file in kernel options TMPFS # Temporary file system # Debugging for use in -current #options KDB # Enable kernel debugger support. -#options DDB # Support DDB. +options DDB # Support DDB. #options GDB # Support remote GDB. #options DEADLKRES # Enable the deadlock resolver #options INVARIANTS # Enable calls of extra sanity checking Modified: head/sys/modules/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/Makefile Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/modules/dtrace/Makefile Wed Sep 6 03:19:52 2017 (r323206) @@ -22,11 +22,14 @@ SUBDIR+= systrace_linux32 .if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= fbt fasttrap .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_ARCH} == "mips64" || \ + ${MACHINE_ARCH} == "powerpc64" SUBDIR+= systrace_freebsd32 .endif .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "arm" || \ + ${MACHINE_CPUARCH} == "mips" || \ ${MACHINE_CPUARCH} == "riscv" SUBDIR+= fbt .endif Modified: head/sys/modules/dtrace/dtraceall/Makefile ============================================================================== --- head/sys/modules/dtrace/dtraceall/Makefile Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/modules/dtrace/dtraceall/Makefile Wed Sep 6 03:19:52 2017 (r323206) @@ -8,7 +8,7 @@ SRCS= dtraceall.c opt_compat.h opt_nfs.h CFLAGS+= -I${SYSDIR} .if !defined(KERNBUILDDIR) -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "mips64" opt_compat.h: echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET} .endif Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- head/sys/modules/dtrace/dtraceall/dtraceall.c Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/modules/dtrace/dtraceall/dtraceall.c Wed Sep 6 03:19:52 2017 (r323206) @@ -70,7 +70,8 @@ MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); #endif #if defined(__aarch64__) || defined(__amd64__) || defined(__arm__) || \ - defined(__i386__) || defined(__powerpc__) || defined(__riscv) + defined(__i386__) || defined(__mips__) || \ + defined(__powerpc__) || defined(__riscv) MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); #endif #if defined(__amd64__) || defined(__i386__)