svn commit: r278351 - in projects/clang360-import: contrib/mdocml etc/rc.d lib lib/csu/powerpc64 lib/libc/gen lib/libc/stdlib lib/libdevctl lib/libdevinfo lib/libnetgraph lib/libthr/thread lib/msun...
Dimitry Andric
dim at FreeBSD.org
Sat Feb 7 12:57:50 UTC 2015
Author: dim
Date: Sat Feb 7 12:57:40 2015
New Revision: 278351
URL: https://svnweb.freebsd.org/changeset/base/278351
Log:
Merging ^/head r278298 through r278350.
Added:
projects/clang360-import/lib/libdevctl/
- copied from r278350, head/lib/libdevctl/
projects/clang360-import/sys/dev/cxgbe/if_cxl.c
- copied unchanged from r278350, head/sys/dev/cxgbe/if_cxl.c
projects/clang360-import/sys/modules/cxgbe/if_cxl/
- copied from r278350, head/sys/modules/cxgbe/if_cxl/
projects/clang360-import/sys/modules/dtb/rpi/
- copied from r278350, head/sys/modules/dtb/rpi/
projects/clang360-import/usr.sbin/devctl/
- copied from r278350, head/usr.sbin/devctl/
Modified:
projects/clang360-import/contrib/mdocml/lib.in
projects/clang360-import/etc/rc.d/jail
projects/clang360-import/etc/rc.d/routing
projects/clang360-import/lib/Makefile
projects/clang360-import/lib/csu/powerpc64/Makefile
projects/clang360-import/lib/libc/gen/disklabel.c
projects/clang360-import/lib/libc/stdlib/tdelete.c
projects/clang360-import/lib/libdevinfo/devinfo.h
projects/clang360-import/lib/libnetgraph/debug.c
projects/clang360-import/lib/libthr/thread/thr_barrier.c
projects/clang360-import/lib/msun/src/s_scalbln.c
projects/clang360-import/share/man/man4/witness.4
projects/clang360-import/share/mk/bsd.libnames.mk
projects/clang360-import/share/mk/src.libnames.mk
projects/clang360-import/sys/amd64/amd64/mp_machdep.c
projects/clang360-import/sys/arm/broadcom/bcm2835/files.bcm2835
projects/clang360-import/sys/arm/conf/RPI-B
projects/clang360-import/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu
projects/clang360-import/sys/boot/amd64/boot1.efi/generate-fat.sh
projects/clang360-import/sys/boot/forth/beastie.4th
projects/clang360-import/sys/boot/forth/brand.4th
projects/clang360-import/sys/cam/ctl/ctl_frontend_iscsi.c
projects/clang360-import/sys/cam/ctl/ctl_ioctl.h
projects/clang360-import/sys/conf/files
projects/clang360-import/sys/conf/kern.pre.mk
projects/clang360-import/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
projects/clang360-import/sys/dev/acpica/acpi.c
projects/clang360-import/sys/dev/cxgbe/t4_main.c
projects/clang360-import/sys/dev/ipmi/ipmi.c
projects/clang360-import/sys/dev/ipmi/ipmi_kcs.c
projects/clang360-import/sys/dev/ipmi/ipmi_smic.c
projects/clang360-import/sys/dev/ipmi/ipmi_ssif.c
projects/clang360-import/sys/dev/ipmi/ipmivars.h
projects/clang360-import/sys/dev/pci/pci.c
projects/clang360-import/sys/i386/i386/mp_machdep.c
projects/clang360-import/sys/kern/subr_bus.c
projects/clang360-import/sys/kern/subr_hints.c
projects/clang360-import/sys/modules/Makefile
projects/clang360-import/sys/modules/cxgbe/Makefile
projects/clang360-import/sys/sys/bus.h
projects/clang360-import/sys/x86/x86/local_apic.c
projects/clang360-import/tools/tools/makeroot/makeroot.8
projects/clang360-import/tools/tools/makeroot/makeroot.sh
projects/clang360-import/usr.bin/ktrdump/ktrdump.8
projects/clang360-import/usr.bin/ktrdump/ktrdump.c
projects/clang360-import/usr.sbin/Makefile
projects/clang360-import/usr.sbin/ctladm/ctladm.c
projects/clang360-import/usr.sbin/ctld/ctl.conf.5
projects/clang360-import/usr.sbin/ctld/ctld.c
projects/clang360-import/usr.sbin/ctld/ctld.h
projects/clang360-import/usr.sbin/ctld/discovery.c
projects/clang360-import/usr.sbin/ctld/kernel.c
projects/clang360-import/usr.sbin/ctld/login.c
projects/clang360-import/usr.sbin/ctld/parse.y
projects/clang360-import/usr.sbin/ctld/token.l
projects/clang360-import/usr.sbin/devinfo/devinfo.c
projects/clang360-import/usr.sbin/freebsd-update/freebsd-update.sh
projects/clang360-import/usr.sbin/jail/command.c
projects/clang360-import/usr.sbin/jail/config.c
projects/clang360-import/usr.sbin/jail/jail.8
projects/clang360-import/usr.sbin/jail/jail.c
projects/clang360-import/usr.sbin/jail/jailp.h
Directory Properties:
projects/clang360-import/ (props changed)
projects/clang360-import/contrib/llvm/ (props changed)
projects/clang360-import/contrib/mdocml/ (props changed)
projects/clang360-import/etc/ (props changed)
projects/clang360-import/lib/libc/ (props changed)
projects/clang360-import/share/ (props changed)
projects/clang360-import/share/man/man4/ (props changed)
projects/clang360-import/sys/ (props changed)
projects/clang360-import/sys/boot/ (props changed)
projects/clang360-import/sys/conf/ (props changed)
projects/clang360-import/usr.sbin/jail/ (props changed)
Modified: projects/clang360-import/contrib/mdocml/lib.in
==============================================================================
--- projects/clang360-import/contrib/mdocml/lib.in Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/contrib/mdocml/lib.in Sat Feb 7 12:57:40 2015 (r278351)
@@ -41,6 +41,7 @@ LINE("libcrypt", "Crypt Library (libcryp
LINE("libcurses", "Curses Library (libcurses, \\-lcurses)")
LINE("libcuse", "Userland Character Device Library (libcuse, \\-lcuse)")
LINE("libdevattr", "Device attribute and event library (libdevattr, \\-ldevattr)")
+LINE("libdevctl", "Device Control Library (libdevctl, \\-ldevctl)")
LINE("libdevinfo", "Device and Resource Information Utility Library (libdevinfo, \\-ldevinfo)")
LINE("libdevstat", "Device Statistics Library (libdevstat, \\-ldevstat)")
LINE("libdisk", "Interface to Slice and Partition Labels Library (libdisk, \\-ldisk)")
Modified: projects/clang360-import/etc/rc.d/jail
==============================================================================
--- projects/clang360-import/etc/rc.d/jail Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/etc/rc.d/jail Sat Feb 7 12:57:40 2015 (r278351)
@@ -28,7 +28,7 @@ extra_commands="config console status"
need_dad_wait=
-# extact_var jail name param num defval
+# extract_var jail name param num defval
# Extract value from ${jail_$jail_$name} or ${jail_$name} and
# set it to $param. If not defined, $defval is used.
# When $num is [0-9]*, ${jail_$jail_$name$num} are looked up and
Modified: projects/clang360-import/etc/rc.d/routing
==============================================================================
--- projects/clang360-import/etc/rc.d/routing Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/etc/rc.d/routing Sat Feb 7 12:57:40 2015 (r278351)
@@ -165,13 +165,14 @@ static_inet()
static_inet6()
{
- local _action _if _skip fibmod fibs
+ local _action _if _skip fibmod fibs allfibs
_action=$1
_if=$2
# get the number of FIBs supported.
fibs=$((`${SYSCTL_N} net.fibs` - 1))
- if [ "$fibs" -gt 0 ]; then
+ allfibs=`${SYSCTL_N} net.add_addr_allfibs`
+ if [ "$fibs" -gt 0 ] && [ "$allfibs" -ne 0 ]; then
fibmod="-fib 0-$fibs"
else
fibmod=
Modified: projects/clang360-import/lib/Makefile
==============================================================================
--- projects/clang360-import/lib/Makefile Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/Makefile Sat Feb 7 12:57:40 2015 (r278351)
@@ -41,6 +41,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
${_libcom_err} \
libcompat \
libcrypt \
+ libdevctl \
libdevinfo \
libdevstat \
libdpv \
Modified: projects/clang360-import/lib/csu/powerpc64/Makefile
==============================================================================
--- projects/clang360-import/lib/csu/powerpc64/Makefile Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/csu/powerpc64/Makefile Sat Feb 7 12:57:40 2015 (r278351)
@@ -9,6 +9,10 @@ CFLAGS+= -I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include \
-mlongcall
+# XXX: See the log for r232932 as to why the above -mlongcall is needed. Since
+# clang doesn't support -mlongcall, and testing shows a clang linked with a
+# clang-built csu segfaults, this must currently be compiled with gcc. Once
+# clang supports -mlongcall, or we get a fixed ld, this can be revisited.
CC:= gcc
COMPILER_TYPE:= gcc
Modified: projects/clang360-import/lib/libc/gen/disklabel.c
==============================================================================
--- projects/clang360-import/lib/libc/gen/disklabel.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/libc/gen/disklabel.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -85,10 +85,13 @@ getdiskbyname(const char *name)
cq++, cp++;
*cq = '\0';
- if (cgetstr(buf, "ty", &cq) > 0 && strcmp(cq, "removable") == 0)
- dp->d_flags |= D_REMOVABLE;
- else if (cq && strcmp(cq, "simulated") == 0)
- dp->d_flags |= D_RAMDISK;
+ if (cgetstr(buf, "ty", &cq) > 0) {
+ if (strcmp(cq, "removable") == 0)
+ dp->d_flags |= D_REMOVABLE;
+ else if (cq && strcmp(cq, "simulated") == 0)
+ dp->d_flags |= D_RAMDISK;
+ free(cq);
+ }
if (cgetcap(buf, "sf", ':') != NULL)
dp->d_flags |= D_BADSECT;
@@ -100,9 +103,10 @@ getdiskbyname(const char *name)
getnumdflt(dp->d_nsectors, "ns", 0);
getnumdflt(dp->d_ncylinders, "nc", 0);
- if (cgetstr(buf, "dt", &cq) > 0)
+ if (cgetstr(buf, "dt", &cq) > 0) {
dp->d_type = gettype(cq, dktypenames);
- else
+ free(cq);
+ } else
getnumdflt(dp->d_type, "dt", 0);
getnumdflt(dp->d_secpercyl, "sc", dp->d_nsectors * dp->d_ntracks);
getnumdflt(dp->d_secperunit, "su", dp->d_secpercyl * dp->d_ncylinders);
@@ -140,8 +144,11 @@ getdiskbyname(const char *name)
pp->p_frag = 8;
}
getnumdflt(pp->p_fstype, ptype, 0);
- if (pp->p_fstype == 0 && cgetstr(buf, ptype, &cq) > 0)
- pp->p_fstype = gettype(cq, fstypenames);
+ if (pp->p_fstype == 0)
+ if (cgetstr(buf, ptype, &cq) >= 0) {
+ pp->p_fstype = gettype(cq, fstypenames);
+ free(cq);
+ }
max = p;
}
}
Modified: projects/clang360-import/lib/libc/stdlib/tdelete.c
==============================================================================
--- projects/clang360-import/lib/libc/stdlib/tdelete.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/libc/stdlib/tdelete.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -14,7 +14,7 @@
#include <sys/cdefs.h>
#if 0
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: tdelete.c,v 1.2 1999/09/16 11:45:37 lukem Exp $");
+__RCSID("$NetBSD: tdelete.c,v 1.6 2012/06/25 22:32:45 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#endif
__FBSDID("$FreeBSD$");
@@ -25,9 +25,9 @@ __FBSDID("$FreeBSD$");
/*
- * delete node with given key
+ * find a node with given key
*
- * vkey: key to be deleted
+ * vkey: key to be found
* vrootp: address of the root of the tree
* compar: function to carry out node comparisons
*/
@@ -65,7 +65,8 @@ tdelete(const void * __restrict vkey, vo
q->rlink = (*rootp)->rlink;
}
}
- free(*rootp); /* D4: Free node */
+ if (p != *rootp)
+ free(*rootp); /* D4: Free node */
*rootp = q; /* link parent to new node */
return p;
}
Modified: projects/clang360-import/lib/libdevinfo/devinfo.h
==============================================================================
--- projects/clang360-import/lib/libdevinfo/devinfo.h Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/libdevinfo/devinfo.h Sat Feb 7 12:57:40 2015 (r278351)
@@ -50,7 +50,7 @@ struct devinfo_dev {
char *dd_location; /* Where bus thinks dev at */
uint32_t dd_devflags; /* API flags */
uint16_t dd_flags; /* internal dev flags */
- devinfo_state_t dd_state; /* attacement state of dev */
+ devinfo_state_t dd_state; /* attachment state of dev */
};
struct devinfo_rman {
Modified: projects/clang360-import/lib/libnetgraph/debug.c
==============================================================================
--- projects/clang360-import/lib/libnetgraph/debug.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/libnetgraph/debug.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -62,12 +62,15 @@ __FBSDID("$FreeBSD$");
#include <netgraph/ng_atmllc.h>
#include <netgraph/ng_bpf.h>
#include <netgraph/ng_bridge.h>
+#include <netgraph/ng_car.h>
#include <netgraph/ng_cisco.h>
+#include <netgraph/ng_deflate.h>
#include <netgraph/ng_device.h>
#include <netgraph/ng_echo.h>
#include <netgraph/ng_eiface.h>
#include <netgraph/ng_etf.h>
#include <netgraph/ng_ether.h>
+#include <netgraph/ng_ether_echo.h>
#include <netgraph/ng_frame_relay.h>
#include <netgraph/ng_gif.h>
#include <netgraph/ng_gif_demux.h>
@@ -81,15 +84,20 @@ __FBSDID("$FreeBSD$");
#include <netgraph/ng_lmi.h>
#include <netgraph/ng_mppc.h>
#include <netgraph/ng_nat.h>
+#include <netgraph/netflow/ng_netflow.h>
#include <netgraph/ng_one2many.h>
+#include <netgraph/ng_patch.h>
+#include <netgraph/ng_pipe.h>
#include <netgraph/ng_ppp.h>
#include <netgraph/ng_pppoe.h>
#include <netgraph/ng_pptpgre.h>
+#include <netgraph/ng_pred1.h>
#include <netgraph/ng_rfc1490.h>
#include <netgraph/ng_socket.h>
#include <netgraph/ng_source.h>
#include <netgraph/ng_split.h>
#include <netgraph/ng_sppp.h>
+#include <netgraph/ng_tag.h>
#include <netgraph/ng_tcpmss.h>
#include <netgraph/ng_tee.h>
#include <netgraph/ng_tty.h>
@@ -129,12 +137,15 @@ static const struct ng_cookie cookies[]
COOKIE(ATMLLC),
COOKIE(BPF),
COOKIE(BRIDGE),
+ COOKIE(CAR),
COOKIE(CISCO),
+ COOKIE(DEFLATE),
COOKIE(DEVICE),
COOKIE(ECHO),
COOKIE(EIFACE),
COOKIE(ETF),
COOKIE(ETHER),
+ COOKIE(ETHER_ECHO),
COOKIE(FRAMERELAY),
COOKIE(GIF),
COOKIE(GIF_DEMUX),
@@ -149,15 +160,20 @@ static const struct ng_cookie cookies[]
COOKIE(LMI),
COOKIE(MPPC),
COOKIE(NAT),
+ COOKIE(NETFLOW),
COOKIE(ONE2MANY),
+ COOKIE(PATCH),
+ COOKIE(PIPE),
COOKIE(PPP),
COOKIE(PPPOE),
COOKIE(PPTPGRE),
+ COOKIE(PRED1),
COOKIE(RFC1490),
COOKIE(SOCKET),
COOKIE(SOURCE),
COOKIE(SPLIT),
COOKIE(SPPP),
+ COOKIE(TAG),
COOKIE(TCPMSS),
COOKIE(TEE),
COOKIE(TTY),
@@ -181,9 +197,8 @@ NgSetDebug(int level)
{
int old = _gNgDebugLevel;
- if (level < 0)
- level = old;
- _gNgDebugLevel = level;
+ if (level >= 0)
+ _gNgDebugLevel = level;
return (old);
}
@@ -225,10 +240,10 @@ _NgDebugMsg(const struct ng_mesg *msg, c
/* Display header stuff */
NGLOGX("NG_MESG :");
NGLOGX(" vers %d", msg->header.version);
- NGLOGX(" arglen %d", msg->header.arglen);
- NGLOGX(" flags %ld", msg->header.flags);
- NGLOGX(" token %lu", (u_long)msg->header.token);
- NGLOGX(" cookie %s (%d)",
+ NGLOGX(" arglen %u", msg->header.arglen);
+ NGLOGX(" flags %x", msg->header.flags);
+ NGLOGX(" token %u", msg->header.token);
+ NGLOGX(" cookie %s (%u)",
NgCookie(msg->header.typecookie), msg->header.typecookie);
/* At lower debugging levels, skip ASCII translation */
Modified: projects/clang360-import/lib/libthr/thread/thr_barrier.c
==============================================================================
--- projects/clang360-import/lib/libthr/thread/thr_barrier.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/libthr/thread/thr_barrier.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -86,16 +86,13 @@ _pthread_barrier_init(pthread_barrier_t
if (barrier == NULL || count <= 0)
return (EINVAL);
- bar = malloc(sizeof(struct pthread_barrier));
+ bar = calloc(1, sizeof(struct pthread_barrier));
if (bar == NULL)
return (ENOMEM);
_thr_umutex_init(&bar->b_lock);
_thr_ucond_init(&bar->b_cv);
- bar->b_cycle = 0;
- bar->b_waiters = 0;
bar->b_count = count;
- bar->b_refcount = 0;
*barrier = bar;
return (0);
Modified: projects/clang360-import/lib/msun/src/s_scalbln.c
==============================================================================
--- projects/clang360-import/lib/msun/src/s_scalbln.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/lib/msun/src/s_scalbln.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -27,38 +27,28 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <limits.h>
#include <math.h>
+#define NMAX 65536
+#define NMIN -65536
+
double
-scalbln (double x, long n)
+scalbln(double x, long n)
{
- int in;
- in = (int)n;
- if (in != n)
- in = (n > 0) ? INT_MAX: INT_MIN;
- return (scalbn(x, in));
+ return (scalbn(x, (n > NMAX) ? NMAX : (n < NMIN) ? NMIN : (int)n));
}
float
-scalblnf (float x, long n)
+scalblnf(float x, long n)
{
- int in;
- in = (int)n;
- if (in != n)
- in = (n > 0) ? INT_MAX: INT_MIN;
- return (scalbnf(x, in));
+ return (scalbnf(x, (n > NMAX) ? NMAX : (n < NMIN) ? NMIN : (int)n));
}
long double
-scalblnl (long double x, long n)
+scalblnl(long double x, long n)
{
- int in;
- in = (int)n;
- if (in != n)
- in = (n > 0) ? INT_MAX: INT_MIN;
- return (scalbnl(x, in));
+ return (scalbnl(x, (n > NMAX) ? NMAX : (n < NMIN) ? NMIN : (int)n));
}
Modified: projects/clang360-import/share/man/man4/witness.4
==============================================================================
--- projects/clang360-import/share/man/man4/witness.4 Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/share/man/man4/witness.4 Sat Feb 7 12:57:40 2015 (r278351)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 30, 2012
+.Dd February 6, 2015
.Dt WITNESS 4
.Os
.Sh NAME
@@ -32,7 +32,9 @@
.Nd lock validation facility
.Sh SYNOPSIS
.Cd options WITNESS
+.Cd options WITNESS_COUNT
.Cd options WITNESS_KDB
+.Cd options WITNESS_NO_VNODE
.Cd options WITNESS_SKIPSPIN
.Sh DESCRIPTION
The
@@ -56,6 +58,28 @@ does not recurse on a non-recursive lock
or attempt an upgrade on a shared lock held by another thread.
If any of these checks fail, then the kernel will panic.
.Pp
+The
+.Dv WITNESS_COUNT
+kernel option controls the maximum number of
+.Xr witness 4
+entries that are tracked in the kernel.
+The maximum number of entries can be queried via the
+.Va debug.witness.count
+sysctl.
+It can also be set from the
+.Xr loader 8
+via the
+.Va debug.witness.count
+environment variable.
+.Pp
+The
+.Dv WITNESS_NO_VNODE
+kernel option tells
+.Xr witness 4
+to ignore locking issues between
+.Xr vnode 9
+objects.
+.Pp
The flag that controls whether or not the kernel debugger is entered when a
lock order violation is detected can be set in a variety of ways.
By default, the flag is off, but if the
Modified: projects/clang360-import/share/mk/bsd.libnames.mk
==============================================================================
--- projects/clang360-import/share/mk/bsd.libnames.mk Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/share/mk/bsd.libnames.mk Sat Feb 7 12:57:40 2015 (r278351)
@@ -39,6 +39,7 @@ LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt.
LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a
LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a
LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a
+LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a
LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a
LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a
LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a
Modified: projects/clang360-import/share/mk/src.libnames.mk
==============================================================================
--- projects/clang360-import/share/mk/src.libnames.mk Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/share/mk/src.libnames.mk Sat Feb 7 12:57:40 2015 (r278351)
@@ -72,6 +72,7 @@ _LIBRARIES= \
ctf \
cuse \
cxxrt \
+ devctl \
devinfo \
devstat \
dialog \
Modified: projects/clang360-import/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- projects/clang360-import/sys/amd64/amd64/mp_machdep.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/amd64/amd64/mp_machdep.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -1065,14 +1065,27 @@ ipi_startup(int apic_id, int vector)
{
/*
+ * This attempts to follow the algorithm described in the
+ * Intel Multiprocessor Specification v1.4 in section B.4.
+ * For each IPI, we allow the local APIC ~20us to deliver the
+ * IPI. If that times out, we panic.
+ */
+
+ /*
* first we do an INIT IPI: this INIT IPI might be run, resetting
* and running the target CPU. OR this INIT IPI might be latched (P5
* bug), CPU waiting for STARTUP IPI. OR this INIT IPI might be
* ignored.
*/
- lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE |
+ lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL |
APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id);
- lapic_ipi_wait(-1);
+ lapic_ipi_wait(20);
+
+ /* Explicitly deassert the INIT IPI. */
+ lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL |
+ APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT,
+ apic_id);
+
DELAY(10000); /* wait ~10mS */
/*
@@ -1084,9 +1097,11 @@ ipi_startup(int apic_id, int vector)
* will run.
*/
lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE |
- APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP |
+ APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP |
vector, apic_id);
- lapic_ipi_wait(-1);
+ if (!lapic_ipi_wait(20))
+ panic("Failed to deliver first STARTUP IPI to APIC %d",
+ apic_id);
DELAY(200); /* wait ~200uS */
/*
@@ -1096,9 +1111,12 @@ ipi_startup(int apic_id, int vector)
* recognized after hardware RESET or INIT IPI.
*/
lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE |
- APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP |
+ APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP |
vector, apic_id);
- lapic_ipi_wait(-1);
+ if (!lapic_ipi_wait(20))
+ panic("Failed to deliver second STARTUP IPI to APIC %d",
+ apic_id);
+
DELAY(200); /* wait ~200uS */
}
Modified: projects/clang360-import/sys/arm/broadcom/bcm2835/files.bcm2835
==============================================================================
--- projects/clang360-import/sys/arm/broadcom/bcm2835/files.bcm2835 Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/arm/broadcom/bcm2835/files.bcm2835 Sat Feb 7 12:57:40 2015 (r278351)
@@ -29,21 +29,21 @@ dev/mbox/mbox_if.m standard
dev/ofw/ofw_cpu.c standard
# VideoCore driver
-contrib/vchiq/interface/compat/vchi_bsd.c standard \
+contrib/vchiq/interface/compat/vchi_bsd.c optional vchiq \
compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c optional vchiq \
compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_arm.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_arm.c optional vchiq \
compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_connected.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_connected.c optional vchiq \
compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_core.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_core.c optional vchiq \
compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_kern_lib.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_kern_lib.c optional vchiq \
compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c optional vchiq \
compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_shim.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_shim.c optional vchiq \
compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
-contrib/vchiq/interface/vchiq_arm/vchiq_util.c standard \
+contrib/vchiq/interface/vchiq_arm/vchiq_util.c optional vchiq \
compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
Modified: projects/clang360-import/sys/arm/conf/RPI-B
==============================================================================
--- projects/clang360-import/sys/arm/conf/RPI-B Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/arm/conf/RPI-B Sat Feb 7 12:57:40 2015 (r278351)
@@ -129,9 +129,12 @@ device smsc
device spibus
device bcm2835_spi
+device vchiq
+
# Flattened Device Tree
options FDT # Configure using FDT/DTB data
# Note: DTB is normally loaded and modified by RPi boot loader, then
# handed to kernel via U-Boot and ubldr.
#options FDT_DTB_STATIC
-makeoptions FDT_DTS_FILE=rpi.dts
+#makeoptions FDT_DTS_FILE=rpi.dts
+makeoptions MODULES_EXTRA=dtb/rpi
Modified: projects/clang360-import/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu
==============================================================================
--- projects/clang360-import/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu Sat Feb 7 12:57:40 2015 (r278351)
@@ -2,20 +2,19 @@ FAT template boot filesystem created by
DO NOT EDIT
$FreeBSD$
begin 644 fat.tmpl.bz2
-M0EIH.3%!62936=AO?&0`&J9____[ZZKJJ_^N_ZO^Z_^[OO_\`5`(0!0&#$D"
-M0$)$2&(<P`(\K5,M9"5%&DQ---,FAH,0```T````R-!HQ`&30`-&"#)ID$JF
-M1)[U4_5-&@`T```#0&AH````````````(,F`$P`!,`1IA&````"9-,308`1@
-M````!))!BDVI/U0`]0R>H:`81HT#)D!H-#U`T#31IH-&(``R8$9_I)6[MY/,
-M(H=/()+4&!(3V0"20C3J5$L5 at 2`219,"T6JI, at 0"2*2\=LAD6=>N6<O!'F<.
-MQ2`;9$.P]202R&N9I3BX[E0;C7/9BF'`((K?M1ZK0B2Q;BLJ9!(`21P&1:;B
-MDD)S!-L5BL5BL/173`@@M!!!!!X at BQ0@@@@@@CJ"A!!!"!`TWD!B!`@0($"J
-M9(E`B,1(D2)$B;V]S&-,&#!@P8,'1\*$+59`:41,';;/)32*G*Q52N![20F8
-M9CCYSB#!2=[EG.),$:P,>(8QSW'U+N42P^'5X at 7X``23=EA``#Z,O)^-VTX@
-M`+E!=,&6PV11C:*D8K#^<%FTG-%!@PR72@\ZU0B<D6I$FT/1\<A#/`;ET5$)
-MKT-MBW97\J.P/H0ADE"(EBN6";@5#$2#!(\F/E8M+!8-A-S"+$U5[\J>F1Y]
-MF-FPGL2L>4QCU&O/>89^#H$6^<;&WKC9W52KUX."CM6+GD;(=1!MUD,,?Y[]
-MTLAG0];,:B^]M%BH0J1":_C-*2I9R3AS#,&0>$RCY'T/R?HR!?'5$MILQ:!"
-M+;10A*!&^<(_/8>D8<CDN9]HO)OH13W(Q())?'R2WTV9*G_4T<=Y!'1+'9,(
-J1-/V<ME.&9Q3LKI2S$(`$D,``'_=FF*).\[A.)#4HU1=R13A0D-AO?&0
+M0EIH.3%!629362AK*D(`&I+____[ZZKJZ_^N_ZO^Z_Z_OJ[L`4`!7I0$#&$"
+M0$!$3&(<P`(;J*C:0E0E#30&AH`T````9#0```9````#)ZF0:,-3U/409,`)
+M@`"8`C3",````$R:8F at P`C`````"24U,D>I-DTU,)ZAZ0VA-!M0T'J`>H#"9
+M'I#0-H&HQI&0&3&FH>H>*`JHHU3V]1%/4/2``T#0`!H``#0`````#1H,@``6
+M'1&G'&@?$6[T#A)?X8$A160"20BO#")0J4TB1*4GXF$B4I,&>43+=_?K=#3*
+M6]<E0HE`UBF?(J%8BRF#?8OQ2'D)`)(EL2;F4.'R>R"ZNKJZI,9*68E8*E2Q
+M4J5*E3'(1830A"$(12A-"<(0A#]VD)H0A"$,>I0FA"$(0I\>P^=F5:M6K5JU
+M:DI3:64UN;[7%5B]Y-^\]@_K at B:N\/,5F%&H<\G#IXQXAEFC&D?![6%0'6MR
+MX1@@%FC"FD`M7,/SXFNG:2`'-0<-C$8^+$N.7M1B,^6)9,DV9,0A\OL<:C"L
+ML1V&,<\9YRB>XV#BG")'6NKRK^("UF2XO?_L!#29">MGDF$R3).!PX&%E,4C
+M''=(FL1.`_3?CN at -IB2PI3!FF\<8X.X at D,>CA90I)#M$XRPNDFJELL<3=1?8
+M2B7\5Z64,!7Z;EEBW-MXN-4IJ at W$462]-*\YCR,-B,5[W?=3&L/U>SX,WV#\
+M\B`:I"'0Z)5"$1B.E)(K[5I4RS`%R$>Y\D0NR*,;<9CZ:^V3P(I?D<D#!UC)
+D^M-HEE3SAN-8O0FQ$(`$(DF`?ZQ]'U2F_XNY(IPH2!0UE2$`
`
end
Modified: projects/clang360-import/sys/boot/amd64/boot1.efi/generate-fat.sh
==============================================================================
--- projects/clang360-import/sys/boot/amd64/boot1.efi/generate-fat.sh Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/boot/amd64/boot1.efi/generate-fat.sh Sat Feb 7 12:57:40 2015 (r278351)
@@ -20,7 +20,7 @@ OUTPUT_FILE=fat.tmpl
dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE
DEVICE=`mdconfig -a -f $OUTPUT_FILE`
-newfs_msdos -F 12 $DEVICE
+newfs_msdos -F 12 -L EFI $DEVICE
mkdir stub
mount -t msdosfs /dev/$DEVICE stub
Modified: projects/clang360-import/sys/boot/forth/beastie.4th
==============================================================================
--- projects/clang360-import/sys/boot/forth/beastie.4th Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/boot/forth/beastie.4th Sat Feb 7 12:57:40 2015 (r278351)
@@ -89,7 +89,7 @@ variable logoY
0 25 at-xy
;
-: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (12 rows x 21 columns)
+: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns)
\ We used to use the beastie himself as our default... until the
\ eventual complaint derided his reign of the advanced boot-menu.
@@ -106,16 +106,17 @@ variable logoY
5 + swap 6 + swap
2dup at-xy ." ______" 1+
- 2dup at-xy ." | ____|" 1+
- 2dup at-xy ." | |__ _ __ ___ ___ " 1+
- 2dup at-xy ." | __|| '__/ _ \/ _ \" 1+
- 2dup at-xy ." | | | | | __/ __/" 1+
+ 2dup at-xy ." | ____| __ ___ ___ " 1+
+ 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+
+ 2dup at-xy ." | __|| | | __/ __/" 1+
+ 2dup at-xy ." | | | | | | |" 1+
2dup at-xy ." |_| |_| \___|\___|" 1+
2dup at-xy ." ____ _____ _____" 1+
2dup at-xy ." | _ \ / ____| __ \" 1+
2dup at-xy ." | |_) | (___ | | | |" 1+
2dup at-xy ." | _ < \___ \| | | |" 1+
2dup at-xy ." | |_) |____) | |__| |" 1+
+ 2dup at-xy ." | | | |" 1+
at-xy ." |____/|_____/|_____/"
\ Put the cursor back at the bottom
Modified: projects/clang360-import/sys/boot/forth/brand.4th
==============================================================================
--- projects/clang360-import/sys/boot/forth/brand.4th Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/boot/forth/brand.4th Sat Feb 7 12:57:40 2015 (r278351)
@@ -33,13 +33,14 @@ variable brandY
2 brandX !
1 brandY !
-: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (6 rows x 42 columns)
+: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns)
2dup at-xy ." ______ ____ _____ _____ " 1+
2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+
2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+
2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+
2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+
+ 2dup at-xy ." | | | | | | || | | |" 1+
at-xy ." |_| |_| \___|\___||____/|_____/|_____/ "
\ Put the cursor back at the bottom
Modified: projects/clang360-import/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- projects/clang360-import/sys/cam/ctl/ctl_frontend_iscsi.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/cam/ctl/ctl_frontend_iscsi.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -1222,7 +1222,7 @@ cfiscsi_session_unregister_initiator(str
}
static struct cfiscsi_session *
-cfiscsi_session_new(struct cfiscsi_softc *softc)
+cfiscsi_session_new(struct cfiscsi_softc *softc, const char *offload)
{
struct cfiscsi_session *cs;
int error;
@@ -1242,7 +1242,11 @@ cfiscsi_session_new(struct cfiscsi_softc
cv_init(&cs->cs_login_cv, "cfiscsi_login");
#endif
- cs->cs_conn = icl_new_conn(NULL, "cfiscsi", &cs->cs_lock);
+ cs->cs_conn = icl_new_conn(offload, "cfiscsi", &cs->cs_lock);
+ if (cs->cs_conn == NULL) {
+ free(cs, M_CFISCSI);
+ return (NULL);
+ }
cs->cs_conn->ic_receive = cfiscsi_receive_callback;
cs->cs_conn->ic_error = cfiscsi_error_callback;
cs->cs_conn->ic_prv0 = cs;
@@ -1325,7 +1329,7 @@ cfiscsi_accept(struct socket *so, struct
{
struct cfiscsi_session *cs;
- cs = cfiscsi_session_new(&cfiscsi_softc);
+ cs = cfiscsi_session_new(&cfiscsi_softc, NULL);
if (cs == NULL) {
CFISCSI_WARN("failed to create session");
return;
@@ -1469,7 +1473,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *
mtx_unlock(&cfiscsi_softc.lock);
} else {
#endif
- cs = cfiscsi_session_new(softc);
+ cs = cfiscsi_session_new(softc, cihp->offload);
if (cs == NULL) {
ci->status = CTL_ISCSI_ERROR;
snprintf(ci->error_str, sizeof(ci->error_str),
@@ -1620,6 +1624,7 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci)
"<max_data_segment_length>%zd</max_data_segment_length>"
"<immediate_data>%d</immediate_data>"
"<iser>%d</iser>"
+ "<offload>%s</offload>"
"</connection>\n",
cs->cs_id,
cs->cs_initiator_name, cs->cs_initiator_addr, cs->cs_initiator_alias,
@@ -1629,7 +1634,8 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci)
cs->cs_conn->ic_data_crc32c ? "CRC32C" : "None",
cs->cs_max_data_segment_length,
cs->cs_immediate_data,
- cs->cs_conn->ic_iser);
+ cs->cs_conn->ic_iser,
+ cs->cs_conn->ic_offload);
if (error != 0)
break;
}
@@ -1749,6 +1755,26 @@ cfiscsi_ioctl_logout(struct ctl_iscsi *c
ci->status = CTL_ISCSI_OK;
}
+static void
+cfiscsi_ioctl_limits(struct ctl_iscsi *ci)
+{
+ struct ctl_iscsi_limits_params *cilp;
+ int error;
+
+ cilp = (struct ctl_iscsi_limits_params *)&(ci->data);
+
+ error = icl_limits(cilp->offload, &cilp->data_segment_limit);
+ if (error != 0) {
+ ci->status = CTL_ISCSI_ERROR;
+ snprintf(ci->error_str, sizeof(ci->error_str),
+ "%s: icl_limits failed with error %d",
+ __func__, error);
+ return;
+ }
+
+ ci->status = CTL_ISCSI_OK;
+}
+
#ifdef ICL_KERNEL_PROXY
static void
cfiscsi_ioctl_listen(struct ctl_iscsi *ci)
@@ -2176,6 +2202,9 @@ cfiscsi_ioctl(struct cdev *dev,
case CTL_ISCSI_LOGOUT:
cfiscsi_ioctl_logout(ci);
break;
+ case CTL_ISCSI_LIMITS:
+ cfiscsi_ioctl_limits(ci);
+ break;
#ifdef ICL_KERNEL_PROXY
case CTL_ISCSI_LISTEN:
cfiscsi_ioctl_listen(ci);
Modified: projects/clang360-import/sys/cam/ctl/ctl_ioctl.h
==============================================================================
--- projects/clang360-import/sys/cam/ctl/ctl_ioctl.h Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/cam/ctl/ctl_ioctl.h Sat Feb 7 12:57:40 2015 (r278351)
@@ -657,6 +657,7 @@ typedef enum {
CTL_ISCSI_LIST,
CTL_ISCSI_LOGOUT,
CTL_ISCSI_TERMINATE,
+ CTL_ISCSI_LIMITS,
#if defined(ICL_KERNEL_PROXY) || 1
/*
* We actually need those in all cases, but leave the ICL_KERNEL_PROXY,
@@ -677,6 +678,7 @@ typedef enum {
#define CTL_ISCSI_NAME_LEN 224 /* 223 bytes, by RFC 3720, + '\0' */
#define CTL_ISCSI_ADDR_LEN 47 /* INET6_ADDRSTRLEN + '\0' */
#define CTL_ISCSI_ALIAS_LEN 128 /* Arbitrary. */
+#define CTL_ISCSI_OFFLOAD_LEN 8 /* Arbitrary. */
struct ctl_iscsi_handoff_params {
char initiator_name[CTL_ISCSI_NAME_LEN];
@@ -698,11 +700,12 @@ struct ctl_iscsi_handoff_params {
uint32_t max_burst_length;
uint32_t first_burst_length;
uint32_t immediate_data;
+ char offload[CTL_ISCSI_OFFLOAD_LEN];
#ifdef ICL_KERNEL_PROXY
int connection_id;
- int spare[3];
+ int spare[1];
#else
- int spare[4];
+ int spare[2];
#endif
};
@@ -733,6 +736,14 @@ struct ctl_iscsi_terminate_params {
int spare[4];
};
+struct ctl_iscsi_limits_params {
+ char offload[CTL_ISCSI_OFFLOAD_LEN];
+ /* passed to kernel */
+ size_t data_segment_limit;
+ /* passed to userland */
+ int spare[4];
+};
+
#ifdef ICL_KERNEL_PROXY
struct ctl_iscsi_listen_params {
int iser;
@@ -780,6 +791,7 @@ union ctl_iscsi_data {
struct ctl_iscsi_list_params list;
struct ctl_iscsi_logout_params logout;
struct ctl_iscsi_terminate_params terminate;
+ struct ctl_iscsi_limits_params limits;
#ifdef ICL_KERNEL_PROXY
struct ctl_iscsi_listen_params listen;
struct ctl_iscsi_accept_params accept;
Modified: projects/clang360-import/sys/conf/files
==============================================================================
--- projects/clang360-import/sys/conf/files Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/conf/files Sat Feb 7 12:57:40 2015 (r278351)
@@ -3193,7 +3193,7 @@ libkern/jenkins_hash.c standard
libkern/murmur3_32.c standard
libkern/mcount.c optional profiling-routine
libkern/memcchr.c standard
-libkern/memchr.c optional fdt | gdb
+libkern/memchr.c standard
libkern/memcmp.c standard
libkern/memmem.c optional gdb
libkern/qsort.c standard
Modified: projects/clang360-import/sys/conf/kern.pre.mk
==============================================================================
--- projects/clang360-import/sys/conf/kern.pre.mk Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/conf/kern.pre.mk Sat Feb 7 12:57:40 2015 (r278351)
@@ -174,7 +174,7 @@ SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
SYSTEM_OBJS+= hack.So
SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} --no-warn-mismatch \
- -warn-common -export-dynamic -dynamic-linker /red/herring \
+ --warn-common --export-dynamic --dynamic-linker /red/herring \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
${SIZE} ${.TARGET} ; chmod 755 ${.TARGET}
Modified: projects/clang360-import/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
==============================================================================
--- projects/clang360-import/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sat Feb 7 12:57:40 2015 (r278351)
@@ -317,12 +317,12 @@ typedef struct {
/* Support for multiple INIs */
struct ar9300_ini_array {
- u_int32_t *ia_array;
+ const u_int32_t *ia_array;
u_int32_t ia_rows;
u_int32_t ia_columns;
};
#define INIT_INI_ARRAY(iniarray, array, rows, columns) do { \
- (iniarray)->ia_array = (u_int32_t *)(array); \
+ (iniarray)->ia_array = (const u_int32_t *)(array); \
(iniarray)->ia_rows = (rows); \
(iniarray)->ia_columns = (columns); \
} while (0)
Modified: projects/clang360-import/sys/dev/acpica/acpi.c
==============================================================================
--- projects/clang360-import/sys/dev/acpica/acpi.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/dev/acpica/acpi.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -101,6 +101,7 @@ int acpi_quirks;
/* Supported sleep states. */
static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT];
+static void acpi_lookup(void *arg, const char *name, device_t *dev);
static int acpi_modevent(struct module *mod, int event, void *junk);
static int acpi_probe(device_t dev);
static int acpi_attach(device_t dev);
@@ -671,8 +672,10 @@ acpi_attach(device_t dev)
/* Register ACPI again to pass the correct argument of pm_func. */
power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc);
- if (!acpi_disabled("bus"))
+ if (!acpi_disabled("bus")) {
+ EVENTHANDLER_REGISTER(dev_lookup, acpi_lookup, NULL, 1000);
acpi_probe_children(dev);
+ }
/* Update all GPEs and enable runtime GPEs. */
status = AcpiUpdateAllGpes();
@@ -3401,6 +3404,31 @@ acpi_disabled(char *subsys)
return (0);
}
+static void
+acpi_lookup(void *arg, const char *name, device_t *dev)
+{
+ ACPI_HANDLE handle;
+
+ if (*dev != NULL)
+ return;
+
+ /*
+ * Allow any handle name that is specified as an absolute path and
+ * starts with '\'. We could restrict this to \_SB and friends,
+ * but see acpi_probe_children() for notes on why we scan the entire
+ * namespace for devices.
+ *
+ * XXX: The pathname argument to AcpiGetHandle() should be fixed to
+ * be const.
+ */
+ if (name[0] != '\\')
+ return;
+ if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT, __DECONST(char *, name),
+ &handle)))
+ return;
+ *dev = acpi_get_device(handle);
+}
+
/*
* Control interface.
*
Copied: projects/clang360-import/sys/dev/cxgbe/if_cxl.c (from r278350, head/sys/dev/cxgbe/if_cxl.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang360-import/sys/dev/cxgbe/if_cxl.c Sat Feb 7 12:57:40 2015 (r278351, copy of r278350, head/sys/dev/cxgbe/if_cxl.c)
@@ -0,0 +1,44 @@
+/*-
+ * Copyright (c) 2015 Chelsio Communications, Inc.
+ * All rights reserved.
+ * Written by: Navdeep Parhar <np at FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+
+static int
+mod_event(module_t mod, int cmd, void *arg)
+{
+
+ return (0);
+}
+static moduledata_t if_cxl_mod = {"if_cxl", mod_event};
+DECLARE_MODULE(if_cxl, if_cxl_mod, SI_SUB_EXEC, SI_ORDER_ANY);
+MODULE_VERSION(if_cxl, 1);
+MODULE_DEPEND(if_cxl, cxl, 1, 1, 1);
Modified: projects/clang360-import/sys/dev/cxgbe/t4_main.c
==============================================================================
--- projects/clang360-import/sys/dev/cxgbe/t4_main.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/dev/cxgbe/t4_main.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -8215,7 +8215,12 @@ toe_capability(struct port_info *pi, int
return (ENODEV);
if (enable) {
- if (!(sc->flags & FULL_INIT_DONE)) {
+ /*
+ * We need the port's queues around so that we're able to send
+ * and receive CPLs to/from the TOE even if the ifnet for this
+ * port has never been UP'd administratively.
+ */
+ if (!(pi->flags & PORT_INIT_DONE)) {
rc = cxgbe_init_synchronized(pi);
if (rc)
return (rc);
Modified: projects/clang360-import/sys/dev/ipmi/ipmi.c
==============================================================================
--- projects/clang360-import/sys/dev/ipmi/ipmi.c Sat Feb 7 12:52:34 2015 (r278350)
+++ projects/clang360-import/sys/dev/ipmi/ipmi.c Sat Feb 7 12:57:40 2015 (r278351)
@@ -49,6 +49,23 @@ __FBSDID("$FreeBSD$");
#include <dev/ipmi/ipmivars.h>
#endif
+/*
+ * Driver request structures are allocated on the stack via alloca() to
+ * avoid calling malloc(), especially for the watchdog handler.
+ * To avoid too much stack growth, a previously allocated structure can
+ * be reused via IPMI_INIT_DRIVER_REQUEST(), but the caller should ensure
+ * that there is adequate reply/request space in the original allocation.
+ */
+#define IPMI_INIT_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \
+ bzero((req), sizeof(struct ipmi_request)); \
+ ipmi_init_request((req), NULL, 0, (addr), (cmd), (reqlen), (replylen))
+
+#define IPMI_ALLOC_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \
+ (req) = __builtin_alloca(sizeof(struct ipmi_request) + \
+ (reqlen) + (replylen)); \
+ IPMI_INIT_DRIVER_REQUEST((req), (addr), (cmd), (reqlen), \
+ (replylen))
+
#ifdef IPMB
static int ipmi_ipmb_checksum(u_char, int);
static int ipmi_ipmb_send_message(device_t, u_char, u_char, u_char,
@@ -181,8 +198,8 @@ ipmi_dtor(void *arg)
*/
dev->ipmi_closing = 1;
while (dev->ipmi_requests > 0) {
- msleep(&dev->ipmi_requests, &sc->ipmi_lock, PWAIT,
- "ipmidrain", 0);
+ msleep(&dev->ipmi_requests, &sc->ipmi_requests_lock,
+ PWAIT, "ipmidrain", 0);
ipmi_purge_completed_requests(dev);
}
}
@@ -215,7 +232,7 @@ ipmi_ipmb_send_message(device_t dev, u_c
u_char slave_addr = 0x52;
int error;
- req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0),
+ IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0),
IPMI_SEND_MSG, data_len + 8, 0);
req->ir_request[0] = channel;
req->ir_request[1] = slave_addr;
@@ -231,7 +248,6 @@ ipmi_ipmb_send_message(device_t dev, u_c
ipmi_submit_driver_request(sc, req);
error = req->ir_error;
- ipmi_free_request(req);
return (error);
}
@@ -243,7 +259,7 @@ ipmi_handle_attn(struct ipmi_softc *sc)
int error;
device_printf(sc->ipmi_dev, "BMC has a message\n");
- req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0),
+ IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0),
IPMI_GET_MSG_FLAGS, 0, 1);
ipmi_submit_driver_request(sc, req);
@@ -257,9 +273,7 @@ ipmi_handle_attn(struct ipmi_softc *sc)
"watchdog about to go off");
}
if (req->ir_reply[0] & IPMI_MSG_AVAILABLE) {
- ipmi_free_request(req);
-
- req = ipmi_alloc_driver_request(
+ IPMI_ALLOC_DRIVER_REQUEST(req,
IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_MSG, 0,
16);
@@ -268,7 +282,6 @@ ipmi_handle_attn(struct ipmi_softc *sc)
}
}
error = req->ir_error;
- ipmi_free_request(req);
return (error);
}
@@ -478,15 +491,11 @@ ipmi_ioctl(struct cdev *cdev, u_long cmd
* Request management.
*/
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list