Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Sep 2017 03:19:52 +0000 (UTC)
From:      Kurt Lidl <lidl@FreeBSD.org>
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
Message-ID:  <201709060319.v863JqQL013804@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <machine/cpuregs.h>
 #include <machine/regnum.h>
 
-#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__)



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