svn commit: r303493 - in user/alc/PQ_LAUNDRY: . bin/ps contrib/libcxxrt include include/xlocale lib/libc/gen lib/libc/net lib/libc/sys share/man/man4 share/man/man5 share/man/man9 share/mk share/ti...
Alan Cox
alc at FreeBSD.org
Fri Jul 29 17:12:35 UTC 2016
Author: alc
Date: Fri Jul 29 17:12:31 2016
New Revision: 303493
URL: https://svnweb.freebsd.org/changeset/base/303493
Log:
MFH r303468
Added:
user/alc/PQ_LAUNDRY/sys/dev/usb/controller/generic_ehci.c
- copied unchanged from r303492, head/sys/dev/usb/controller/generic_ehci.c
user/alc/PQ_LAUNDRY/sys/netinet/in_prot.c
- copied unchanged from r303492, head/sys/netinet/in_prot.c
Modified:
user/alc/PQ_LAUNDRY/MAINTAINERS (contents, props changed)
user/alc/PQ_LAUNDRY/ObsoleteFiles.inc
user/alc/PQ_LAUNDRY/bin/ps/ps.1
user/alc/PQ_LAUNDRY/contrib/libcxxrt/libelftc_dem_gnu3.c
user/alc/PQ_LAUNDRY/include/libgen.h
user/alc/PQ_LAUNDRY/include/netdb.h
user/alc/PQ_LAUNDRY/include/stdlib.h
user/alc/PQ_LAUNDRY/include/xlocale/_stdlib.h
user/alc/PQ_LAUNDRY/lib/libc/gen/basename.3
user/alc/PQ_LAUNDRY/lib/libc/gen/basename.c
user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3
user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c
user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.3
user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.c
user/alc/PQ_LAUNDRY/lib/libc/sys/msgrcv.2
user/alc/PQ_LAUNDRY/lib/libc/sys/ptrace.2
user/alc/PQ_LAUNDRY/share/man/man4/ntb_hw.4
user/alc/PQ_LAUNDRY/share/man/man5/src.conf.5
user/alc/PQ_LAUNDRY/share/man/man9/Makefile
user/alc/PQ_LAUNDRY/share/man/man9/timeout.9
user/alc/PQ_LAUNDRY/share/mk/bsd.sys.mk
user/alc/PQ_LAUNDRY/share/timedef/ko_KR.UTF-8.src
user/alc/PQ_LAUNDRY/share/timedef/ko_KR.eucKR.src
user/alc/PQ_LAUNDRY/sys/amd64/linux/Makefile
user/alc/PQ_LAUNDRY/sys/amd64/linux32/Makefile
user/alc/PQ_LAUNDRY/sys/arm/altera/socfpga/files.socfpga
user/alc/PQ_LAUNDRY/sys/arm/ti/files.ti
user/alc/PQ_LAUNDRY/sys/arm64/conf/GENERIC
user/alc/PQ_LAUNDRY/sys/cam/ata/ata_xpt.c
user/alc/PQ_LAUNDRY/sys/cam/cam_xpt.c
user/alc/PQ_LAUNDRY/sys/cam/cam_xpt_internal.h
user/alc/PQ_LAUNDRY/sys/cam/nvme/nvme_xpt.c
user/alc/PQ_LAUNDRY/sys/cam/scsi/scsi_xpt.c
user/alc/PQ_LAUNDRY/sys/cddl/dev/fbt/riscv/fbt_isa.c
user/alc/PQ_LAUNDRY/sys/compat/freebsd32/Makefile
user/alc/PQ_LAUNDRY/sys/compat/svr4/Makefile
user/alc/PQ_LAUNDRY/sys/conf/files
user/alc/PQ_LAUNDRY/sys/conf/files.arm64
user/alc/PQ_LAUNDRY/sys/conf/kern.mk
user/alc/PQ_LAUNDRY/sys/conf/ldscript.amd64
user/alc/PQ_LAUNDRY/sys/conf/ldscript.arm
user/alc/PQ_LAUNDRY/sys/conf/ldscript.arm64
user/alc/PQ_LAUNDRY/sys/conf/ldscript.i386
user/alc/PQ_LAUNDRY/sys/conf/ldscript.mips
user/alc/PQ_LAUNDRY/sys/conf/ldscript.mips.cfe
user/alc/PQ_LAUNDRY/sys/conf/ldscript.mips.mips64
user/alc/PQ_LAUNDRY/sys/conf/ldscript.mips.octeon1
user/alc/PQ_LAUNDRY/sys/conf/ldscript.powerpc
user/alc/PQ_LAUNDRY/sys/conf/ldscript.powerpc64
user/alc/PQ_LAUNDRY/sys/conf/ldscript.riscv
user/alc/PQ_LAUNDRY/sys/conf/ldscript.sparc64
user/alc/PQ_LAUNDRY/sys/ddb/db_ps.c
user/alc/PQ_LAUNDRY/sys/dev/cxgbe/offload.h
user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_main.c
user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c
user/alc/PQ_LAUNDRY/sys/dev/cxgbe/tom/t4_cpl_io.c
user/alc/PQ_LAUNDRY/sys/dev/cxgbe/tom/t4_tom.c
user/alc/PQ_LAUNDRY/sys/dev/cxgbe/tom/t4_tom.h
user/alc/PQ_LAUNDRY/sys/dev/hyperv/include/hyperv.h
user/alc/PQ_LAUNDRY/sys/dev/hyperv/include/hyperv_busdma.h
user/alc/PQ_LAUNDRY/sys/dev/hyperv/include/vmbus.h
user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h
user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_heartbeat.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_shutdown.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_timesync.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/hyperv.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_br.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_chan.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_chanvar.h
user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_et.c
user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_var.h
user/alc/PQ_LAUNDRY/sys/dev/iwm/if_iwm.c
user/alc/PQ_LAUNDRY/sys/dev/iwm/if_iwmreg.h
user/alc/PQ_LAUNDRY/sys/dev/ntb/ntb.c
user/alc/PQ_LAUNDRY/sys/dev/ntb/ntb.h
user/alc/PQ_LAUNDRY/sys/dev/ntb/ntb_hw/ntb_hw.c
user/alc/PQ_LAUNDRY/sys/dev/ntb/ntb_if.m
user/alc/PQ_LAUNDRY/sys/dev/ntb/ntb_transport.c
user/alc/PQ_LAUNDRY/sys/dev/nvme/nvme_sim.c
user/alc/PQ_LAUNDRY/sys/dev/usb/template/usb_template_mtp.c
user/alc/PQ_LAUNDRY/sys/dev/usb/usb_device.c
user/alc/PQ_LAUNDRY/sys/dev/xen/netfront/netfront.c
user/alc/PQ_LAUNDRY/sys/fs/autofs/autofs_vnops.c
user/alc/PQ_LAUNDRY/sys/i386/ibcs2/Makefile
user/alc/PQ_LAUNDRY/sys/i386/linux/Makefile
user/alc/PQ_LAUNDRY/sys/kern/Makefile
user/alc/PQ_LAUNDRY/sys/kern/init_sysent.c
user/alc/PQ_LAUNDRY/sys/kern/kern_exit.c
user/alc/PQ_LAUNDRY/sys/kern/kern_fork.c
user/alc/PQ_LAUNDRY/sys/kern/kern_prot.c
user/alc/PQ_LAUNDRY/sys/kern/kern_sig.c
user/alc/PQ_LAUNDRY/sys/kern/kern_thread.c
user/alc/PQ_LAUNDRY/sys/kern/kern_timeout.c
user/alc/PQ_LAUNDRY/sys/kern/subr_sleepqueue.c
user/alc/PQ_LAUNDRY/sys/kern/sys_process.c
user/alc/PQ_LAUNDRY/sys/kern/syscalls.c
user/alc/PQ_LAUNDRY/sys/kern/syscalls.master
user/alc/PQ_LAUNDRY/sys/kern/systrace_args.c
user/alc/PQ_LAUNDRY/sys/kern/vfs_aio.c
user/alc/PQ_LAUNDRY/sys/modules/Makefile
user/alc/PQ_LAUNDRY/sys/modules/dtrace/Makefile
user/alc/PQ_LAUNDRY/sys/modules/dtrace/dtrace/Makefile
user/alc/PQ_LAUNDRY/sys/modules/dtrace/dtraceall/dtraceall.c
user/alc/PQ_LAUNDRY/sys/modules/hyperv/vmbus/Makefile
user/alc/PQ_LAUNDRY/sys/modules/i2c/iicbb/Makefile
user/alc/PQ_LAUNDRY/sys/modules/ixl/Makefile
user/alc/PQ_LAUNDRY/sys/modules/ixlv/Makefile
user/alc/PQ_LAUNDRY/sys/modules/linux64/Makefile
user/alc/PQ_LAUNDRY/sys/modules/mlx5/Makefile
user/alc/PQ_LAUNDRY/sys/modules/uart/Makefile
user/alc/PQ_LAUNDRY/sys/netinet/in_systm.h
user/alc/PQ_LAUNDRY/sys/netinet/tcp_subr.c
user/alc/PQ_LAUNDRY/sys/netinet6/ip6_forward.c
user/alc/PQ_LAUNDRY/sys/sys/callout.h
user/alc/PQ_LAUNDRY/sys/sys/msg.h
user/alc/PQ_LAUNDRY/sys/sys/proc.h
user/alc/PQ_LAUNDRY/sys/sys/syscall.h
user/alc/PQ_LAUNDRY/sys/sys/syscall.mk
user/alc/PQ_LAUNDRY/sys/sys/sysproto.h
user/alc/PQ_LAUNDRY/sys/sys/systm.h
user/alc/PQ_LAUNDRY/sys/vm/swap_pager.c
user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c
user/alc/PQ_LAUNDRY/sys/x86/x86/intr_machdep.c
user/alc/PQ_LAUNDRY/sys/x86/xen/xen_intr.c
user/alc/PQ_LAUNDRY/tools/tools/locale/tools/cldr2def.pl
user/alc/PQ_LAUNDRY/usr.bin/grep/util.c
user/alc/PQ_LAUNDRY/usr.bin/indent/indent.c
user/alc/PQ_LAUNDRY/usr.bin/indent/indent_globs.h
user/alc/PQ_LAUNDRY/usr.bin/indent/io.c
user/alc/PQ_LAUNDRY/usr.bin/indent/lexi.c
user/alc/PQ_LAUNDRY/usr.bin/sed/main.c
user/alc/PQ_LAUNDRY/usr.bin/xinstall/xinstall.c
user/alc/PQ_LAUNDRY/usr.sbin/Makefile
user/alc/PQ_LAUNDRY/usr.sbin/newsyslog/newsyslog.c
user/alc/PQ_LAUNDRY/usr.sbin/pmcstudy/pmcstudy.c
user/alc/PQ_LAUNDRY/usr.sbin/uathload/uathload.c
Directory Properties:
user/alc/PQ_LAUNDRY/ (props changed)
user/alc/PQ_LAUNDRY/contrib/libcxxrt/ (props changed)
Modified: user/alc/PQ_LAUNDRY/MAINTAINERS
==============================================================================
--- user/alc/PQ_LAUNDRY/MAINTAINERS Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/MAINTAINERS Fri Jul 29 17:12:31 2016 (r303493)
@@ -37,7 +37,6 @@ subsystem login notes
-----------------------------
atf freebsd-testing,jmmv,ngie Pre-commit review requested.
ath(4) adrian Pre-commit review requested, send to freebsd-wireless at freebsd.org
-callout_*(9) rrs Pre-commit review requested -- becareful its tricksy code :o.
contrib/compiler-rt dim Pre-commit review preferred.
contrib/libc++ dim Pre-commit review preferred.
contrib/libcxxrt dim Pre-commit review preferred.
Modified: user/alc/PQ_LAUNDRY/ObsoleteFiles.inc
==============================================================================
--- user/alc/PQ_LAUNDRY/ObsoleteFiles.inc Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/ObsoleteFiles.inc Fri Jul 29 17:12:31 2016 (r303493)
@@ -229,6 +229,7 @@ OLD_LIBS+=usr/lib/libdevinfo.so.5
OLD_LIBS+=usr/lib32/libdevinfo.so.5
# 20160305: new clang import which bumps version from 3.7.1 to 3.8.0.
OLD_FILES+=usr/bin/macho-dump
+OLD_FILES+=usr/bin/tblgen
OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h
OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/asan_interface.h
OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/common_interface_defs.h
Modified: user/alc/PQ_LAUNDRY/bin/ps/ps.1
==============================================================================
--- user/alc/PQ_LAUNDRY/bin/ps/ps.1 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/bin/ps/ps.1 Fri Jul 29 17:12:31 2016 (r303493)
@@ -29,7 +29,7 @@
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd December 1, 2015
+.Dd July 28, 2016
.Dt PS 1
.Os
.Sh NAME
@@ -360,6 +360,7 @@ the include file
.It Dv "P2_NOTRACE" Ta No "0x00000002" Ta "No ptrace(2) attach or coredumps"
.It Dv "P2_NOTRACE_EXEC" Ta No "0x00000004" Ta "Keep P2_NOPTRACE on exec(2)"
.It Dv "P2_AST_SU" Ta No "0x00000008" Ta "Handles SU ast for kthreads"
+.It Dv "P2_PTRACE_FSTP" Ta No "0x00000010" Ta "SIGSTOP from PT_ATTACH not yet handled"
.El
.It Cm label
The MAC label of the process.
Modified: user/alc/PQ_LAUNDRY/contrib/libcxxrt/libelftc_dem_gnu3.c
==============================================================================
--- user/alc/PQ_LAUNDRY/contrib/libcxxrt/libelftc_dem_gnu3.c Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/contrib/libcxxrt/libelftc_dem_gnu3.c Fri Jul 29 17:12:31 2016 (r303493)
@@ -2842,7 +2842,7 @@ again:
case 'w':
/* wchar_t */
- if (!cpp_demangle_push_str(ddata, "wchar_t", 6))
+ if (!cpp_demangle_push_str(ddata, "wchar_t", 7))
goto clean;
++ddata->cur;
goto rtn;
Modified: user/alc/PQ_LAUNDRY/include/libgen.h
==============================================================================
--- user/alc/PQ_LAUNDRY/include/libgen.h Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/include/libgen.h Fri Jul 29 17:12:31 2016 (r303493)
@@ -34,9 +34,9 @@
#include <sys/cdefs.h>
__BEGIN_DECLS
-char *basename(const char *);
+char *basename(char *);
char *basename_r(const char *, char *);
-char *dirname(const char *);
+char *dirname(char *);
__END_DECLS
#endif /* !_LIBGEN_H_ */
Modified: user/alc/PQ_LAUNDRY/include/netdb.h
==============================================================================
--- user/alc/PQ_LAUNDRY/include/netdb.h Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/include/netdb.h Fri Jul 29 17:12:31 2016 (r303493)
@@ -214,9 +214,7 @@ struct addrinfo {
#define NI_NAMEREQD 0x00000004
#define NI_NUMERICSERV 0x00000008
#define NI_DGRAM 0x00000010
-#if 0 /* obsolete */
-#define NI_WITHSCOPEID 0x00000020
-#endif
+#define NI_NUMERICSCOPE 0x00000020
/*
* Scope delimit character
Modified: user/alc/PQ_LAUNDRY/include/stdlib.h
==============================================================================
--- user/alc/PQ_LAUNDRY/include/stdlib.h Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/include/stdlib.h Fri Jul 29 17:12:31 2016 (r303493)
@@ -77,7 +77,7 @@ __BEGIN_DECLS
#endif
extern int __mb_cur_max;
extern int ___mb_cur_max(void);
-#define MB_CUR_MAX (___mb_cur_max())
+#define MB_CUR_MAX ((size_t)___mb_cur_max())
_Noreturn void abort(void);
int abs(int) __pure2;
Modified: user/alc/PQ_LAUNDRY/include/xlocale/_stdlib.h
==============================================================================
--- user/alc/PQ_LAUNDRY/include/xlocale/_stdlib.h Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/include/xlocale/_stdlib.h Fri Jul 29 17:12:31 2016 (r303493)
@@ -55,5 +55,5 @@ size_t wcstombs_l(char * __restrict,
int wctomb_l(char *, wchar_t, locale_t);
int ___mb_cur_max_l(locale_t);
-#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x))
+#define MB_CUR_MAX_L(x) ((size_t)___mb_cur_max_l(x))
Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/basename.3
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/gen/basename.3 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/gen/basename.3 Fri Jul 29 17:12:31 2016 (r303493)
@@ -16,7 +16,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 31, 2010
+.Dd July 29, 2016
.Dt BASENAME 3
.Os
.Sh NAME
@@ -25,7 +25,7 @@
.Sh SYNOPSIS
.In libgen.h
.Ft char *
-.Fn basename "const char *path"
+.Fn basename "char *path"
.Ft char *
.Fn basename_r "const char *path" "char *bname"
.Sh DESCRIPTION
@@ -61,8 +61,16 @@ function
returns a pointer to internal storage space allocated on the first call
that will be overwritten
by subsequent calls.
+.Pp
+Other vendor implementations of
+.Fn basename
+may store their result in the input buffer,
+making it safe to use in multithreaded applications.
+Future versions of
+.Fx
+will follow this approach as well.
.Fn basename_r
-is therefore preferred for threaded applications.
+will then become obsolete.
.Sh RETURN VALUES
On successful completion,
.Fn basename
Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/basename.c
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/gen/basename.c Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/gen/basename.c Fri Jul 29 17:12:31 2016 (r303493)
@@ -66,7 +66,7 @@ basename_r(const char *path, char *bname
}
char *
-basename(const char *path)
+basename(char *path)
{
static char *bname = NULL;
Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3 Fri Jul 29 17:12:31 2016 (r303493)
@@ -16,7 +16,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 12, 2006
+.Dd July 29, 2016
.Dt DIRNAME 3
.Os
.Sh NAME
@@ -25,7 +25,7 @@
.Sh SYNOPSIS
.In libgen.h
.Ft char *
-.Fn dirname "const char *path"
+.Fn dirname "char *path"
.Sh DESCRIPTION
The
.Fn dirname
@@ -56,10 +56,11 @@ by subsequent calls.
.Pp
Other vendor implementations of
.Fn dirname
-may modify the contents of the string passed to
-.Fn dirname ;
-this should be taken into account when writing code which calls this function
-if portability is desired.
+may store their result in the input buffer,
+making it safe to use in multithreaded applications.
+Future versions of
+.Fx
+will follow this approach as well.
.Sh RETURN VALUES
On successful completion,
.Fn dirname
Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c Fri Jul 29 17:12:31 2016 (r303493)
@@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
char *
-dirname(const char *path)
+dirname(char *path)
{
static char *dname = NULL;
size_t len;
Modified: user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.3
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.3 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.3 Fri Jul 29 17:12:31 2016 (r303493)
@@ -18,7 +18,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 20, 2015
+.Dd July 28, 2016
.Dt GETNAMEINFO 3
.Os
.Sh NAME
@@ -111,7 +111,7 @@ The
argument is formed by
.Tn OR Ns 'ing
the following values:
-.Bl -tag -width "NI_NUMERICHOSTXX"
+.Bl -tag -width "NI_NUMERICSCOPEXX"
.It Dv NI_NOFQDN
A fully qualified domain name is not required for local hosts.
The local part of the fully qualified domain name is returned instead.
@@ -127,6 +127,8 @@ If the host name is not found and the fl
address is returned in numeric form.
.It NI_NUMERICSERV
The service name is returned as a digit string representing the port number.
+.It NI_NUMERICSCOPE
+The scope identifier is returned as a digit string.
.It NI_DGRAM
Specifies that the service being looked up is a datagram
service, and causes
Modified: user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.c
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.c Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/net/getnameinfo.c Fri Jul 29 17:12:31 2016 (r303493)
@@ -378,7 +378,6 @@ ip6_sa2str(const struct sockaddr_in6 *sa
ifindex = (unsigned int)sa6->sin6_scope_id;
a6 = &sa6->sin6_addr;
-#ifdef NI_NUMERICSCOPE
if ((flags & NI_NUMERICSCOPE) != 0) {
n = snprintf(buf, bufsiz, "%u", sa6->sin6_scope_id);
if (n < 0 || n >= bufsiz)
@@ -386,7 +385,6 @@ ip6_sa2str(const struct sockaddr_in6 *sa
else
return n;
}
-#endif
/* if_indextoname() does not take buffer size. not a good api... */
if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) ||
Modified: user/alc/PQ_LAUNDRY/lib/libc/sys/msgrcv.2
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/sys/msgrcv.2 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/sys/msgrcv.2 Fri Jul 29 17:12:31 2016 (r303493)
@@ -31,7 +31,7 @@
.\" $FreeBSD$
.\"
.\"/
-.Dd July 9, 2009
+.Dd July 28, 2016
.Dt MSGRCV 2
.Os
.Sh NAME
@@ -43,7 +43,7 @@
.In sys/types.h
.In sys/ipc.h
.In sys/msg.h
-.Ft int
+.Ft ssize_t
.Fn msgrcv "int msqid" "void *msgp" "size_t msgsz" "long msgtyp" "int msgflg"
.Sh DESCRIPTION
The
Modified: user/alc/PQ_LAUNDRY/lib/libc/sys/ptrace.2
==============================================================================
--- user/alc/PQ_LAUNDRY/lib/libc/sys/ptrace.2 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/lib/libc/sys/ptrace.2 Fri Jul 29 17:12:31 2016 (r303493)
@@ -2,7 +2,7 @@
.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
.\"
.\" This file is in the public domain.
-.Dd July 18, 2016
+.Dd July 28, 2016
.Dt PTRACE 2
.Os
.Sh NAME
@@ -74,11 +74,15 @@ A traced process may report additional s
events in the traced process.
These additional signal stops are reported as
.Dv SIGTRAP
+or
+.Dv SIGSTOP
signals.
The tracing process can use the
.Dv PT_LWPINFO
request to determine which events are associated with a
.Dv SIGTRAP
+or
+.Dv SIGSTOP
signal.
Note that multiple events may be associated with a single signal.
For example, events indicated by the
@@ -88,10 +92,16 @@ and
.Dv PL_FLAG_EXEC
flags are also reported as a system call exit event
.Pq Dv PL_FLAG_SCX .
+The signal stop for a new child process enabled via
+.Dv PTRACE_FORK
+will report a
+.Dv SIGSTOP
+signal.
+All other additional signal stops use
+.Dv SIGTRAP .
.Pp
Each traced process has a tracing event mask.
An event in the traced process only reports a
-.Dv SIGTRAP
signal stop if the corresponding flag is set in the tracing event mask.
The current set of tracing event flags include:
.Bl -tag -width ".Dv PTRACE_SYSCALL"
Modified: user/alc/PQ_LAUNDRY/share/man/man4/ntb_hw.4
==============================================================================
--- user/alc/PQ_LAUNDRY/share/man/man4/ntb_hw.4 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/share/man/man4/ntb_hw.4 Fri Jul 29 17:12:31 2016 (r303493)
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 10, 2016
+.Dd July 28, 2016
.Dt NTB_HW 4
.Os
.Sh NAME
@@ -51,6 +51,20 @@ The following tunables are settable from
.It Va hw.ntb.debug_level
Driver debug level.
The default value is 0, higher means more verbose.
+.It Va hint.ntb_hw. Ns Ar X Ns Va .config
+Configures NTB resources split between several consumer devices.
+Configuration of multiple consumer devices separated by commas.
+Each device can be configured as: "<name>[:<mw>[:<spad>[:<db>]]]", where:
+.Va name
+is a name of the driver which should attach the device (empty means any),
+.Va mw
+is a number of memory windows to allocate (empty means all available),
+.Va spad
+is a number of scratchpad registers to allocate (empty means all available),
+.Va db
+is a number of doorbells to allocate (empty means all available).
+The default configuration is empty string, which means single device
+with all available resources allowing any driver attachment.
.El
.Sh DESCRIPTION
The NTB allows you to connect two computer systems using a PCIe link if they
@@ -69,7 +83,7 @@ The hardware provides 2-3 memory windows
On Xeon processors one of memory windows is typically consumed by the driver
to workaround multiple hardware erratas.
.Sh CONFIGURATION
-Tne NTB configuration should be set by BIOS.
+The NTB configuration should be set by BIOS.
It includes enabling NTB, choosing between NTB-to-NTB or NTB-to-Root Port mode,
enabling split BAR mode (one of two 64-bit BARs can be split into two 32-bit
ones) and configuring BAR sizes in bits (from 12 to 29/39) for both NTB sides.
Modified: user/alc/PQ_LAUNDRY/share/man/man5/src.conf.5
==============================================================================
--- user/alc/PQ_LAUNDRY/share/man/man5/src.conf.5 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/share/man/man5/src.conf.5 Fri Jul 29 17:12:31 2016 (r303493)
@@ -1,7 +1,7 @@
.\" DO NOT EDIT-- this file is automatically generated.
.\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery
.\" $FreeBSD$
-.Dd June 28, 2016
+.Dd July 28, 2016
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -1002,13 +1002,13 @@ amd64/amd64 and arm64/aarch64.
Set to use GCC's stack unwinder (instead of LLVM's libunwind).
.Pp
It is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
+arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
.It Va WITH_LLVM_LIBUNWIND
.\" from FreeBSD: head/tools/build/options/WITH_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste
Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder).
.Pp
It is a default setting on
-arm64/aarch64.
+amd64/amd64, arm64/aarch64, i386/i386 and pc98/i386.
.It Va WITHOUT_LOCALES
.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru
Set to not build localization files; see
Modified: user/alc/PQ_LAUNDRY/share/man/man9/Makefile
==============================================================================
--- user/alc/PQ_LAUNDRY/share/man/man9/Makefile Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/share/man/man9/Makefile Fri Jul 29 17:12:31 2016 (r303493)
@@ -1766,6 +1766,7 @@ MLINKS+=timeout.9 callout.9 \
timeout.9 callout_schedule_sbt_curcpu.9 \
timeout.9 callout_schedule_sbt_on.9 \
timeout.9 callout_stop.9 \
+ timeout.9 callout_when.9 \
timeout.9 untimeout.9
MLINKS+=ucred.9 cred_update_thread.9 \
ucred.9 crcopy.9 \
Modified: user/alc/PQ_LAUNDRY/share/man/man9/timeout.9
==============================================================================
--- user/alc/PQ_LAUNDRY/share/man/man9/timeout.9 Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/share/man/man9/timeout.9 Fri Jul 29 17:12:31 2016 (r303493)
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 4, 2016
+.Dd July 27, 2016
.Dt TIMEOUT 9
.Os
.Sh NAME
@@ -56,6 +56,7 @@
.Nm callout_schedule_sbt_curcpu ,
.Nm callout_schedule_sbt_on ,
.Nm callout_stop ,
+.Nm callout_when ,
.Nm timeout ,
.Nm untimeout
.Nd execute a function after a specified length of time
@@ -91,20 +92,48 @@ struct callout_handle handle = CALLOUT_H
.Ft int
.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg"
.Ft int
-.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \
-"void *arg"
-.Ft int
-.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \
-"void *arg" "int cpu"
-.Ft int
-.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \
-"sbintime_t pr" "timeout_t *func" "void *arg" "int flags"
-.Ft int
-.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \
-"sbintime_t pr" "timeout_t *func" "void *arg" "int flags"
-.Ft int
-.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \
-"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags"
+.Fo callout_reset_curcpu
+.Fa "struct callout *c"
+.Fa "int ticks"
+.Fa "timeout_t *func"
+.Fa "void *arg"
+.Fc
+.Ft int
+.Fo callout_reset_on
+.Fa "struct callout *c"
+.Fa "int ticks"
+.Fa "timeout_t *func"
+.Fa "void *arg"
+.Fa "int cpu"
+.Fc
+.Ft int
+.Fo callout_reset_sbt
+.Fa "struct callout *c"
+.Fa "sbintime_t sbt"
+.Fa "sbintime_t pr"
+.Fa "timeout_t *func"
+.Fa "void *arg"
+.Fa "int flags"
+.Fc
+.Ft int
+.Fo callout_reset_sbt_curcpu
+.Fa "struct callout *c"
+.Fa "sbintime_t sbt"
+.Fa "sbintime_t pr"
+.Fa "timeout_t *func"
+.Fa "void *arg"
+.Fa "int flags"
+.Fc
+.Ft int
+.Fo callout_reset_sbt_on
+.Fa "struct callout *c"
+.Fa "sbintime_t sbt"
+.Fa "sbintime_t pr"
+.Fa "timeout_t *func"
+.Fa "void *arg"
+.Fa "int cpu"
+.Fa "int flags"
+.Fc
.Ft int
.Fn callout_schedule "struct callout *c" "int ticks"
.Ft int
@@ -112,16 +141,37 @@ struct callout_handle handle = CALLOUT_H
.Ft int
.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu"
.Ft int
-.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \
-"sbintime_t pr" "int flags"
-.Ft int
-.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \
-"sbintime_t pr" "int flags"
-.Ft int
-.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \
-"sbintime_t pr" "int cpu" "int flags"
+.Fo callout_schedule_sbt
+.Fa "struct callout *c"
+.Fa "sbintime_t sbt"
+.Fa "sbintime_t pr"
+.Fa "int flags"
+.Fc
+.Ft int
+.Fo callout_schedule_sbt_curcpu
+.Fa "struct callout *c"
+.Fa "sbintime_t sbt"
+.Fa "sbintime_t pr"
+.Fa "int flags"
+.Fc
+.Ft int
+.Fo callout_schedule_sbt_on
+.Fa "struct callout *c"
+.Fa "sbintime_t sbt"
+.Fa "sbintime_t pr"
+.Fa "int cpu"
+.Fa "int flags"
+.Fc
.Ft int
.Fn callout_stop "struct callout *c"
+.Ft sbintime_t
+.Fo callout_when
+.Fa "sbintime_t sbt"
+.Fa "sbintime_t precision"
+.Fa "int flags"
+.Fa "sbintime_t *sbt_res"
+.Fa "sbintime_t *precision_res"
+.Fc
.Ft struct callout_handle
.Fn timeout "timeout_t *func" "void *arg" "int ticks"
.Ft void
@@ -387,6 +437,26 @@ or this value is used as the length of t
Smaller values
.Pq which result in larger time intervals
allow the callout subsystem to aggregate more events in one timer interrupt.
+.It Dv C_PRECALC
+The
+.Fa sbt
+argument specifies the absolute time at which the callout should be run,
+and the
+.Fa pr
+argument specifies the requested precision, which will not be
+adjusted during the scheduling process.
+The
+.Fa sbt
+and
+.Fa pr
+values should be calculated by an earlier call to
+.Fn callout_when
+which uses the user-supplied
+.Fa sbt ,
+.Fa pr ,
+and
+.Fa flags
+values.
.It Dv C_HARDCLOCK
Align the timeouts to
.Fn hardclock
@@ -503,6 +573,39 @@ but it
.Em does not
clear it when a callout expires normally via the execution of the
callout function.
+.Pp
+The
+.Fn callout_when
+function may be used to pre-calculate the absolute time at which the
+timeout should be run and the precision of the scheduled run time
+according to the required time
+.Fa sbt ,
+precision
+.Fa precision ,
+and additional adjustments requested by the
+.Fa flags
+argument.
+Flags accepted by the
+.Fn callout_when
+function are the same as flags for the
+.Fn callout_reset
+function.
+The resulting time is assigned to the variable pointed to by the
+.Fa sbt_res
+argument, and the resulting precision is assigned to
+.Fa *precision_res .
+When passing the results to
+.Fa callout_reset ,
+add the
+.Va C_PRECALC
+flag to
+.Fa flags ,
+to avoid incorrect re-adjustment.
+The function is intended for situations where precise time of the callout
+run should be known in advance, since
+trying to read this time from the callout structure itself after a
+.Fn callout_reset
+call is racy.
.Ss "Avoiding Race Conditions"
The callout subsystem invokes callout functions from its own thread
context.
Modified: user/alc/PQ_LAUNDRY/share/mk/bsd.sys.mk
==============================================================================
--- user/alc/PQ_LAUNDRY/share/mk/bsd.sys.mk Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/share/mk/bsd.sys.mk Fri Jul 29 17:12:31 2016 (r303493)
@@ -190,7 +190,7 @@ CFLAGS+= ${SSP_CFLAGS}
# Allow user-specified additional warning flags, plus compiler and file
# specific flag overrides, unless we've overriden this...
.if ${MK_WARNS} != "no"
-CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}}
+CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}}
CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
.endif
Modified: user/alc/PQ_LAUNDRY/share/timedef/ko_KR.UTF-8.src
==============================================================================
--- user/alc/PQ_LAUNDRY/share/timedef/ko_KR.UTF-8.src Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/share/timedef/ko_KR.UTF-8.src Fri Jul 29 17:12:31 2016 (r303493)
@@ -56,14 +56,14 @@
%y. %m. %e.
#
# c_fmt
-%Yë
%mì %eì¼ %p %Iì %Më¶ %Sì´
+%Yë
%mì %eì¼ %A %p %Iì %Më¶ %Sì´
#
# AM/PM
ì¤ì
ì¤í
#
# date_fmt
-%Yë
%mì %eì¼ %p %Iì %Më¶ %Sì´ %Z
+%Yë
%mì %eì¼ %A %p %Iì %Më¶ %Sì´ %Z
#
# Long month names (without case ending)
1ì
Modified: user/alc/PQ_LAUNDRY/share/timedef/ko_KR.eucKR.src
==============================================================================
--- user/alc/PQ_LAUNDRY/share/timedef/ko_KR.eucKR.src Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/share/timedef/ko_KR.eucKR.src Fri Jul 29 17:12:31 2016 (r303493)
@@ -56,14 +56,14 @@
%y. %m. %e.
#
# c_fmt
-%Y³â %m¿ù %eÀÏ %p %I½Ã %MºÐ %SÃÊ
+%Y³â %m¿ù %eÀÏ %A %p %I½Ã %MºÐ %SÃÊ
#
# AM/PM
¿ÀÀü
¿ÀÈÄ
#
# date_fmt
-%Y³â %m¿ù %eÀÏ %p %I½Ã %MºÐ %SÃÊ %Z
+%Y³â %m¿ù %eÀÏ %A %p %I½Ã %MºÐ %SÃÊ %Z
#
# Long month names (without case ending)
1¿ù
Modified: user/alc/PQ_LAUNDRY/sys/amd64/linux/Makefile
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/amd64/linux/Makefile Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/sys/amd64/linux/Makefile Fri Jul 29 17:12:31 2016 (r303493)
@@ -9,9 +9,4 @@ sysent: linux_sysent.c linux_syscall.h
linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \
../../kern/makesyscalls.sh syscalls.master syscalls.conf
- -mv -f linux_sysent.c linux_sysent.c.bak
- -mv -f linux_syscall.h linux_syscall.h.bak
- -mv -f linux_proto.h linux_proto.h.bak
- -mv -f linux_syscalls.c linux_syscalls.c.bak
- -mv -f linux_systrace_args.c linux_systrace_args.c.bak
sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf
Modified: user/alc/PQ_LAUNDRY/sys/amd64/linux32/Makefile
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/amd64/linux32/Makefile Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/sys/amd64/linux32/Makefile Fri Jul 29 17:12:31 2016 (r303493)
@@ -9,9 +9,4 @@ sysent: linux32_sysent.c linux32_syscal
linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../kern/makesyscalls.sh \
syscalls.master syscalls.conf
- -mv -f linux32_sysent.c linux32_sysent.c.bak
- -mv -f linux32_syscall.h linux32_syscall.h.bak
- -mv -f linux32_proto.h linux32_proto.h.bak
- -mv -f linux32_syscalls.c linux32_syscalls.c.bak
- -mv -f linux32_systrace_args.c linux32_systrace_args.c.bak
sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf
Modified: user/alc/PQ_LAUNDRY/sys/arm/altera/socfpga/files.socfpga
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/arm/altera/socfpga/files.socfpga Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/sys/arm/altera/socfpga/files.socfpga Fri Jul 29 17:12:31 2016 (r303493)
@@ -9,7 +9,6 @@ arm/altera/socfpga/socfpga_rstmgr.c sta
arm/altera/socfpga/socfpga_mp.c optional smp
arm/altera/socfpga/socfpga_gpio.c optional gpio
-dev/mii/micphy.c optional micphy
dev/mmc/host/dwmmc.c optional dwmmc
# BERI specific
Modified: user/alc/PQ_LAUNDRY/sys/arm/ti/files.ti
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/arm/ti/files.ti Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/sys/arm/ti/files.ti Fri Jul 29 17:12:31 2016 (r303493)
@@ -20,7 +20,6 @@ arm/ti/ti_i2c.c optional ti_i2c
arm/ti/ti_sdhci.c optional sdhci
arm/ti/ti_spi.c optional ti_spi
-dev/mii/micphy.c optional micphy
dev/uart/uart_dev_ti8250.c optional uart
dev/uart/uart_dev_ns8250.c optional uart
Modified: user/alc/PQ_LAUNDRY/sys/arm64/conf/GENERIC
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/arm64/conf/GENERIC Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/sys/arm64/conf/GENERIC Fri Jul 29 17:12:31 2016 (r303493)
@@ -131,6 +131,7 @@ device pl011
options USB_DEBUG # enable debug msgs
device dwcotg # DWC OTG controller
device ohci # OHCI PCI->USB interface
+device ehci # EHCI PCI->USB interface (USB 2.0)
device xhci # XHCI PCI->USB interface (USB 3.0)
device usb # USB Bus (required)
device ukbd # Keyboard
Modified: user/alc/PQ_LAUNDRY/sys/cam/ata/ata_xpt.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/cam/ata/ata_xpt.c Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/sys/cam/ata/ata_xpt.c Fri Jul 29 17:12:31 2016 (r303493)
@@ -188,6 +188,11 @@ static void ata_dev_async(u_int32_t asy
void *async_arg);
static void ata_action(union ccb *start_ccb);
static void ata_announce_periph(struct cam_periph *periph);
+static void ata_proto_announce(struct cam_ed *device);
+static void ata_proto_denounce(struct cam_ed *device);
+static void ata_proto_debug_out(union ccb *ccb);
+static void semb_proto_announce(struct cam_ed *device);
+static void semb_proto_denounce(struct cam_ed *device);
static int ata_dma = 1;
static int atapi_dma = 1;
@@ -195,18 +200,61 @@ static int atapi_dma = 1;
TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma);
-static struct xpt_xport ata_xport = {
+static struct xpt_xport_ops ata_xport_ops = {
.alloc_device = ata_alloc_device,
.action = ata_action,
.async = ata_dev_async,
.announce = ata_announce_periph,
};
+#define ATA_XPT_XPORT(x, X) \
+static struct xpt_xport ata_xport_ ## x = { \
+ .xport = XPORT_ ## X, \
+ .name = #x, \
+ .ops = &ata_xport_ops, \
+}; \
+CAM_XPT_XPORT(ata_xport_ ## x);
+
+ATA_XPT_XPORT(ata, ATA);
+ATA_XPT_XPORT(sata, SATA);
+
+#undef ATA_XPORT_XPORT
+
+static struct xpt_proto_ops ata_proto_ops_ata = {
+ .announce = ata_proto_announce,
+ .denounce = ata_proto_denounce,
+ .debug_out = ata_proto_debug_out,
+};
+static struct xpt_proto ata_proto_ata = {
+ .proto = PROTO_ATA,
+ .name = "ata",
+ .ops = &ata_proto_ops_ata,
+};
-struct xpt_xport *
-ata_get_xport(void)
-{
- return (&ata_xport);
-}
+static struct xpt_proto_ops ata_proto_ops_satapm = {
+ .announce = ata_proto_announce,
+ .denounce = ata_proto_denounce,
+ .debug_out = ata_proto_debug_out,
+};
+static struct xpt_proto ata_proto_satapm = {
+ .proto = PROTO_SATAPM,
+ .name = "satapm",
+ .ops = &ata_proto_ops_satapm,
+};
+
+static struct xpt_proto_ops ata_proto_ops_semb = {
+ .announce = semb_proto_announce,
+ .denounce = semb_proto_denounce,
+ .debug_out = ata_proto_debug_out,
+};
+static struct xpt_proto ata_proto_semb = {
+ .proto = PROTO_SEMB,
+ .name = "semb",
+ .ops = &ata_proto_ops_semb,
+};
+
+CAM_XPT_PROTO(ata_proto_ata);
+CAM_XPT_PROTO(ata_proto_satapm);
+CAM_XPT_PROTO(ata_proto_semb);
static void
probe_periph_init()
@@ -2088,3 +2136,40 @@ ata_announce_periph(struct cam_periph *p
}
printf("\n");
}
+
+static void
+ata_proto_announce(struct cam_ed *device)
+{
+ ata_print_ident(&device->ident_data);
+}
+
+static void
+ata_proto_denounce(struct cam_ed *device)
+{
+ ata_print_ident_short(&device->ident_data);
+}
+
+static void
+semb_proto_announce(struct cam_ed *device)
+{
+ semb_print_ident((struct sep_identify_data *)&device->ident_data);
+}
+
+static void
+semb_proto_denounce(struct cam_ed *device)
+{
+ semb_print_ident_short((struct sep_identify_data *)&device->ident_data);
+}
+
+static void
+ata_proto_debug_out(union ccb *ccb)
+{
+ char cdb_str[(sizeof(struct ata_cmd) * 3) + 1];
+
+ if (ccb->ccb_h.func_code != XPT_ATA_IO)
+ return;
+
+ CAM_DEBUG(ccb->ccb_h.path,
+ CAM_DEBUG_CDB,("%s. ACB: %s\n", ata_op_string(&ccb->ataio.cmd),
+ ata_cmd_string(&ccb->ataio.cmd, cdb_str, sizeof(cdb_str))));
+}
Modified: user/alc/PQ_LAUNDRY/sys/cam/cam_xpt.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/cam/cam_xpt.c Fri Jul 29 16:43:51 2016 (r303492)
+++ user/alc/PQ_LAUNDRY/sys/cam/cam_xpt.c Fri Jul 29 17:12:31 2016 (r303493)
@@ -746,6 +746,19 @@ cam_module_event_handler(module_t mod, i
return 0;
}
+static struct xpt_proto *
+xpt_proto_find(cam_proto proto)
+{
+ struct xpt_proto **pp;
+
+ SET_FOREACH(pp, cam_xpt_proto_set) {
+ if ((*pp)->proto == proto)
+ return *pp;
+ }
+
+ return NULL;
+}
+
static void
xpt_rescan_done(struct cam_periph *periph, union ccb *done_ccb)
{
@@ -1012,6 +1025,7 @@ void
xpt_announce_periph(struct cam_periph *periph, char *announce_string)
{
struct cam_path *path = periph->path;
+ struct xpt_proto *proto;
cam_periph_assert(periph, MA_OWNED);
periph->flags |= CAM_PERIPH_ANNOUNCED;
@@ -1025,25 +1039,20 @@ xpt_announce_periph(struct cam_periph *p
path->target->target_id,
(uintmax_t)path->device->lun_id);
printf("%s%d: ", periph->periph_name, periph->unit_number);
- if (path->device->protocol == PROTO_SCSI)
- scsi_print_inquiry(&path->device->inq_data);
- else if (path->device->protocol == PROTO_ATA ||
- path->device->protocol == PROTO_SATAPM)
- ata_print_ident(&path->device->ident_data);
- else if (path->device->protocol == PROTO_SEMB)
- semb_print_ident(
- (struct sep_identify_data *)&path->device->ident_data);
- else if (path->device->protocol == PROTO_NVME)
- nvme_print_ident(path->device->nvme_cdata, path->device->nvme_data);
+ proto = xpt_proto_find(path->device->protocol);
+ if (proto)
+ proto->ops->announce(path->device);
else
- printf("Unknown protocol device\n");
+ printf("%s%d: Unknown protocol device %d\n",
+ periph->periph_name, periph->unit_number,
+ path->device->protocol);
if (path->device->serial_num_len > 0) {
/* Don't wrap the screen - print only the first 60 chars */
printf("%s%d: Serial Number %.60s\n", periph->periph_name,
periph->unit_number, path->device->serial_num);
}
/* Announce transport details. */
- (*(path->bus->xport->announce))(periph);
+ path->bus->xport->ops->announce(periph);
/* Announce command queueing. */
if (path->device->inq_flags & SID_CmdQue
|| path->device->flags & CAM_DEV_TAG_AFTER_COUNT) {
@@ -1069,6 +1078,7 @@ void
xpt_denounce_periph(struct cam_periph *periph)
{
struct cam_path *path = periph->path;
+ struct xpt_proto *proto;
cam_periph_assert(periph, MA_OWNED);
printf("%s%d at %s%d bus %d scbus%d target %d lun %jx\n",
@@ -1080,18 +1090,13 @@ xpt_denounce_periph(struct cam_periph *p
path->target->target_id,
(uintmax_t)path->device->lun_id);
printf("%s%d: ", periph->periph_name, periph->unit_number);
- if (path->device->protocol == PROTO_SCSI)
- scsi_print_inquiry_short(&path->device->inq_data);
- else if (path->device->protocol == PROTO_ATA ||
- path->device->protocol == PROTO_SATAPM)
- ata_print_ident_short(&path->device->ident_data);
- else if (path->device->protocol == PROTO_SEMB)
- semb_print_ident_short(
- (struct sep_identify_data *)&path->device->ident_data);
- else if (path->device->protocol == PROTO_NVME)
- nvme_print_ident(path->device->nvme_cdata, path->device->nvme_data);
+ proto = xpt_proto_find(path->device->protocol);
+ if (proto)
+ proto->ops->denounce(path->device);
else
- printf("Unknown protocol device");
+ printf("%s%d: Unknown protocol device %d\n",
+ periph->periph_name, periph->unit_number,
+ path->device->protocol);
if (path->device->serial_num_len > 0)
printf(" s/n %.60s", path->device->serial_num);
printf(" detached\n");
@@ -2464,7 +2469,7 @@ xpt_action(union ccb *start_ccb)
xpt_action_name(start_ccb->ccb_h.func_code)));
start_ccb->ccb_h.status = CAM_REQ_INPROG;
- (*(start_ccb->ccb_h.path->bus->xport->action))(start_ccb);
+ (*(start_ccb->ccb_h.path->bus->xport->ops->action))(start_ccb);
}
void
@@ -3234,7 +3239,6 @@ restart:
static void
xpt_run_devq(struct cam_devq *devq)
{
- char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
int lock;
CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_devq\n"));
@@ -3246,6 +3250,7 @@ xpt_run_devq(struct cam_devq *devq)
struct cam_ed *device;
union ccb *work_ccb;
struct cam_sim *sim;
+ struct xpt_proto *proto;
device = (struct cam_ed *)camq_remove(&devq->send_queue,
CAMQ_HEAD);
@@ -3311,32 +3316,12 @@ xpt_run_devq(struct cam_devq *devq)
work_ccb->ccb_h.flags &= ~CAM_TAG_ACTION_VALID;
}
- switch (work_ccb->ccb_h.func_code) {
- case XPT_SCSI_IO:
- CAM_DEBUG(work_ccb->ccb_h.path,
- CAM_DEBUG_CDB,("%s. CDB: %s\n",
- scsi_op_desc(work_ccb->csio.cdb_io.cdb_bytes[0],
- &device->inq_data),
- scsi_cdb_string(work_ccb->csio.cdb_io.cdb_bytes,
- cdb_str, sizeof(cdb_str))));
- break;
- case XPT_ATA_IO:
- CAM_DEBUG(work_ccb->ccb_h.path,
- CAM_DEBUG_CDB,("%s. ACB: %s\n",
- ata_op_string(&work_ccb->ataio.cmd),
- ata_cmd_string(&work_ccb->ataio.cmd,
- cdb_str, sizeof(cdb_str))));
- break;
- case XPT_NVME_IO:
- CAM_DEBUG(work_ccb->ccb_h.path,
- CAM_DEBUG_CDB,("%s. NCB: %s\n",
- nvme_op_string(&work_ccb->nvmeio.cmd),
- nvme_cmd_string(&work_ccb->nvmeio.cmd,
- cdb_str, sizeof(cdb_str))));
- break;
- default:
- break;
- }
+ KASSERT(device == work_ccb->ccb_h.path->device,
+ ("device (%p) / path->device (%p) mismatch",
+ device, work_ccb->ccb_h.path->device));
+ proto = xpt_proto_find(device->protocol);
+ if (proto && proto->ops->debug_out)
+ proto->ops->debug_out(work_ccb);
/*
* Device queues can be shared among multiple SIM instances
@@ -3482,9 +3467,9 @@ xpt_compile_path(struct cam_path *new_pa
struct cam_ed *new_device;
new_device =
- (*(bus->xport->alloc_device))(bus,
- target,
- lun_id);
+ (*(bus->xport->ops->alloc_device))(bus,
+ target,
+ lun_id);
if (new_device == NULL) {
status = CAM_RESRC_UNAVAIL;
} else {
@@ -3832,11 +3817,18 @@ xpt_release_ccb(union ccb *free_ccb)
/* Functions accessed by SIM drivers */
-static struct xpt_xport xport_default = {
+static struct xpt_xport_ops xport_default_ops = {
.alloc_device = xpt_alloc_device_default,
.action = xpt_action_default,
.async = xpt_dev_async_default,
};
+static struct xpt_xport xport_default = {
+ .xport = XPORT_UNKNOWN,
+ .name = "unknown",
+ .ops = &xport_default_ops,
+};
+
+CAM_XPT_XPORT(xport_default);
/*
* A sim structure, listing the SIM entry points and instance
@@ -3909,26 +3901,20 @@ xpt_bus_register(struct cam_sim *sim, de
xpt_action((union ccb *)&cpi);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list